Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
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
13 changes: 13 additions & 0 deletions source/gui/speechDict.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,8 @@ def makeSettings(self, settingsSizer):
wx.ListCtrl,
style=wx.LC_REPORT | wx.LC_SINGLE_SEL,
)
self.dictList.Bind(wx.EVT_LIST_ITEM_ACTIVATED, self.onContextMenu)
Comment thread
amirmahdifard marked this conversation as resolved.
Outdated
self.dictList.Bind(wx.EVT_CONTEXT_MENU, self.onContextMenu)
# Translators: The label for a column in dictionary entries list used to identify comments for the entry.
self.dictList.AppendColumn(_("Comment"), width=150)
# Translators: The label for a column in dictionary entries list used to identify pattern
Expand Down Expand Up @@ -237,6 +239,17 @@ def makeSettings(self, settingsSizer):

sHelper.addItem(bHelper, flag=wx.EXPAND)

def onContextMenu(self, evt):
menu = wx.Menu()
# Translators: Context menu item label to edit an entry
editItem = menu.Append(wx.ID_ANY, _("&Edit"))
# Translators: Context menu item label to remove an entry
removeItem = menu.Append(wx.ID_ANY, _("&Remove"))
self.Bind(wx.EVT_MENU, self.onEditClick, editItem)
self.Bind(wx.EVT_MENU, self.onRemoveClick, removeItem)
self.PopupMenu(menu)
menu.Destroy()

def postInit(self):
self.dictList.SetFocus()

Expand Down
1 change: 1 addition & 0 deletions user_docs/en/changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
* In modes that show a continuation mark, when a word is cut across rows, the last cell of the row now shows a continuation mark (braille dots 7-8) so it is clear that the word continues on the next row.
* The "At word or syllable boundaries" option uses hyphenation dictionaries to split long words at syllable boundaries when they do not fit on the display.
* Magnifier: A new unassigned command has been added to move the mouse cursor to the center of the magnified view. (#20127, @CyrilleB79)
* Added context menu to the list entries of the Speech Dictionaries dialog, Maximizing eas of access to the list entries actions. (#20420, @amirmahdifard)
Comment thread
amirmahdifard marked this conversation as resolved.
Outdated

### Changes

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 @@ -4283,6 +4283,7 @@ The dialog also contains Add, Edit, Remove and Remove all buttons.

To add a new rule to the dictionary, press the Add button, and fill in the fields in the dialog box that appears and then press Ok.
You will then see your new rule in the list of rules.
As well as the edit and remove buttons, you can also manage individual rules by opening a context menu on an entry in the list (press the Applications key on your keyboard, shift+f10, space bar, or right/left-click), which provides options to Edit or Remove the selected rule.
Comment thread
amirmahdifard marked this conversation as resolved.
Outdated
However, to make sure your rule is actually saved, make sure to press Ok to exit the dictionary dialog completely once you have finished adding/editing rules.

The rules for NVDA's speech dictionaries allow you to change one string of characters into another.
Expand Down
Loading