Skip to content

Commit aea7db6

Browse files
authored
Merge 1ce1cc6 into f3194e6
2 parents f3194e6 + 1ce1cc6 commit aea7db6

File tree

3 files changed

+25
-12
lines changed

3 files changed

+25
-12
lines changed

source/gui/addonStoreGui/controls/details.py

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# A part of NonVisual Desktop Access (NVDA)
2-
# Copyright (C) 2022-2024 NV Access Limited, Cyrille Bougot
2+
# Copyright (C) 2022-2025 NV Access Limited, Cyrille Bougot
33
# This file is covered by the GNU General Public License.
44
# See the file COPYING for more details.
55

@@ -344,14 +344,15 @@ def _refresh(self):
344344
details.reviewURL,
345345
)
346346

347-
if isinstance(details, _AddonManifestModel):
348-
# Installed add-ons with a manifest only
349-
self._appendDetailsLabelValue(
350-
# Translators: Label for an extra detail field for the selected add-on in the add-on store dialog.
351-
pgettext("addonStore", "Install date:"),
352-
details.installDate.strftime("%x"),
353-
)
347+
if isinstance(details, _AddonManifestModel):
348+
# Installed add-ons with a manifest only
349+
self._appendDetailsLabelValue(
350+
# Translators: Label for an extra detail field for the selected add-on in the add-on store dialog.
351+
pgettext("addonStore", "Install date:"),
352+
details.installDate.strftime("%x"),
353+
)
354354

355+
if isinstance(details, _AddonStoreModel):
355356
if details.publicationDate is not None:
356357
self._appendDetailsLabelValue(
357358
# Translators: Label for an extra detail field for the selected add-on. In the add-on store dialog.

source/gui/addonStoreGui/viewModels/addonList.py

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# A part of NonVisual Desktop Access (NVDA)
2-
# Copyright (C) 2022-2023 NV Access Limited, Cyrille Bougot
2+
# Copyright (C) 2022-2025 NV Access Limited, Cyrille Bougot
33
# This file is covered by the GNU General Public License.
44
# See the file COPYING for more details.
55

@@ -93,9 +93,15 @@ class AddonListField(_AddonListFieldData, Enum):
9393
)
9494
publicationDate = (
9595
# Translators: The name of the column that contains the publication date of the add-on.
96-
pgettext("addonStore", "Publication Date"),
96+
pgettext("addonStore", "Publication date"),
9797
50,
9898
)
99+
installDate = (
100+
# Translators: The name of the column that contains the installation date of the add-on.
101+
pgettext("addonStore", "Install date"),
102+
50,
103+
frozenset({_StatusFilterKey.AVAILABLE, _StatusFilterKey.UPDATE}),
104+
)
99105
minimumNVDAVersion = (
100106
# Translators: The name of the column that contains the minimum version of NVDA required for this add-on.
101107
pgettext("addonStore", "Minimum NVDA version"),
@@ -309,6 +315,8 @@ def _getAddonFieldText(self, listItemVM: AddonListItemVM, field: AddonListField)
309315
return listItemVM.status.displayString
310316
if field is AddonListField.channel:
311317
return listItemVM.model.channel.displayString
318+
if field is AddonListField.installDate:
319+
return listItemVM.model.installDate.strftime("%x")
312320
if field is AddonListField.minimumNVDAVersion:
313321
return formatVersionForGUI(*listItemVM.model.minimumNVDAVersion)
314322
if field is AddonListField.lastTestedVersion:
@@ -403,6 +411,8 @@ def _getSortFieldData(listItemVM: AddonListItemVM) -> "SupportsLessThan":
403411
if getattr(listItemVM.model, "submissionTime", None):
404412
return listItemVM.model.submissionTime
405413
return 0
414+
if self._sortByModelField == AddonListField.installDate:
415+
return listItemVM.model.installDate
406416
return strxfrm(self._getAddonFieldText(listItemVM, self._sortByModelField))
407417

408418
def _containsTerm(detailsVM: AddonListItemVM, term: str) -> bool:

user_docs/en/changes.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,10 @@
66

77
### New Features
88

9-
* In the Add-on Store, add-ons can be sorted by minimum and last tested NVDA version.
10-
Additionally, minimum and last tested version will now be also shown in the details area for an add-on in the Available Add-ons tab. (#18440, @nvdaes)
9+
* Add-on Store:
10+
* Add-ons can be sorted by minimum and last tested NVDA version as welle as by installation date. (#18440, #18560, @nvdaes, @CyrilleB79)
11+
* Minimum and last tested version will now be also shown in the details area for an add-on in the Available Add-ons tab. (#18440, @nvdaes)
12+
* Installation date will now be also shown in the details area for external add-ons. (#18560, @CyrilleB79)
1113

1214
### Changes
1315

0 commit comments

Comments
 (0)