@@ -171,13 +171,16 @@ def _popupSettingsDialog(self, dialog, *args, **kwargs):
171171 self .postPopup ()
172172
173173 def onDefaultDictionaryCommand (self ,evt ):
174- self ._popupSettingsDialog (DefaultDictionaryDialog )
174+ if not globalVars .appArgs .secure :
175+ self ._popupSettingsDialog (DefaultDictionaryDialog )
175176
176177 def onVoiceDictionaryCommand (self ,evt ):
177- self ._popupSettingsDialog (VoiceDictionaryDialog )
178+ if not globalVars .appArgs .secure :
179+ self ._popupSettingsDialog (VoiceDictionaryDialog )
178180
179181 def onTemporaryDictionaryCommand (self ,evt ):
180- self ._popupSettingsDialog (TemporaryDictionaryDialog )
182+ if not globalVars .appArgs .secure :
183+ self ._popupSettingsDialog (TemporaryDictionaryDialog )
181184
182185 def onExecuteUpdateCommand (self , evt ):
183186 if updateCheck and updateCheck .isPendingUpdate ():
@@ -266,7 +269,8 @@ def onSpeechSymbolsCommand(self, evt):
266269 self ._popupSettingsDialog (SpeechSymbolsDialog )
267270
268271 def onInputGesturesCommand (self , evt ):
269- self ._popupSettingsDialog (InputGesturesDialog )
272+ if not globalVars .appArgs .secure :
273+ self ._popupSettingsDialog (InputGesturesDialog )
270274
271275 def onAboutCommand (self ,evt ):
272276 # Translators: The title of the dialog to show about info for NVDA.
@@ -395,8 +399,9 @@ def __init__(self, frame: MainFrame):
395399 # Translators: The description for the menu item to open NVDA Settings dialog.
396400 _ ("NVDA settings" ))
397401 self .Bind (wx .EVT_MENU , frame .onNVDASettingsCommand , item )
398- subMenu_speechDicts = wx .Menu ()
399402 if not globalVars .appArgs .secure :
403+ # TODO: This code should be moved out into a createSpeechDictsSubMenu function
404+ subMenu_speechDicts = wx .Menu ()
400405 item = subMenu_speechDicts .Append (
401406 wx .ID_ANY ,
402407 # Translators: The label for the menu item to open Default speech dictionary dialog.
@@ -417,16 +422,16 @@ def __init__(self, frame: MainFrame):
417422 )
418423 )
419424 self .Bind (wx .EVT_MENU , frame .onVoiceDictionaryCommand , item )
420- item = subMenu_speechDicts .Append (
421- wx .ID_ANY ,
422- # Translators: The label for the menu item to open Temporary speech dictionary dialog.
423- _ ("&Temporary dictionary..." ),
424- # Translators: The help text for the menu item to open Temporary speech dictionary dialog.
425- _ ("A dialog where you can set temporary dictionary by adding dictionary entries to the edit box" )
426- )
427- self .Bind (wx .EVT_MENU , frame .onTemporaryDictionaryCommand , item )
428- # Translators: The label for a submenu under NvDA Preferences menu to select speech dictionaries.
429- menu_preferences .AppendSubMenu (subMenu_speechDicts ,_ ("Speech &dictionaries" ))
425+ item = subMenu_speechDicts .Append (
426+ wx .ID_ANY ,
427+ # Translators: The label for the menu item to open Temporary speech dictionary dialog.
428+ _ ("&Temporary dictionary..." ),
429+ # Translators: The help text for the menu item to open Temporary speech dictionary dialog.
430+ _ ("A dialog where you can set temporary dictionary by adding dictionary entries to the edit box" )
431+ )
432+ self .Bind (wx .EVT_MENU , frame .onTemporaryDictionaryCommand , item )
433+ # Translators: The label for a submenu under NvDA Preferences menu to select speech dictionaries.
434+ menu_preferences .AppendSubMenu (subMenu_speechDicts ,_ ("Speech &dictionaries" ))
430435 if not globalVars .appArgs .secure :
431436 # Translators: The label for the menu item to open Punctuation/symbol pronunciation dialog.
432437 item = menu_preferences .Append (wx .ID_ANY , _ ("&Punctuation/symbol pronunciation..." ))
0 commit comments