Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added the Retry Installation action to the Add-on Store. #17104

Merged
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions source/gui/addonStoreGui/controls/actions.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,13 @@ def _actions(self) -> List[BatchAddonActionVM]:
validCheck=lambda aVMs: AddonListValidator(aVMs).canUseUpdateAction(),
actionTarget=self._selectedAddons,
),
BatchAddonActionVM(
# Translators: Label for an action that retries the selected add-ons
displayName=pgettext("addonStore", "Re&try selected add-ons"),
hwf1324 marked this conversation as resolved.
Show resolved Hide resolved
actionHandler=self._storeVM.getAddons,
validCheck=lambda aVMs: AddonListValidator(aVMs).canUseRetryAction(),
actionTarget=self._selectedAddons,
),
BatchAddonActionVM(
# Translators: Label for an action that removes the selected add-ons
displayName=pgettext("addonStore", "&Remove selected add-ons"),
Expand Down Expand Up @@ -211,6 +218,9 @@ def canUseUpdateAction(self) -> bool:
hasInstallable = True
return hasUpdatable and not hasInstallable

def canUseRetryAction(self) -> bool:
return any(aVM.canUseRetryAction() for aVM in self.addonsList)

def canUseRemoveAction(self) -> bool:
for aVM in self.addonsList:
if aVM.canUseRemoveAction():
Expand Down
3 changes: 3 additions & 0 deletions source/gui/addonStoreGui/viewModels/addonList.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,9 @@ def canUseUpdateOverrideIncompatibilityAction(self) -> bool:
def canUseReplaceAction(self) -> bool:
return self.status == AvailableAddonStatus.REPLACE_SIDE_LOAD

def canUseRetryAction(self) -> bool:
return self.status in (AvailableAddonStatus.DOWNLOAD_FAILED, AvailableAddonStatus.INSTALL_FAILED)
seanbudd marked this conversation as resolved.
Show resolved Hide resolved

def canUseRemoveAction(self) -> bool:
return (
self.model.isInstalled
Expand Down
7 changes: 7 additions & 0 deletions source/gui/addonStoreGui/viewModels/store.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,13 @@ def _makeActionsList(self):
validCheck=lambda aVM: aVM.canUseUpdateOverrideIncompatibilityAction(),
actionTarget=selectedListItem,
),
AddonActionVM(
# Translators: Label for an action that retries the selected addon
displayName=pgettext("addonStore", "Re&try"),
hwf1324 marked this conversation as resolved.
Show resolved Hide resolved
actionHandler=self.getAddon,
validCheck=lambda aVM: aVM.canUseRetryAction(),
actionTarget=selectedListItem,
),
AddonActionVM(
# Translators: Label for an action that replaces the selected addon with
# an add-on store version.
Expand Down
3 changes: 2 additions & 1 deletion user_docs/en/changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,12 @@

* When editing in Microsoft PowerPoint text boxes, you can now move per sentence with `alt+upArrow`/`alt+downArrow`. (#17015, @LeonarddeR)
* In Mozilla Firefox, NVDA will report the highlighted text when a URL containing a text fragment is visited. (#16910, @jcsteh)
* In the add-on shop if the download/installation of an add-on fails, you can now retry the installation. (#17090, @hwf1324)
seanbudd marked this conversation as resolved.
Show resolved Hide resolved

### Changes

* The Report link destination, Character formatting information, and Speak selection dialogs, now include "Close" and "Copy" buttons for user convenience. (#17018, @XLTechie)
* The exit dialog now allows you to restart NVDA with add-ons disabled and debug logging enabled simultaneously. (#11538, @CyrilleB79)r
* The exit dialog now allows you to restart NVDA with add-ons disabled and debug logging enabled simultaneously. (#11538, @CyrilleB79)

### Bug Fixes

Expand Down
1 change: 1 addition & 0 deletions user_docs/en/userGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -3603,6 +3603,7 @@ This could include accessing your personal data or even the entire system.
You can install and update add-ons by [browsing Available add-ons](#AddonStoreBrowsing).
Select an add-on from the "Available add-ons" or "Updatable add-ons" tab.
Then use the update, install, or replace action to start the installation.
You can also retry the installation if the download/installation fails.

You can also install multiple add-ons at once.
This can be done by selecting multiple add-ons in the available add-ons tab, then activating the context menu on the selection and choosing the "Install selected add-ons" action.
Expand Down