Skip to content

Commit

Permalink
address review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
seanbudd committed Jun 5, 2024
1 parent 3218654 commit 7a82c93
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions source/gui/addonStoreGui/controls/messageDialogs.py
Original file line number Diff line number Diff line change
Expand Up @@ -378,6 +378,7 @@ def __init__(self, parent: wx.Window, addonsPendingUpdate: list[_AddonGUIModel])

def _setupUI(self):
self.Bind(wx.EVT_CLOSE, self.onClose)
self.Bind(wx.EVT_CHAR_HOOK, self.onCharHook)
mainSizer = wx.BoxSizer(wx.VERTICAL)
sHelper = BoxSizerHelper(self, orientation=wx.VERTICAL)
self._setupMessage(sHelper)
Expand All @@ -388,6 +389,11 @@ def _setupUI(self):
mainSizer.Fit(self)
self.CentreOnScreen()

def onCharHook(self, evt: wx.KeyEvent):
if evt.KeyCode == wx.WXK_ESCAPE:
self.Close()
evt.Skip()

def _setupMessage(self, sHelper: BoxSizerHelper):
_message = pgettext(
"addonStore",
Expand Down Expand Up @@ -426,15 +432,15 @@ def _createAddonsPanel(self, sHelper: BoxSizerHelper):
)

# Translators: Label for an extra detail field for an add-on. In the add-on store UX.
nameLabel = pgettext("addonStore", "Name:")
nameLabel = pgettext("addonStore", "Name")
# Translators: Label for an extra detail field for an add-on. In the add-on store UX.
installedVersionLabel = pgettext("addonStore", "Installed version:")
installedVersionLabel = pgettext("addonStore", "Installed version")
# Translators: Label for an extra detail field for an add-on. In the add-on store UX.
availableVersionLabel = pgettext("addonStore", "Available version:")
availableVersionLabel = pgettext("addonStore", "Available version")
# Translators: Label for an extra detail field for an add-on. In the add-on store UX.
channelLabel = pgettext("addonStore", "Channel:")
channelLabel = pgettext("addonStore", "Channel")
# Translators: Label for an extra detail field for an add-on. In the add-on store UX.
statusLabel = pgettext("addonStore", "Status:")
statusLabel = pgettext("addonStore", "Status")

self.addonsList.AppendColumn(nameLabel, width=300)
self.addonsList.AppendColumn(installedVersionLabel, width=200)
Expand Down

0 comments on commit 7a82c93

Please sign in to comment.