Skip to content

Commit

Permalink
Add-on update check interface: select the first available update entr…
Browse files Browse the repository at this point in the history
…y. re nvaccess#3208.

By using a combination of Select and SetState functions, select the first add-on update entry if updates are available. This is the same trick used in ad-dons manager, config profiles dilaog and others for selecting the first entry.
  • Loading branch information
josephsl committed Aug 4, 2018
1 parent 3bf6104 commit cb9defc
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions source/gui/addonGui.py
Expand Up @@ -383,6 +383,8 @@ def __init__(self,parent, addonUpdateInfo, auto=True):
for entry in sorted(addonUpdateInfo.keys()):
addon = addonUpdateInfo[entry]
self.addonsList.Append((addon['summary'], addon['curVersion'], addon['version']))
self.addonsList.Select(0)
self.addonsList.SetItemState(0,wx.LIST_STATE_FOCUSED,wx.LIST_STATE_FOCUSED)
addonsSizerHelper.addItem(entriesSizer)
else:
# Translators: Message displayed when no add-on updates are available.
Expand Down

0 comments on commit cb9defc

Please sign in to comment.