- Timestamp:
- Feb 4, 2010 12:36:05 PM (15 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:
- 3e85fdde
- Parents:
- c363d74
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
guiframe/gui_manager.py
r629e8b9 rb28278e 159 159 """ 160 160 pass 161 161 162 def set_default_perspective(self): 163 """ 164 Call back method that True to notify the parent that the current plug-in 165 can be set as default perspective. 166 when returning False, the plug-in is not candidate for an automatic 167 default perspective setting 168 """ 169 return False 162 170 163 171 class ViewerFrame(wx.Frame): … … 329 337 """ 330 338 self.defaultPanel = panel_class(self, -1, style=wx.RAISED_BORDER) 331 self.defaultPanel.set_manager(manager=self.app_manager) 332 339 333 340 def _load_panels(self): 334 341 """ … … 390 397 #BestSize(wx.Size(550,600))) 391 398 #MinSize(wx.Size(500,500))) 392 393 399 394 400 def get_context_menu(self, graph=None): 395 401 """ … … 609 615 self.show_panel(evt.GetId()) 610 616 611 def on_close_welcome_panel(self 617 def on_close_welcome_panel(self): 612 618 """ 613 619 Close the welcome panel … … 617 623 self._mgr.GetPane(self.panels["default"].window_name).Hide() 618 624 self._mgr.Update() 619 625 # set a default perspective 626 self.set_default_perspective() 620 627 621 628 def show_welcome_panel(self, event): … … 785 792 item.post_init() 786 793 794 def set_default_perspective(self): 795 """ 796 Choose among the plugin the first plug-in that has 797 "set_default_perspective" method and its return value is True will be 798 as a default perspective when the welcome page is closed 799 """ 800 for item in self.plugins: 801 if hasattr(item, "set_default_perspective"): 802 if item.set_default_perspective(): 803 item.on_perspective(event=None) 804 return 805 787 806 def set_perspective(self, panels): 788 807 """
Note: See TracChangeset
for help on using the changeset viewer.