Changeset cbf22e5 in sasview
- Timestamp:
- Jan 31, 2011 5:13:21 PM (14 years ago)
- Branches:
- master, ESS_GUI, ESS_GUI_Docs, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_iss879, ESS_GUI_iss959, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc, costrafo411, magnetic_scatt, release-4.1.1, release-4.1.2, release-4.2.2, release_4.0.1, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
- Children:
- 2399b2a
- Parents:
- bf4402c3
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
guiframe/gui_manager.py
rbf4402c3 rcbf22e5 53 53 54 54 55 56 55 class ViewerFrame(wx.Frame): 57 56 """ … … 104 103 self._help_menu = None 105 104 self._tool_menu = None 106 self._plugin_menu _list = []105 self._plugin_menu = None 107 106 ## Find plug-ins 108 107 # Modify this so that we can specify the directory to look into … … 372 371 self._mgr.AddPane(p, wx.aui.AuiPaneInfo(). 373 372 Name(p.window_name).Caption(p.window_caption). 374 Center(). 375 CloseButton(True). 373 CenterPane(). 376 374 MinSize(wx.Size(w, h)). 377 375 Hide()) … … 477 475 self._add_menu_data() 478 476 self._add_menu_application() 479 self._add_current_plugin_menu()480 477 self._add_menu_tool() 481 478 self._add_menu_window() 482 479 self._add_help_menu() 480 self._add_current_plugin_menu() 483 481 self.SetMenuBar(self._menubar) 484 482 … … 506 504 """ 507 505 add current plugin menu 508 """ 509 # Look for plug-in menus 510 # Add available plug-in sub-menus. 511 for item in self.plugins: 512 if item != self._plotting_plugin: 513 for (menu, name) in \ 514 item.populate_menu(self): 515 self._menubar.Append(menu, name) 516 506 Look for plug-in menus 507 Add available plug-in sub-menus. 508 """ 509 if self._menubar is None: 510 return 511 512 pos = self._menubar.GetMenuCount() 513 if self._current_perspective is not None: 514 if self._current_perspective != self._plotting_plugin: 515 menu_list = self._current_perspective.populate_menu(self) 516 if menu_list: 517 for (menu, name) in menu_list: 518 self._plugin_menu = self._menubar.Append(menu, 'Others') 519 #else: 520 # self._plugin_menu = self._menubar.Append(wx.Menu(), 'all') 521 #else: 522 # self._plugin_menu = self._menubar.Insert(pos, wx.Menu(), 'all') 523 517 524 def _add_help_menu(self): 518 525 """ … … 976 983 :param panels: list of panels 977 984 """ 978 979 985 for item in self.panels: 980 986 # Check whether this is a sticky panel … … 1130 1136 self._current_perspective = perspective 1131 1137 name = "No current Application selected" 1132 if self._current_perspective is not None and \ 1133 self._data_panel is not None: 1134 name = self._current_perspective.sub_menu 1135 self._data_panel.set_active_perspective(name) 1138 if self._current_perspective is not None: 1139 self._add_current_plugin_menu() 1140 if self._data_panel is not None: 1141 name = self._current_perspective.sub_menu 1142 self._data_panel.set_active_perspective(name) 1136 1143 1137 1144 def set_plotpanel_floating(self, event=None):
Note: See TracChangeset
for help on using the changeset viewer.