Skip to content

Commit

Permalink
Merge pull request #6 from marlon-sousa/feature/nvda_2022.1_compatibi…
Browse files Browse the repository at this point in the history
…lity

NVDA 2022.1 compatibility
  • Loading branch information
marlon-sousa authored Jun 23, 2022
2 parents 77ffd43 + 7380a4b commit b812f7f
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 11 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# EnhancedDictionaries 1.2.1
# EnhancedDictionaries 1.3.0
Nvda ADDON for handling more advanced dictionaries processing

## download
Download the [Enhanced Dictionaries 1.2.1 addon](https://github.com/marlon-sousa/EnhancedDictionaries/releases/download/1.2.1/EnhancedDictionaries-1.2.1.nvda-addon)
Download the [Enhanced Dictionaries 1.3.0 addon](https://github.com/marlon-sousa/EnhancedDictionaries/releases/download/1.3.0/EnhancedDictionaries-1.3.0.nvda-addon)

## Features

Expand Down
27 changes: 21 additions & 6 deletions addon/globalPlugins/EnhancedDictionaries/guiHelper.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,14 +76,15 @@ def showEnhancedDictionaryDialog(dic, title = None):
# for dictionaries belonging to specific profiles, a button to import entries from the default profile dictionary is presented
# if a dictionary is being created (it does not exist on disc) it is activated imediately after the dialog closes

class EnhancedDictionaryDialog(gui.settingsDialogs.DictionaryDialog):
class EnhancedDictionaryDialog(gui.speechDict.DictionaryDialog):

PATTERN_COL = 1

def __init__(self, parent,title,speechDict):
self._profile = config.conf.getActiveProfile()
title = self._makeTitle(title)
super(EnhancedDictionaryDialog, self).__init__(parent,title,speechDict)
super().__init__(parent, title, speechDict)


def _makeTitle(self, title):
# Translators: The profile name for normal configuration
Expand All @@ -110,27 +111,41 @@ def makeSettings(self, settingsSizer):
self.dictList.InsertColumn(4, __("Type"),width=50)
self.offOn = (__("off"),__("on"))
for entry in self.tempSpeechDict:
self.dictList.Append((entry.comment,entry.pattern,entry.replacement,self.offOn[int(entry.caseSensitive)],EnhancedDictionaryDialog.TYPE_LABELS[entry.type]))
self.dictList.Append((
entry.comment,
entry.pattern,
entry.replacement,
self.offOn[int(entry.caseSensitive)],
EnhancedDictionaryDialog.TYPE_LABELS[entry.type]
))
self.editingIndex=-1

bHelper = guiHelper.ButtonHelper(orientation=wx.HORIZONTAL)
bHelper.addButton(
parent=self,
# Translators: The label for a button in speech dictionaries dialog to add new entries.
label=__("&Add")
).Bind(wx.EVT_BUTTON, self.OnAddClick)
).Bind(wx.EVT_BUTTON, self.onAddClick)

bHelper.addButton(
parent=self,
# Translators: The label for a button in speech dictionaries dialog to edit existing entries.
label = __("&Edit")
).Bind(wx.EVT_BUTTON, self.OnEditClick)
).Bind(wx.EVT_BUTTON, self.onEditClick)

bHelper.addButton(
parent=self,
# Translators: The label for a button in speech dictionaries dialog to remove existing entries.
label = __("&Remove")
).Bind(wx.EVT_BUTTON, self.OnRemoveClick)
).Bind(wx.EVT_BUTTON, self.onRemoveClick)

bHelper.sizer.AddStretchSpacer()

bHelper.addButton(
parent=self,
# Translators: The label for a button on the Speech Dictionary dialog.
label=__("Remove all")
).Bind(wx.EVT_BUTTON, self.onRemoveAll)

# name of the default profile is always set to None on NVDA
if(self._profile.name):
Expand Down
6 changes: 3 additions & 3 deletions buildVars.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,17 @@ def _(x): return x
"addon_description": _("""This addon introduces better dictionaries handling for NVDA.
It is now possible to use profile specific dictionaries, which eenables better productivity by allowing you to use different dictionaries for different applications and scenarius."""),
# version
"addon_version": "1.2.1",
"addon_version": "1.3.0",
# Author(s)
"addon_author": u"Marlon Brandão de Sousa <[email protected]>",
# URL for the add-on documentation support
"addon_url": "https://github.com/marlon-sousa/EnhancedDictionaries",
# Documentation file name
"addon_docFileName": "readme.html",
# Minimum NVDA version supported (e.g. "2018.3.0", minor version is optional)
"addon_minimumNVDAVersion": "2019.3.0",
"addon_minimumNVDAVersion": "2022.1",
# Last NVDA version supported/tested (e.g. "2018.4.0", ideally more recent than minimum version)
"addon_lastTestedNVDAVersion": "2021.1",
"addon_lastTestedNVDAVersion": "2022.1",
# Add-on update channel (default is None, denoting stable releases, and for development releases, use "dev"; do not change unless you know what you are doing)
"addon_updateChannel": None,
}
Expand Down

0 comments on commit b812f7f

Please sign in to comment.