From f0c08c4ee257d90235e0696cf428d72fff1ec063 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Iv=C3=A1n=20Novegil=20Cancelas?= Date: Fri, 31 Aug 2018 23:52:12 +0200 Subject: [PATCH 1/3] Changed version to 1.2.2-dev. Updated profile reversion dialog to enhance WXPy4 compatibility. --- addon/appModules/lambda/lambdaProfileSetup.py | 8 ++++---- buildVars.py | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/addon/appModules/lambda/lambdaProfileSetup.py b/addon/appModules/lambda/lambdaProfileSetup.py index f4b0888..b2cd243 100644 --- a/addon/appModules/lambda/lambdaProfileSetup.py +++ b/addon/appModules/lambda/lambdaProfileSetup.py @@ -137,22 +137,22 @@ def makeSettings(self, settingsSizer): settingsSizer.Add(self.introStxt,flag=wx.BOTTOM) # Translators: This is the label for a checkbox in the # Quick Profile Wizard dialog. - self.defaultTranslationTableCheckBox=wx.CheckBox(self,wx.NewId(),label=_("Keep the LAMBDA braille table for the current language (%s)") % TABLE_NAME) + self.defaultTranslationTableCheckBox=wx.CheckBox(self,wx.ID_ANY,label=_("Keep the LAMBDA braille table for the current language (%s)") % TABLE_NAME) self.defaultTranslationTableCheckBox.SetValue(True) settingsSizer.Add(self.defaultTranslationTableCheckBox,border=10,flag=wx.BOTTOM) # Translators: This is the label for a checkbox in the # Quick Profile Wizard dialog. - self.brailleTetherToFocusCheckBox=wx.CheckBox(self,wx.NewId(),label=_("Set the braille cursor to tether the focus")) + self.brailleTetherToFocusCheckBox=wx.CheckBox(self,wx.ID_ANY,label=_("Set the braille cursor to tether the focus")) self.brailleTetherToFocusCheckBox.SetValue(True) settingsSizer.Add(self.brailleTetherToFocusCheckBox,border=10,flag=wx.BOTTOM) # Translators: This is the label for a checkbox in the # Quick Profile Wizard dialog. - self.disableReadByParagraphCheckBox=wx.CheckBox(self,wx.NewId(),label=_("Disable the Braille reading by paragraph")) + self.disableReadByParagraphCheckBox=wx.CheckBox(self,wx.ID_ANY,label=_("Disable the Braille reading by paragraph")) self.disableReadByParagraphCheckBox.SetValue(True) settingsSizer.Add(self.disableReadByParagraphCheckBox,border=10,flag=wx.BOTTOM) # Translators: This is the label for a checkbox in the # Quick Profile Wizard dialog. - self.disableBrailleWordWrapCheckBox=wx.CheckBox(self,wx.NewId(),label=_("Disable word wrappping of the braille line")) + self.disableBrailleWordWrapCheckBox=wx.CheckBox(self,wx.ID_ANY,label=_("Disable word wrappping of the braille line")) self.disableBrailleWordWrapCheckBox.SetValue(True) settingsSizer.Add(self.disableBrailleWordWrapCheckBox,border=10,flag=wx.BOTTOM) diff --git a/buildVars.py b/buildVars.py index 86576c1..0ae7679 100644 --- a/buildVars.py +++ b/buildVars.py @@ -19,7 +19,7 @@ # Translators: Long description to be shown for this add-on on add-on information from add-ons manager "addon_description" : _("This addon provides access to the Lambda math editor with both braille and speech support."), # version - "addon_version" : "1.2.1a", + "addon_version" : "1.2.2-dev", # Author(s) "addon_author" : "Alberto Zanella, Ivan Novegil", # URL for the add-on documentation support From 12ad170026f53bb69707e1bc64f7364965f6bf24 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Iv=C3=A1n=20Novegil=20Cancelas?= Date: Sun, 2 Sep 2018 01:40:52 +0200 Subject: [PATCH 2/3] Relying on guiHelper for dialog appearance --- addon/appModules/lambda/lambdaProfileSetup.py | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/addon/appModules/lambda/lambdaProfileSetup.py b/addon/appModules/lambda/lambdaProfileSetup.py index b2cd243..ccde549 100644 --- a/addon/appModules/lambda/lambdaProfileSetup.py +++ b/addon/appModules/lambda/lambdaProfileSetup.py @@ -11,6 +11,7 @@ import addonHandler import sharedMessages as shMsg import gui +from gui import guiHelper from gui.settingsDialogs import SettingsDialog import wx try : @@ -131,30 +132,26 @@ class QuickProfileWizardDialog(SettingsDialog): title = _("Revert LAMBDA Profile Wizard") def makeSettings(self, settingsSizer): + helper=guiHelper.BoxSizerHelper(self, sizer=settingsSizer) # Translators: This is the static text of the Quick Profile Wizard dialog. msgIntro=_("Choose which options you want to reset to the default value for the Lambdas profile") - self.introStxt=wx.StaticText(self,-1,label=msgIntro) - settingsSizer.Add(self.introStxt,flag=wx.BOTTOM) + self.introStxt=helper.addItem(wx.StaticText(self,-1,label=msgIntro)) # Translators: This is the label for a checkbox in the # Quick Profile Wizard dialog. - self.defaultTranslationTableCheckBox=wx.CheckBox(self,wx.ID_ANY,label=_("Keep the LAMBDA braille table for the current language (%s)") % TABLE_NAME) + self.defaultTranslationTableCheckBox=helper.addItem(wx.CheckBox(self,wx.ID_ANY,label=_("Keep the LAMBDA braille table for the current language (%s)") % TABLE_NAME)) self.defaultTranslationTableCheckBox.SetValue(True) - settingsSizer.Add(self.defaultTranslationTableCheckBox,border=10,flag=wx.BOTTOM) # Translators: This is the label for a checkbox in the # Quick Profile Wizard dialog. - self.brailleTetherToFocusCheckBox=wx.CheckBox(self,wx.ID_ANY,label=_("Set the braille cursor to tether the focus")) + self.brailleTetherToFocusCheckBox=helper.addItem(wx.CheckBox(self,wx.ID_ANY,label=_("Set the braille cursor to tether the focus"))) self.brailleTetherToFocusCheckBox.SetValue(True) - settingsSizer.Add(self.brailleTetherToFocusCheckBox,border=10,flag=wx.BOTTOM) # Translators: This is the label for a checkbox in the # Quick Profile Wizard dialog. - self.disableReadByParagraphCheckBox=wx.CheckBox(self,wx.ID_ANY,label=_("Disable the Braille reading by paragraph")) + self.disableReadByParagraphCheckBox=helper.addItem(wx.CheckBox(self,wx.ID_ANY,label=_("Disable the Braille reading by paragraph"))) self.disableReadByParagraphCheckBox.SetValue(True) - settingsSizer.Add(self.disableReadByParagraphCheckBox,border=10,flag=wx.BOTTOM) # Translators: This is the label for a checkbox in the # Quick Profile Wizard dialog. - self.disableBrailleWordWrapCheckBox=wx.CheckBox(self,wx.ID_ANY,label=_("Disable word wrappping of the braille line")) + self.disableBrailleWordWrapCheckBox=helper.addItem(wx.CheckBox(self,wx.ID_ANY,label=_("Disable word wrappping of the braille line"))) self.disableBrailleWordWrapCheckBox.SetValue(True) - settingsSizer.Add(self.disableBrailleWordWrapCheckBox,border=10,flag=wx.BOTTOM) def postInit(self): self.defaultTranslationTableCheckBox.SetFocus() From 7294e69c10b61a0bb1c87f28ea23586d0e5890b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Iv=C3=A1n=20Novegil=20Cancelas?= Date: Sun, 2 Sep 2018 21:17:21 +0200 Subject: [PATCH 3/3] Rename helper to sHelper. Remove ID assignations --- addon/appModules/lambda/lambdaProfileSetup.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/addon/appModules/lambda/lambdaProfileSetup.py b/addon/appModules/lambda/lambdaProfileSetup.py index ccde549..50318c2 100644 --- a/addon/appModules/lambda/lambdaProfileSetup.py +++ b/addon/appModules/lambda/lambdaProfileSetup.py @@ -132,25 +132,25 @@ class QuickProfileWizardDialog(SettingsDialog): title = _("Revert LAMBDA Profile Wizard") def makeSettings(self, settingsSizer): - helper=guiHelper.BoxSizerHelper(self, sizer=settingsSizer) + sHelper=guiHelper.BoxSizerHelper(self, sizer=settingsSizer) # Translators: This is the static text of the Quick Profile Wizard dialog. msgIntro=_("Choose which options you want to reset to the default value for the Lambdas profile") - self.introStxt=helper.addItem(wx.StaticText(self,-1,label=msgIntro)) + self.introStxt=sHelper.addItem(wx.StaticText(self,label=msgIntro)) # Translators: This is the label for a checkbox in the # Quick Profile Wizard dialog. - self.defaultTranslationTableCheckBox=helper.addItem(wx.CheckBox(self,wx.ID_ANY,label=_("Keep the LAMBDA braille table for the current language (%s)") % TABLE_NAME)) + self.defaultTranslationTableCheckBox=sHelper.addItem(wx.CheckBox(self,label=_("Keep the LAMBDA braille table for the current language (%s)") % TABLE_NAME)) self.defaultTranslationTableCheckBox.SetValue(True) # Translators: This is the label for a checkbox in the # Quick Profile Wizard dialog. - self.brailleTetherToFocusCheckBox=helper.addItem(wx.CheckBox(self,wx.ID_ANY,label=_("Set the braille cursor to tether the focus"))) + self.brailleTetherToFocusCheckBox=sHelper.addItem(wx.CheckBox(self,label=_("Set the braille cursor to tether the focus"))) self.brailleTetherToFocusCheckBox.SetValue(True) # Translators: This is the label for a checkbox in the # Quick Profile Wizard dialog. - self.disableReadByParagraphCheckBox=helper.addItem(wx.CheckBox(self,wx.ID_ANY,label=_("Disable the Braille reading by paragraph"))) + self.disableReadByParagraphCheckBox=sHelper.addItem(wx.CheckBox(self,label=_("Disable the Braille reading by paragraph"))) self.disableReadByParagraphCheckBox.SetValue(True) # Translators: This is the label for a checkbox in the # Quick Profile Wizard dialog. - self.disableBrailleWordWrapCheckBox=helper.addItem(wx.CheckBox(self,wx.ID_ANY,label=_("Disable word wrappping of the braille line"))) + self.disableBrailleWordWrapCheckBox=sHelper.addItem(wx.CheckBox(self,label=_("Disable word wrappping of the braille line"))) self.disableBrailleWordWrapCheckBox.SetValue(True) def postInit(self):