It's all that I wanted to do on this branch. Thanks. 2013/8/9, commits-noreply@xxxxxxxxxxxxx <commits-noreply@xxxxxxxxxxxxx>: > 1 new commit in googleSpeechRecognition: > > https://bitbucket.org/nvdaaddonteam/googlespeechrecognition/commits/d4a3dcb5501d/ > Changeset: d4a3dcb5501d > Branch: interface > User: norrumar > Date: 2013-08-09 17:04:14 > Summary: Cosmetic changes: added class for language. > > Affected #: 1 file > > diff --git a/addon/globalPlugins/googleSpeechRecognition/__init__.py > b/addon/globalPlugins/googleSpeechRecognition/__init__.py > index 0bb8def..1619607 100644 > --- a/addon/globalPlugins/googleSpeechRecognition/__init__.py > +++ b/addon/globalPlugins/googleSpeechRecognition/__init__.py > @@ -51,9 +51,18 @@ langsList = { > "es-Es": _("Spanish Spain"), > } > > -langsStatus = {} > langsCodes = langsList.keys() > > +class Language: > + > + def __init__(self, code, dicNames, checkStatusList): > + self.code = code > + self.name = dicNames[code] > + if code in checkStatusList: > + self.status = _("Added") > + else: > + self.status = _("Not added") > + > class LanguagesDialog(gui.SettingsDialog): > > # Translators: The title of the languages dialog. > @@ -125,12 +134,9 @@ class LanguagesDialog(gui.SettingsDialog): > > def refreshLanguagesList(self, activeIndex): > self.languagesList.DeleteAllItems() > - for k, v in langsList.items(): > - if k in addedLanguages: > - langsStatus[k] = _("Added") > - else: > - langsStatus[k] = _("No added") > - self.languagesList.Append((k, v, langsStatus[k])) > + for code in langsCodes: > + language = Language(code, langsList, addedLanguages) > + self.languagesList.Append((language.code, language.name, > language.status)) > self.languagesList.Select(activeIndex,on=1) > > self.languagesList.SetItemState(activeIndex,wx.LIST_STATE_FOCUSED,wx.LIST_STATE_FOCUSED) > > Repository URL: > https://bitbucket.org/nvdaaddonteam/googlespeechrecognition/ > > -- > > This is a commit notification from bitbucket.org. You are receiving > this because you have the service enabled, addressing the recipient of > this email. > > ---------------------------------------------------------------- NVDA add-ons Central: A list for discussing NVDA add-ons To post a message, send an email to nvda-addons@xxxxxxxxxxxxx. To unsubscribe, send an email with the subject line of "unsubscribe" (without quotes) to nvda-addons-request@xxxxxxxxxxxxx. If you have questions for list moderators, please send a message to nvda-addons-moderators@xxxxxxxxxxxxx. Community addons can be found here: http://addons.nvda-project.org