Skip to content

Commit 64e0ed8

Browse files
committed
version 0.6
update code improvements
1 parent 2703181 commit 64e0ed8

File tree

2 files changed

+4
-8
lines changed

2 files changed

+4
-8
lines changed

addon/globalPlugins/synthRingSettingsSelector.py

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ def setAvailableSettings():
3535
setattr(s, SETTINGS_AVAILABLE, True if getattr(s, SETTINGS_ID) in config.conf['synthRingSettingsSelector']['availableSettings'] else False)
3636
globalVars.settingsRing.updateSupportedSettings(synthDriverHandler._curSynth)
3737

38-
3938
class SynthRingSettingsSelectorSettingsPanel(gui.SettingsPanel):
4039
# Translators: This is the label for the Synth ring settings selector settings category in NVDA Settings screen.
4140
title = _("Synth ring settings selector")
@@ -62,20 +61,17 @@ def onSave(self):
6261
config.conf['synthRingSettingsSelector']['availableSettings'] = newSettings
6362
config.post_configProfileSwitch.notify()
6463

65-
66-
6764
class GlobalPlugin(globalPluginHandler.GlobalPlugin):
6865
def __init__(self):
6966
global SETTINGS_AVAILABLE, SETTINGS_ID
7067
super(globalPluginHandler.GlobalPlugin, self).__init__()
7168
if buildVersion.version_year*10 +buildVersion.version_major < 20192:
7269
SETTINGS_ID = 'name'
7370
SETTINGS_AVAILABLE = 'availableInSynthSettingsRing'
74-
self.handleConfigProfileSwitch()
75-
config.post_configProfileSwitch.register(self.handleConfigProfileSwitch)
7671
synthDriverHandler.setSynth = setSynth
7772
gui.settingsDialogs.setSynth = setSynth
78-
setAvailableSettings()
73+
self.handleConfigProfileSwitch()
74+
config.post_configProfileSwitch.register(self.handleConfigProfileSwitch)
7975
gui.settingsDialogs.NVDASettingsDialog.categoryClasses.append(SynthRingSettingsSelectorSettingsPanel)
8076

8177
def handleConfigProfileSwitch(self):
@@ -86,4 +82,4 @@ def terminate(self):
8682
synthDriverHandler.setSynth = origSetSynth
8783
gui.settingsDialogs.setSynth = origSetSynth
8884
gui.settingsDialogs.NVDASettingsDialog.categoryClasses.remove(SynthRingSettingsSelectorSettingsPanel)
89-
config.post_configProfileSwitch.unregister(self.handleConfigProfileSwitch)
85+
config.post_configProfileSwitch.unregister(self.handleConfigProfileSwitch)

buildVars.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
# Translators: Long description to be shown for this add-on on add-on information from add-ons manager
2020
"addon_description" : _("""This add-on allows the user to select which settings should appear on the synth settings ring."""),
2121
# version
22-
"addon_version" : "0.5",
22+
"addon_version" : "0.6",
2323
# Author(s)
2424
"addon_author" : u"David CM <dhf360@gmail.com>",
2525
# URL for the add-on documentation support

0 commit comments

Comments
 (0)