class OCRMultiCategorySettingsDialog(NVDASettingsDialog): # Translators: This is the label for the NVDA settings dialog. title = _("Online Image Describer Settings") categoryClasses = [ CustomOCRPanel, OnlineOCRPanel, OnlineImageDescriberPanel, ] if winVersion.isUwpOcrAvailable(): categoryClasses.append(UwpOcrPanel)
def getCurrentEngine(self, current_engine_type): if winVersion.isUwpOcrAvailable() and current_engine_type == "win10OCR": engine = self.uwpOCREngine elif current_engine_type == "onlineOCR": engine = self.ocrHandler.getCurrentEngine() elif current_engine_type == "onlineImageDescriber": engine = self.descHandler.getCurrentEngine() else: engine = None return engine
def script_toggleAutoOCR(self, gesture): import winVersion import ui if not winVersion.isUwpOcrAvailable(): # Translators: Reported when Windows 10 OCR is not available. ui.message(_("Windows 10 OCR not available")) return if self.autoOCREnabled: self.autoOCREnabled = False # Translators: Reported when auto OCR is disabled ui.message(_("Auto OCR Disabled")) else: if self.isScreenCurtainRunning(): ui.message(_("Please disable screen curtain before using Windows 10 OCR.")) return self.autoOCREnabled = True # Translators: Reported when auto OCR is enabled ui.message(_("Auto OCR Enabled"))
def script_cancelCurrentRecognition(self, gesture): ocrEngine = self.ocrHandler.getCurrentEngine() describeEngine = self.descHandler.getCurrentEngine() if ocrEngine.networkThread: # Translators: Reported when cancelling recognition ui.message(_("OCR cancelled")) ocrEngine.cancel() elif describeEngine.networkThread: # Translators: Reported when cancelling recognition ui.message(_("Image describe cancelled")) describeEngine.cancel() elif winVersion.isUwpOcrAvailable() and recogUi._activeRecog: # Translators: Reported when cancelling recognition ui.message(_("OCR cancelled")) uwpOcr.UwpOcr.cancel(self.uwpOCREngine) recogUi._activeRecog = None else: # Translators: Reported when cancelling recognition ui.message(_("There is no recognition ongoing."))
def __init__(self): super(GlobalPlugin, self).__init__() if globalVars.appArgs.secure: return if config.isAppX: return config.conf.spec["onlineOCRGeneral"] = generalConfigSpec CustomOCRHandler.initialize() self.ocrHandler = CustomOCRHandler msg = u"OCR engine:\n{0}\n".format(self.ocrHandler.currentEngine) OnlineImageDescriberHandler.initialize() self.descHandler = OnlineImageDescriberHandler msg += u"Describe ocrHandler:\n{0}\n".format(self.descHandler.currentEngine) log.debug(msg) if winVersion.isUwpOcrAvailable(): self.uwpOCREngine = uwpOcr.UwpOcr() self.ocrSettingMenuItem = gui.mainFrame.sysTrayIcon.preferencesMenu.Append( wx.ID_NEW, # Translators: The label for the menu item to open online image settings dialog. _("Open &OnlineImageDescriber settings"), _("Open settings dialog for OnlineImageDescriber") ) gui.mainFrame.sysTrayIcon.Bind(wx.EVT_MENU, self.openSettingsDialog, self.ocrSettingMenuItem)
def __init__(self, frame): super(SysTrayIcon, self).__init__() icon = wx.Icon(ICON_PATH, wx.BITMAP_TYPE_ICO) self.SetIcon(icon, versionInfo.name) self.menu = wx.Menu() menu_preferences = self.preferencesMenu = wx.Menu() # Translators: The label for the menu item to open general Settings dialog. item = menu_preferences.Append(wx.ID_ANY, _("&General settings..."), _("General settings")) self.Bind(wx.EVT_MENU, frame.onGeneralSettingsCommand, item) # Translators: The label for the menu item to open Synthesizer settings dialog. item = menu_preferences.Append(wx.ID_ANY, _("&Synthesizer..."), _("Change the synthesizer to be used")) self.Bind(wx.EVT_MENU, frame.onSynthesizerCommand, item) # Translators: The label for the menu item to open Voice Settings dialog. item = menu_preferences.Append( wx.ID_ANY, _("&Voice settings..."), _("Choose the voice, rate, pitch and volume to use")) self.Bind(wx.EVT_MENU, frame.onVoiceCommand, item) # Translators: The label for the menu item to open Braille Settings dialog. item = menu_preferences.Append(wx.ID_ANY, _("B&raille settings...")) self.Bind(wx.EVT_MENU, frame.onBrailleCommand, item) # Translators: The label for the menu item to open Keyboard Settings dialog. item = menu_preferences.Append( wx.ID_ANY, _("&Keyboard settings..."), _("Configure keyboard layout, speaking of typed characters, words or command keys" )) self.Bind(wx.EVT_MENU, frame.onKeyboardSettingsCommand, item) # Translators: The label for the menu item to open Mouse Settings dialog. item = menu_preferences.Append( wx.ID_ANY, _("&Mouse settings..."), _("Change reporting of mouse shape and object under mouse")) self.Bind(wx.EVT_MENU, frame.onMouseSettingsCommand, item) # Translators: The label for the menu item to open Review Cursor dialog. item = menu_preferences.Append( wx.ID_ANY, _("Review &cursor..."), _("Configure how and when the review cursor moves")) self.Bind(wx.EVT_MENU, frame.onReviewCursorCommand, item) # Translators: The label for the menu item to open Input Composition Settings dialog. item = menu_preferences.Append( wx.ID_ANY, _("&Input composition settings..."), _("Configure how NVDA reports input composition and candidate selection for certain languages" )) self.Bind(wx.EVT_MENU, frame.onInputCompositionCommand, item) # Translators: The label for the menu item to open Object Presentation dialog. item = menu_preferences.Append(wx.ID_ANY, _("&Object presentation..."), _("Change reporting of objects")) self.Bind(wx.EVT_MENU, frame.onObjectPresentationCommand, item) # Translators: The label for the menu item to open Browse Mode settings dialog. item = menu_preferences.Append( wx.ID_ANY, _("&Browse mode..."), _("Change virtual buffers specific settings")) self.Bind(wx.EVT_MENU, frame.onBrowseModeCommand, item) # Translators: The label for the menu item to open Document Formatting settings dialog. item = menu_preferences.Append( wx.ID_ANY, _("Document &formatting..."), _("Change settings of document properties")) self.Bind(wx.EVT_MENU, frame.onDocumentFormattingCommand, item) if winVersion.isUwpOcrAvailable(): # Translators: The label for the menu item to open the Windows 10 OCR settings dialog. item = menu_preferences.Append(wx.ID_ANY, _("Windows 10 OCR...")) self.Bind(wx.EVT_MENU, frame.onUwpOcrCommand, item) subMenu_speechDicts = wx.Menu() if not globalVars.appArgs.secure: # Translators: The label for the menu item to open Default speech dictionary dialog. item = subMenu_speechDicts.Append( wx.ID_ANY, _("&Default dictionary..."), _("A dialog where you can set default dictionary by adding dictionary entries to the list" )) self.Bind(wx.EVT_MENU, frame.onDefaultDictionaryCommand, item) # Translators: The label for the menu item to open Voice specific speech dictionary dialog. item = subMenu_speechDicts.Append( wx.ID_ANY, _("&Voice dictionary..."), _("A dialog where you can set voice-specific dictionary by adding dictionary entries to the list" )) self.Bind(wx.EVT_MENU, frame.onVoiceDictionaryCommand, item) # Translators: The label for the menu item to open Temporary speech dictionary dialog. item = subMenu_speechDicts.Append( wx.ID_ANY, _("&Temporary dictionary..."), _("A dialog where you can set temporary dictionary by adding dictionary entries to the edit box" )) self.Bind(wx.EVT_MENU, frame.onTemporaryDictionaryCommand, item) # Translators: The label for a submenu under NvDA Preferences menu to select speech dictionaries. menu_preferences.AppendMenu(wx.ID_ANY, _("Speech &dictionaries"), subMenu_speechDicts) if not globalVars.appArgs.secure: # Translators: The label for the menu item to open Punctuation/symbol pronunciation dialog. item = menu_preferences.Append( wx.ID_ANY, _("&Punctuation/symbol pronunciation...")) self.Bind(wx.EVT_MENU, frame.onSpeechSymbolsCommand, item) # Translators: The label for the menu item to open the Input Gestures dialog. item = menu_preferences.Append(wx.ID_ANY, _("I&nput gestures...")) self.Bind(wx.EVT_MENU, frame.onInputGesturesCommand, item) # Translators: The label for Preferences submenu in NVDA menu. self.menu.AppendMenu(wx.ID_ANY, _("&Preferences"), menu_preferences) menu_tools = self.toolsMenu = wx.Menu() if not globalVars.appArgs.secure: # Translators: The label for the menu item to open NVDA Log Viewer. item = menu_tools.Append(wx.ID_ANY, _("View log")) self.Bind(wx.EVT_MENU, frame.onViewLogCommand, item) # Translators: The label for the menu item to toggle Speech Viewer. item = self.menu_tools_toggleSpeechViewer = menu_tools.AppendCheckItem( wx.ID_ANY, _("Speech viewer")) self.Bind(wx.EVT_MENU, frame.onToggleSpeechViewerCommand, item) if not globalVars.appArgs.secure: # Translators: The label for the menu item to open NVDA Python Console. item = menu_tools.Append(wx.ID_ANY, _("Python console")) self.Bind(wx.EVT_MENU, frame.onPythonConsoleCommand, item) # Translators: The label of a menu item to open the Add-ons Manager. item = menu_tools.Append(wx.ID_ANY, _("Manage &add-ons...")) self.Bind(wx.EVT_MENU, frame.onAddonsManagerCommand, item) if not globalVars.appArgs.secure and getattr(sys, 'frozen', None): # Translators: The label for the menu item to create a portable copy of NVDA from an installed or another portable version. item = menu_tools.Append(wx.ID_ANY, _("Create portable copy...")) self.Bind(wx.EVT_MENU, frame.onCreatePortableCopyCommand, item) if not config.isInstalledCopy(): # Translators: The label for the menu item to install NVDA on the computer. item = menu_tools.Append(wx.ID_ANY, _("&Install NVDA...")) self.Bind(wx.EVT_MENU, frame.onInstallCommand, item) # Translators: The label for the menu item to reload plugins. item = menu_tools.Append(wx.ID_ANY, _("Reload plugins")) self.Bind(wx.EVT_MENU, frame.onReloadPluginsCommand, item) # Translators: The label for the Tools submenu in NVDA menu. self.menu.AppendMenu(wx.ID_ANY, _("Tools"), menu_tools) menu_help = self.helpMenu = wx.Menu() if not globalVars.appArgs.secure: # Translators: The label of a menu item to open NVDA user guide. item = menu_help.Append(wx.ID_ANY, _("&User Guide")) self.Bind( wx.EVT_MENU, lambda evt: os.startfile(getDocFilePath("userGuide.html")), item) # Translators: The label of a menu item to open the Commands Quick Reference document. item = menu_help.Append(wx.ID_ANY, _("Commands &Quick Reference")) self.Bind( wx.EVT_MENU, lambda evt: os.startfile(getDocFilePath("keyCommands.html")), item) # Translators: The label for the menu item to open What's New document. item = menu_help.Append(wx.ID_ANY, _("What's &new")) self.Bind(wx.EVT_MENU, lambda evt: os.startfile(getDocFilePath("changes.html")), item) item = menu_help.Append(wx.ID_ANY, _("NVDA &web site")) self.Bind(wx.EVT_MENU, lambda evt: os.startfile("http://www.nvda-project.org/"), item) # Translators: The label for the menu item to view NVDA License document. item = menu_help.Append(wx.ID_ANY, _("L&icense")) self.Bind( wx.EVT_MENU, lambda evt: os.startfile(getDocFilePath("copying.txt", False)), item) # Translators: The label for the menu item to view NVDA Contributors list document. item = menu_help.Append(wx.ID_ANY, _("C&ontributors")) self.Bind( wx.EVT_MENU, lambda evt: os.startfile( getDocFilePath("contributors.txt", False)), item) # Translators: The label for the menu item to open NVDA Welcome Dialog. item = menu_help.Append(wx.ID_ANY, _("We&lcome dialog...")) self.Bind(wx.EVT_MENU, lambda evt: WelcomeDialog.run(), item) menu_help.AppendSeparator() if updateCheck: # Translators: The label of a menu item to manually check for an updated version of NVDA. item = menu_help.Append(wx.ID_ANY, _("&Check for update...")) self.Bind(wx.EVT_MENU, frame.onCheckForUpdateCommand, item) # Translators: The label for the menu item to open About dialog to get information about NVDA. item = menu_help.Append(wx.ID_ABOUT, _("About..."), _("About NVDA")) self.Bind(wx.EVT_MENU, frame.onAboutCommand, item) # Translators: The label for the Help submenu in NVDA menu. self.menu.AppendMenu(wx.ID_ANY, _("&Help"), menu_help) self.menu.AppendSeparator() # Translators: The label for the menu item to open the Configuration Profiles dialog. item = self.menu.Append(wx.ID_ANY, _("&Configuration profiles...")) self.Bind(wx.EVT_MENU, frame.onConfigProfilesCommand, item) # Translators: The label for the menu item to revert to saved configuration. item = self.menu.Append(wx.ID_ANY, _("&Revert to saved configuration"), _("Reset all settings to saved state")) self.Bind(wx.EVT_MENU, frame.onRevertToSavedConfigurationCommand, item) if not globalVars.appArgs.secure: # Translators: The label for the menu item to reset settings to default settings. # Here, default settings means settings that were there when the user first used NVDA. item = self.menu.Append( wx.ID_ANY, _("&Reset configuration to factory defaults"), _("Reset all settings to default state")) self.Bind(wx.EVT_MENU, frame.onRevertToDefaultConfigurationCommand, item) # Translators: The label for the menu item to save current settings. item = self.menu.Append( wx.ID_SAVE, _("&Save configuration"), _("Write the current configuration to nvda.ini")) self.Bind(wx.EVT_MENU, frame.onSaveConfigurationCommand, item) if not globalVars.appArgs.secure: self.menu.AppendSeparator() # Translators: The label for the menu item to open donate page. item = self.menu.Append(wx.ID_ANY, _("Donate")) self.Bind(wx.EVT_MENU, lambda evt: os.startfile(DONATE_URL), item) self.menu.AppendSeparator() item = self.menu.Append(wx.ID_EXIT, _("E&xit"), _("Exit NVDA")) self.Bind(wx.EVT_MENU, frame.onExitCommand, item) self.Bind(wx.EVT_TASKBAR_LEFT_DOWN, self.onActivate) self.Bind(wx.EVT_TASKBAR_RIGHT_DOWN, self.onActivate)
def __init__(self, frame): super(SysTrayIcon, self).__init__() icon=wx.Icon(ICON_PATH,wx.BITMAP_TYPE_ICO) self.SetIcon(icon, versionInfo.name) self.menu=wx.Menu() menu_preferences=self.preferencesMenu=wx.Menu() # Translators: The label for the menu item to open general Settings dialog. item = menu_preferences.Append(wx.ID_ANY,_("&General settings..."),_("General settings")) self.Bind(wx.EVT_MENU, frame.onGeneralSettingsCommand, item) # Translators: The label for the menu item to open Synthesizer settings dialog. item = menu_preferences.Append(wx.ID_ANY,_("&Synthesizer..."),_("Change the synthesizer to be used")) self.Bind(wx.EVT_MENU, frame.onSynthesizerCommand, item) # Translators: The label for the menu item to open Voice Settings dialog. item = menu_preferences.Append(wx.ID_ANY,_("&Voice settings..."),_("Choose the voice, rate, pitch and volume to use")) self.Bind(wx.EVT_MENU, frame.onVoiceCommand, item) # Translators: The label for the menu item to open Braille Settings dialog. item = menu_preferences.Append(wx.ID_ANY,_("B&raille settings...")) self.Bind(wx.EVT_MENU, frame.onBrailleCommand, item) # Translators: The label for the menu item to open Keyboard Settings dialog. item = menu_preferences.Append(wx.ID_ANY,_("&Keyboard settings..."),_("Configure keyboard layout, speaking of typed characters, words or command keys")) self.Bind(wx.EVT_MENU, frame.onKeyboardSettingsCommand, item) # Translators: The label for the menu item to open Mouse Settings dialog. item = menu_preferences.Append(wx.ID_ANY, _("&Mouse settings..."),_("Change reporting of mouse shape and object under mouse")) self.Bind(wx.EVT_MENU, frame.onMouseSettingsCommand, item) # Translators: The label for the menu item to open Review Cursor dialog. item = menu_preferences.Append(wx.ID_ANY,_("Review &cursor..."),_("Configure how and when the review cursor moves")) self.Bind(wx.EVT_MENU, frame.onReviewCursorCommand, item) # Translators: The label for the menu item to open Input Composition Settings dialog. item = menu_preferences.Append(wx.ID_ANY,_("&Input composition settings..."),_("Configure how NVDA reports input composition and candidate selection for certain languages")) self.Bind(wx.EVT_MENU, frame.onInputCompositionCommand, item) # Translators: The label for the menu item to open Object Presentation dialog. item = menu_preferences.Append(wx.ID_ANY,_("&Object presentation..."),_("Change reporting of objects")) self.Bind(wx.EVT_MENU, frame.onObjectPresentationCommand, item) # Translators: The label for the menu item to open Browse Mode settings dialog. item = menu_preferences.Append(wx.ID_ANY,_("&Browse mode..."),_("Change virtual buffers specific settings")) self.Bind(wx.EVT_MENU, frame.onBrowseModeCommand, item) # Translators: The label for the menu item to open Document Formatting settings dialog. item = menu_preferences.Append(wx.ID_ANY,_("Document &formatting..."),_("Change settings of document properties")) self.Bind(wx.EVT_MENU, frame.onDocumentFormattingCommand, item) if winVersion.isUwpOcrAvailable(): # Translators: The label for the menu item to open the Windows 10 OCR settings dialog. item = menu_preferences.Append(wx.ID_ANY, _("Windows 10 OCR...")) self.Bind(wx.EVT_MENU, frame.onUwpOcrCommand, item) subMenu_speechDicts = wx.Menu() if not globalVars.appArgs.secure: # Translators: The label for the menu item to open Default speech dictionary dialog. item = subMenu_speechDicts.Append(wx.ID_ANY,_("&Default dictionary..."),_("A dialog where you can set default dictionary by adding dictionary entries to the list")) self.Bind(wx.EVT_MENU, frame.onDefaultDictionaryCommand, item) # Translators: The label for the menu item to open Voice specific speech dictionary dialog. item = subMenu_speechDicts.Append(wx.ID_ANY,_("&Voice dictionary..."),_("A dialog where you can set voice-specific dictionary by adding dictionary entries to the list")) self.Bind(wx.EVT_MENU, frame.onVoiceDictionaryCommand, item) # Translators: The label for the menu item to open Temporary speech dictionary dialog. item = subMenu_speechDicts.Append(wx.ID_ANY,_("&Temporary dictionary..."),_("A dialog where you can set temporary dictionary by adding dictionary entries to the edit box")) self.Bind(wx.EVT_MENU, frame.onTemporaryDictionaryCommand, item) # Translators: The label for a submenu under NvDA Preferences menu to select speech dictionaries. menu_preferences.AppendMenu(wx.ID_ANY,_("Speech &dictionaries"),subMenu_speechDicts) if not globalVars.appArgs.secure: # Translators: The label for the menu item to open Punctuation/symbol pronunciation dialog. item = menu_preferences.Append(wx.ID_ANY, _("&Punctuation/symbol pronunciation...")) self.Bind(wx.EVT_MENU, frame.onSpeechSymbolsCommand, item) # Translators: The label for the menu item to open the Input Gestures dialog. item = menu_preferences.Append(wx.ID_ANY, _("I&nput gestures...")) self.Bind(wx.EVT_MENU, frame.onInputGesturesCommand, item) # Translators: The label for Preferences submenu in NVDA menu. self.menu.AppendMenu(wx.ID_ANY,_("&Preferences"),menu_preferences) menu_tools = self.toolsMenu = wx.Menu() if not globalVars.appArgs.secure: # Translators: The label for the menu item to open NVDA Log Viewer. item = menu_tools.Append(wx.ID_ANY, _("View log")) self.Bind(wx.EVT_MENU, frame.onViewLogCommand, item) # Translators: The label for the menu item to toggle Speech Viewer. item=self.menu_tools_toggleSpeechViewer = menu_tools.AppendCheckItem(wx.ID_ANY, _("Speech viewer")) self.Bind(wx.EVT_MENU, frame.onToggleSpeechViewerCommand, item) if not globalVars.appArgs.secure: # Translators: The label for the menu item to open NVDA Python Console. item = menu_tools.Append(wx.ID_ANY, _("Python console")) self.Bind(wx.EVT_MENU, frame.onPythonConsoleCommand, item) # Translators: The label of a menu item to open the Add-ons Manager. item = menu_tools.Append(wx.ID_ANY, _("Manage &add-ons...")) self.Bind(wx.EVT_MENU, frame.onAddonsManagerCommand, item) if not globalVars.appArgs.secure and getattr(sys,'frozen',None): # Translators: The label for the menu item to create a portable copy of NVDA from an installed or another portable version. item = menu_tools.Append(wx.ID_ANY, _("Create portable copy...")) self.Bind(wx.EVT_MENU, frame.onCreatePortableCopyCommand, item) if not config.isInstalledCopy(): # Translators: The label for the menu item to install NVDA on the computer. item = menu_tools.Append(wx.ID_ANY, _("&Install NVDA...")) self.Bind(wx.EVT_MENU, frame.onInstallCommand, item) # Translators: The label for the menu item to reload plugins. item = menu_tools.Append(wx.ID_ANY, _("Reload plugins")) self.Bind(wx.EVT_MENU, frame.onReloadPluginsCommand, item) # Translators: The label for the Tools submenu in NVDA menu. self.menu.AppendMenu(wx.ID_ANY, _("Tools"), menu_tools) menu_help = self.helpMenu = wx.Menu() if not globalVars.appArgs.secure: # Translators: The label of a menu item to open NVDA user guide. item = menu_help.Append(wx.ID_ANY, _("&User Guide")) self.Bind(wx.EVT_MENU, lambda evt: os.startfile(getDocFilePath("userGuide.html")), item) # Translators: The label of a menu item to open the Commands Quick Reference document. item = menu_help.Append(wx.ID_ANY, _("Commands &Quick Reference")) self.Bind(wx.EVT_MENU, lambda evt: os.startfile(getDocFilePath("keyCommands.html")), item) # Translators: The label for the menu item to open What's New document. item = menu_help.Append(wx.ID_ANY, _("What's &new")) self.Bind(wx.EVT_MENU, lambda evt: os.startfile(getDocFilePath("changes.html")), item) item = menu_help.Append(wx.ID_ANY, _("NVDA &web site")) self.Bind(wx.EVT_MENU, lambda evt: os.startfile("http://www.nvda-project.org/"), item) # Translators: The label for the menu item to view NVDA License document. item = menu_help.Append(wx.ID_ANY, _("L&icense")) self.Bind(wx.EVT_MENU, lambda evt: os.startfile(getDocFilePath("copying.txt", False)), item) # Translators: The label for the menu item to view NVDA Contributors list document. item = menu_help.Append(wx.ID_ANY, _("C&ontributors")) self.Bind(wx.EVT_MENU, lambda evt: os.startfile(getDocFilePath("contributors.txt", False)), item) # Translators: The label for the menu item to open NVDA Welcome Dialog. item = menu_help.Append(wx.ID_ANY, _("We&lcome dialog...")) self.Bind(wx.EVT_MENU, lambda evt: WelcomeDialog.run(), item) menu_help.AppendSeparator() if updateCheck: # Translators: The label of a menu item to manually check for an updated version of NVDA. item = menu_help.Append(wx.ID_ANY, _("&Check for update...")) self.Bind(wx.EVT_MENU, frame.onCheckForUpdateCommand, item) # Translators: The label for the menu item to open About dialog to get information about NVDA. item = menu_help.Append(wx.ID_ABOUT, _("About..."), _("About NVDA")) self.Bind(wx.EVT_MENU, frame.onAboutCommand, item) # Translators: The label for the Help submenu in NVDA menu. self.menu.AppendMenu(wx.ID_ANY,_("&Help"),menu_help) self.menu.AppendSeparator() # Translators: The label for the menu item to open the Configuration Profiles dialog. item = self.menu.Append(wx.ID_ANY, _("&Configuration profiles...")) self.Bind(wx.EVT_MENU, frame.onConfigProfilesCommand, item) # Translators: The label for the menu item to revert to saved configuration. item = self.menu.Append(wx.ID_ANY, _("&Revert to saved configuration"),_("Reset all settings to saved state")) self.Bind(wx.EVT_MENU, frame.onRevertToSavedConfigurationCommand, item) if not globalVars.appArgs.secure: # Translators: The label for the menu item to reset settings to default settings. # Here, default settings means settings that were there when the user first used NVDA. item = self.menu.Append(wx.ID_ANY, _("&Reset configuration to factory defaults"),_("Reset all settings to default state")) self.Bind(wx.EVT_MENU, frame.onRevertToDefaultConfigurationCommand, item) # Translators: The label for the menu item to save current settings. item = self.menu.Append(wx.ID_SAVE, _("&Save configuration"), _("Write the current configuration to nvda.ini")) self.Bind(wx.EVT_MENU, frame.onSaveConfigurationCommand, item) if not globalVars.appArgs.secure: self.menu.AppendSeparator() # Translators: The label for the menu item to open donate page. item = self.menu.Append(wx.ID_ANY, _("Donate")) self.Bind(wx.EVT_MENU, lambda evt: os.startfile(DONATE_URL), item) self.menu.AppendSeparator() item = self.menu.Append(wx.ID_EXIT, _("E&xit"),_("Exit NVDA")) self.Bind(wx.EVT_MENU, frame.onExitCommand, item) self.Bind(wx.EVT_TASKBAR_LEFT_DOWN, self.onActivate) self.Bind(wx.EVT_TASKBAR_RIGHT_DOWN, self.onActivate)