1 new commit in nvda: https://bitbucket.org/nvdaaddonteam/nvda/commits/610043e3391c/ Changeset: 610043e3391c Branch: t4354 User: norrumar Date: 2014-11-10 12:29:20+00:00 Summary: Prevent to add duplicate symbols. Affected #: 1 file diff --git a/source/gui/settingsDialogs.py b/source/gui/settingsDialogs.py index c0277d4..a7fcce6 100644 --- a/source/gui/settingsDialogs.py +++ b/source/gui/settingsDialogs.py @@ -1600,7 +1600,15 @@ class SpeechSymbolsDialog(SettingsDialog): # Translators: This is the label for the add symbol dialog. entryDialog=AddSymbolDialog(self) if entryDialog.ShowModal()==wx.ID_OK: - addedSymbol = characterProcessing.SpeechSymbol(entryDialog.identifierTextCtrl.GetValue()) + identifier = entryDialog.identifierTextCtrl.GetValue() + for index, symbol in enumerate(self.symbols): + if identifier == symbol.identifier: + wx.CallAfter(gui.messageBox,_('Symbol "%s" is already in customized symbols')%identifier,_("Symbol Error"),wx.OK|wx.ICON_ERROR) + self.symbolsList.Select(index) + self.symbolsList.Focus(index) + self.symbolsList.SetFocus() + return + addedSymbol = characterProcessing.SpeechSymbol(identifier) for index, symbol in enumerate(self.pendingRemovals): if symbol.identifier == addedSymbol.identifier: del self.pendingRemovals[index] Repository URL: https://bitbucket.org/nvdaaddonteam/nvda/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email.