Skip to content

Commit

Permalink
Use AppendColumn
Browse files Browse the repository at this point in the history
  • Loading branch information
seanbudd committed Sep 26, 2023
1 parent d47a2dd commit 3d9a464
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 18 deletions.
4 changes: 2 additions & 2 deletions source/gui/_addonStoreGui/controls/addonList.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ def __init__(

def _refreshColumns(self):
self.ClearAll()
for colIndex, col in enumerate(self._addonsListVM.presentedFields):
self.InsertColumn(colIndex, col.displayString, width=self.scaleSize(col.width))
for col in self._addonsListVM.presentedFields:
self.AppendColumn(col.displayString, width=self.scaleSize(col.width))
self.Layout()

def _getListSelectionPosition(self) -> Optional[wx.Position]:
Expand Down
14 changes: 7 additions & 7 deletions source/gui/addonGui.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,13 +185,13 @@ def __init__(self, parent):
proportion=1,
)
# Translators: The label for a column in add-ons list used to identify add-on package name (example: package is OCR).
self.addonsList.InsertColumn(0, _("Package"), width=self.scaleSize(150))
self.addonsList.AppendColumn(_("Package"), width=self.scaleSize(150))
# Translators: The label for a column in add-ons list used to identify add-on's running status (example: status is running).
self.addonsList.InsertColumn(1, _("Status"), width=self.scaleSize(50))
self.addonsList.AppendColumn(_("Status"), width=self.scaleSize(50))
# Translators: The label for a column in add-ons list used to identify add-on's version (example: version is 0.3).
self.addonsList.InsertColumn(2, _("Version"), width=self.scaleSize(50))
self.addonsList.AppendColumn(_("Version"), width=self.scaleSize(50))
# Translators: The label for a column in add-ons list used to identify add-on's author (example: author is NV Access).
self.addonsList.InsertColumn(3, _("Author"), width=self.scaleSize(300))
self.addonsList.AppendColumn(_("Author"), width=self.scaleSize(300))
self.addonsList.Bind(wx.EVT_LIST_ITEM_FOCUSED, self.onListItemSelected)

# this is the group of buttons that affects the currently selected addon
Expand Down Expand Up @@ -710,11 +710,11 @@ def __init__(
)

# Translators: The label for a column in add-ons list used to identify add-on package name (example: package is OCR).
self.addonsList.InsertColumn(1, _("Package"), width=self.scaleSize(150))
self.addonsList.AppendColumn(_("Package"), width=self.scaleSize(150))
# Translators: The label for a column in add-ons list used to identify add-on's running status (example: status is running).
self.addonsList.InsertColumn(2, _("Version"), width=self.scaleSize(150))
self.addonsList.AppendColumn(_("Version"), width=self.scaleSize(150))
# Translators: The label for a column in add-ons list used to provide some explanation about incompatibility
self.addonsList.InsertColumn(3, _("Incompatible reason"), width=self.scaleSize(180))
self.addonsList.AppendColumn(_("Incompatible reason"), width=self.scaleSize(180))

buttonSizer = guiHelper.ButtonHelper(wx.HORIZONTAL)
# Translators: The label for a button in Add-ons Manager dialog to show information about the selected add-on.
Expand Down
8 changes: 4 additions & 4 deletions source/gui/settingsDialogs.py
Original file line number Diff line number Diff line change
Expand Up @@ -4453,14 +4453,14 @@ def makeSettings(self, settingsSizer):
)

# Translators: The label for a column in symbols list used to identify a symbol.
self.symbolsList.InsertColumn(0, _("Symbol"), width=self.scaleSize(150))
self.symbolsList.AppendColumn(_("Symbol"), width=self.scaleSize(150))
# Translators: The label for a column in symbols list used to identify a replacement.
self.symbolsList.InsertColumn(1, _("Replacement"))
self.symbolsList.AppendColumn(_("Replacement"))
# Translators: The label for a column in symbols list used to identify a symbol's speech level (either none, some, most, all or character).
self.symbolsList.InsertColumn(2, _("Level"))
self.symbolsList.AppendColumn(_("Level"))
# Translators: The label for a column in symbols list which specifies when the actual symbol will be sent to the synthesizer (preserved).
# See the "Punctuation/Symbol Pronunciation" section of the User Guide for details.
self.symbolsList.InsertColumn(3, _("Preserve"))
self.symbolsList.AppendColumn(_("Preserve"))
self.symbolsList.Bind(wx.EVT_LIST_ITEM_FOCUSED, self.onListItemFocused)

# Translators: The label for the group of controls in symbol pronunciation dialog to change the pronunciation of a symbol.
Expand Down
10 changes: 5 additions & 5 deletions source/gui/speechDict.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,19 +177,19 @@ def makeSettings(self, settingsSizer):
wx.ListCtrl, style=wx.LC_REPORT | wx.LC_SINGLE_SEL
)
# Translators: The label for a column in dictionary entries list used to identify comments for the entry.
self.dictList.InsertColumn(0, _("Comment"), width=150)
self.dictList.AppendColumn(_("Comment"), width=150)
# Translators: The label for a column in dictionary entries list used to identify pattern
# (original word or a pattern).
self.dictList.InsertColumn(1, _("Pattern"), width=150)
self.dictList.AppendColumn(_("Pattern"), width=150)
# Translators: The label for a column in dictionary entries list and in a list of symbols
# from symbol pronunciation dialog used to identify replacement for a pattern or a symbol
self.dictList.InsertColumn(2, _("Replacement"), width=150)
self.dictList.AppendColumn(_("Replacement"), width=150)
# Translators: The label for a column in dictionary entries list used to identify
# whether the entry is case sensitive or not.
self.dictList.InsertColumn(3, _("case"), width=50)
self.dictList.AppendColumn(_("case"), width=50)
# Translators: The label for a column in dictionary entries list used to identify
# whether the entry is a regular expression, matches whole words, or matches anywhere.
self.dictList.InsertColumn(4, _("Type"), width=50)
self.dictList.AppendColumn(_("Type"), width=50)
self.offOn = (_("off"), _("on"))
for entry in self.tempSpeechDict:
self.dictList.Append((
Expand Down

0 comments on commit 3d9a464

Please sign in to comment.