Author: bugman Date: Mon Apr 16 00:14:07 2012 New Revision: 15718 URL: http://svn.gna.org/viewcvs/relax?rev=15718&view=rev Log: Created the Tools->System Information menu entry, which is simply the sys_info user function front end. Modified: 1.3/gui/menu.py Modified: 1.3/gui/menu.py URL: http://svn.gna.org/viewcvs/relax/1.3/gui/menu.py?rev=15718&r1=15717&r2=15718&view=diff ============================================================================== --- 1.3/gui/menu.py (original) +++ 1.3/gui/menu.py Mon Apr 16 00:14:07 2012 @@ -1,7 +1,7 @@ ############################################################################### # # # Copyright (C) 2009 Michael Bieri # -# Copyright (C) 2010-2011 Edward d'Auvergne # +# Copyright (C) 2010-2012 Edward d'Auvergne # # # # This file is part of the program relax. # # # @@ -54,6 +54,7 @@ MENU_VIEW_PROMPT = wx.NewId() MENU_TOOLS_FORMAT = wx.NewId() MENU_TOOLS_TEST_SUITE = wx.NewId() + MENU_TOOLS_SYS_INFO = wx.NewId() MENU_HELP_MANUAL = wx.NewId() MENU_HELP_MAIL = wx.NewId() MENU_HELP_REFS = wx.NewId() @@ -114,11 +115,13 @@ # The 'Tools' menu entries. menu = wx.Menu() menu.AppendItem(build_menu_item(menu, id=self.MENU_TOOLS_FORMAT, text="&Free file format settings", icon=paths.icon_16x16.document_properties)) + menu.AppendItem(build_menu_item(menu, id=self.MENU_TOOLS_SYS_INFO, text="System &information", icon=paths.icon_16x16.help_about)) menu.AppendItem(build_menu_item(menu, id=self.MENU_TOOLS_TEST_SUITE, text="&Test suite", icon=paths.icon_16x16.uf_script)) self.menubar.Append(menu, "&Tools") # The 'Tools' menu actions. self.gui.Bind(wx.EVT_MENU, self.gui.free_file_format_settings, id=self.MENU_TOOLS_FORMAT) + self.gui.Bind(wx.EVT_MENU, self._sys_info, id=self.MENU_TOOLS_SYS_INFO) self.gui.Bind(wx.EVT_MENU, self.gui.run_test_suite, id=self.MENU_TOOLS_TEST_SUITE) # The 'Help' menu entries. @@ -201,6 +204,20 @@ self.gui.show_controller(event) + def _sys_info(self, event): + """Show the full system information using the sys_info user function. + + @param event: The wx event. + @type event: wx event + """ + + # The user functions. + user_functions = User_functions(self.gui) + + # Launch the user functions. + user_functions.sys_info.sys_info() + + def _user_functions(self): """Build the user function sub-menu."""