Changeset c1469ebe in sasview
- Timestamp:
- Feb 2, 2010 12:15:51 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:
- 9455d77
- Parents:
- e84e1e6
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
guiframe/gui_manager.py
rd68c655 rc1469ebe 329 329 """ 330 330 self.defaultPanel = panel_class(self, -1, style=wx.RAISED_BORDER) 331 self.defaultPanel.set_manager(manager=self.app_manager) 331 332 332 333 def _load_panels(self): … … 336 337 337 338 # Look for plug-in panels 338 panels = [] 339 panels = [] 339 340 for item in self.plugins: 340 341 if hasattr(item, "get_panels"): … … 506 507 plugmenu.Append(int(item), panel.window_caption, "Show %s window" % panel.window_caption) 507 508 508 509 510 509 wx.EVT_MENU(self, int(item), self._on_view) 511 510 … … 540 539 toolsmenu = wx.Menu() 541 540 id = wx.NewId() 541 542 542 toolsmenu.Append(id, tool[0], tool[1]) 543 543 wx.EVT_MENU(self, id, tool[2]) … … 547 547 # Help menu 548 548 helpmenu = wx.Menu() 549 549 # add the welcome panel menu item 550 id = wx.NewId() 551 helpmenu.Append(id,'&Welcome', '') 552 helpmenu.AppendSeparator() 553 wx.EVT_MENU(self, id, self.show_welcome_panel) 554 550 555 # Look for help item in plug-ins 551 556 for item in self.plugins: … … 602 607 """ 603 608 self.show_panel(evt.GetId()) 604 609 610 def on_close_welcome_panel(self ): 611 """ 612 Close the welcome panel 613 """ 614 self._mgr.GetPane(self.panels["default"].window_name).Hide() 615 self._mgr.Update() 616 617 618 def show_welcome_panel(self, event): 619 """ 620 Display the welcome panel 621 """ 622 for id in self.panels.keys(): 623 if self._mgr.GetPane(self.panels[id].window_name).IsShown(): 624 self._mgr.GetPane(self.panels[id].window_name).Hide() 625 # Show default panel 626 if not self._mgr.GetPane(self.panels["default"].window_name).IsShown(): 627 self._mgr.GetPane(self.panels["default"].window_name).Show() 628 629 self._mgr.Update() 630 605 631 def show_panel(self, uid): 606 632 """ … … 774 800 if self._mgr.GetPane(self.panels[item].window_name).IsShown(): 775 801 self._mgr.GetPane(self.panels[item].window_name).Hide() 776 802 777 803 self._mgr.Update() 778 804
Note: See TracChangeset
for help on using the changeset viewer.