OSDN Git Service

The NVDA Preferences, Tools and Help menus are now accessible as attributes on gui...
authorJames Teh <jamie@jantrid.net>
Tue, 14 Aug 2012 05:10:14 +0000 (15:10 +1000)
committerJames Teh <jamie@jantrid.net>
Tue, 14 Aug 2012 05:10:14 +0000 (15:10 +1000)
source/gui/__init__.py
user_docs/en/changes.t2t

index 1a78b29..63343fb 100644 (file)
@@ -276,7 +276,7 @@ class SysTrayIcon(wx.TaskBarIcon):
                self.SetIcon(icon, versionInfo.name)\r
 \r
                self.menu=wx.Menu()\r
-               menu_preferences=wx.Menu()\r
+               menu_preferences=self.preferencesMenu=wx.Menu()\r
                item = menu_preferences.Append(wx.ID_ANY,_("&General settings..."),_("General settings"))\r
                self.Bind(wx.EVT_MENU, frame.onGeneralSettingsCommand, item)\r
                item = menu_preferences.Append(wx.ID_ANY,_("&Synthesizer..."),_("Change the synthesizer to be used"))\r
@@ -311,7 +311,7 @@ class SysTrayIcon(wx.TaskBarIcon):
                        self.Bind(wx.EVT_MENU, frame.onSpeechSymbolsCommand, item)\r
                self.menu.AppendMenu(wx.ID_ANY,_("&Preferences"),menu_preferences)\r
 \r
-               menu_tools = wx.Menu()\r
+               menu_tools = self.toolsMenu = wx.Menu()\r
                if not globalVars.appArgs.secure:\r
                        item = menu_tools.Append(wx.ID_ANY, _("View log"))\r
                        self.Bind(wx.EVT_MENU, frame.onViewLogCommand, item)\r
@@ -333,7 +333,7 @@ class SysTrayIcon(wx.TaskBarIcon):
                self.Bind(wx.EVT_MENU, frame.onReloadPluginsCommand, item)\r
                self.menu.AppendMenu(wx.ID_ANY, _("Tools"), menu_tools)\r
 \r
-               menu_help = wx.Menu()\r
+               menu_help = self.helpMenu = wx.Menu()\r
                if not globalVars.appArgs.secure:\r
                        item = menu_help.Append(wx.ID_ANY, _("User Guide"))\r
                        self.Bind(wx.EVT_MENU, lambda evt: os.startfile(getDocFilePath("userGuide.html")), item)\r
index 6ebaff9..c390601 100644 (file)
@@ -63,6 +63,7 @@
 == Changes for Developers ==\r
 - Previous log file is now copied to nvda-old.log on NVDA initialization. Therefore, if NVDA crashes or is restarted, logging information from that session is still accessible for inspection. (#916)\r
 - Fetching the role property in chooseNVDAObjectOverlayClasses no longer causes the role to be incorrect and thus not reported on focus for certain objects such as Windows command consoles and Scintilla controls. (#2569)\r
+- The NVDA Preferences, Tools and Help menus are now accessible as attributes on gui.mainFrame.sysTrayIcon named preferencesMenu, toolsMenu and helpMenu, respectively. This allows plugins to more easily add items to these menus.\r
 \r
 \r
 = 2012.2.1 =\r