Changeset 4c0572f in sasview
- Timestamp:
- Feb 25, 2011 2:03:57 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:
- 8a7d922
- Parents:
- 97ec26b
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
guiframe/gui_manager.py
re75b5fa r4c0572f 108 108 self._tool_menu = None 109 109 self._applications_menu_pos = -1 110 self._applications_menu_name = None 110 111 self._applications_menu = None 111 112 self._edit_menu = None … … 147 148 self.Bind(EVT_APPEND_BOOKMARK, self.append_bookmark) 148 149 150 def get_data_manager(self): 151 """ 152 """ 153 return self._data_manager 154 149 155 def get_toolbar(self): 150 156 """ … … 190 196 self.SetStatusBar(self.sb) 191 197 # Add panel 192 default_flag = wx.aui.AUI_MGR_DEFAULT #| wx.aui.AUI_MGR_ALLOW_ACTIVE_PANE198 default_flag = wx.aui.AUI_MGR_DEFAULT| wx.aui.AUI_MGR_ALLOW_ACTIVE_PANE 193 199 self._mgr = wx.aui.AuiManager(self, flags=default_flag) 194 200 … … 560 566 return 561 567 #replace or add a new menu for the current plugin 562 name = 'Others'563 pos = self._menubar.FindMenu( name)568 569 pos = self._menubar.FindMenu(str(self._applications_menu_name)) 564 570 if pos != -1: 565 571 menu_list = self._current_perspective.populate_menu(self) 566 572 if menu_list: 567 for (menu, _) in menu_list: 568 hidden_menu = self._menubar.Replace(pos, menu, name) 573 for (menu, name) in menu_list: 574 hidden_menu = self._menubar.Replace(pos, menu, name) 575 self._applications_menu_name = name 576 #self._applications_menu_pos = pos 569 577 else: 570 578 hidden_menu = self._menubar.Remove(pos) 579 self._applications_menu_name = None 571 580 #get the position of the menu when it first added 572 self._plugin_menu_pos = pos 581 self._applications_menu_pos = pos 582 573 583 else: 574 584 menu_list = self._current_perspective.populate_menu(self) 575 585 if menu_list: 576 for (menu, _) in menu_list:586 for (menu,name) in menu_list: 577 587 if self._applications_menu_pos == -1: 578 588 self._menubar.Append(menu, name) 579 589 else: 580 590 self._menubar.Insert(self._applications_menu_pos, menu, name) 591 self._applications_menu_name = name 581 592 582 593 def _add_help_menu(self): … … 1270 1281 if self.enable_add_data(new_plot) and \ 1271 1282 hasattr(self.panel_on_focus, 'group_id'): 1272 new_plot.group_id = self.panel_on_focus.group_id 1283 new_plot.group_id.append(self.panel_on_focus.group_id) 1284 else: 1285 #if not append then new plot 1286 new_plot.group_id.append(wx.NewId()) 1273 1287 wx.PostEvent(self, NewPlotEvent(plot=new_plot, 1274 1288 title=str(new_plot.title)))
Note: See TracChangeset
for help on using the changeset viewer.