Changeset 6f59a98 in sasview
- Timestamp:
- Feb 27, 2010 9:07:20 AM (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:
- 272d91e
- Parents:
- 4ea3600
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
guiframe/gui_manager.py
rb28278e r6f59a98 374 374 # Check whether we need to put this panel 375 375 # in the center pane 376 if hasattr(p, "CENTER_PANE") :376 if hasattr(p, "CENTER_PANE") and p.CENTER_PANE: 377 377 if p.CENTER_PANE: 378 378 self.panels[str(id)] = p … … 487 487 menubar.Append(self.filemenu, '&File') 488 488 489 # Plotmenu489 # Window menu 490 490 # Attach a menu item for each panel in our 491 491 # panel list that also appears in a plug-in. 492 # TODO: clean this up. We should just identify 493 # plug-in panels and add them all. 494 495 # Only add the panel menu if there is more than two panels 496 n_panels = 0 497 for plug in self.plugins: 492 493 # Only add the panel menu if there is only one perspective and 494 # it has more than two panels. 495 # Note: the first plug-in is always the plotting plug-in. The first application 496 # plug-in is always the second one in the list. 497 if len(self.plugins)==2: 498 plug = self.plugins[1] 498 499 pers = plug.get_perspective() 499 if len(pers)>0:500 n_panels += 1501 500 502 if n_panels>2: 503 viewmenu = wx.Menu() 504 for plug in self.plugins: 505 plugmenu = wx.Menu() 506 pers = plug.get_perspective() 507 if len(pers)>0: 508 for item in self.panels: 509 if item == 'default': 510 continue 511 panel = self.panels[item] 512 if panel.window_name in pers: 513 plugmenu.Append(int(item), panel.window_caption, "Show %s window" % panel.window_caption) 514 515 wx.EVT_MENU(self, int(item), self._on_view) 516 517 viewmenu.AppendMenu(wx.NewId(), plug.sub_menu, plugmenu, plug.sub_menu) 518 menubar.Append(viewmenu, '&Panel') 501 if len(pers)>1: 502 viewmenu = wx.Menu() 503 for item in self.panels: 504 if item == 'default': 505 continue 506 panel = self.panels[item] 507 if panel.window_name in pers: 508 viewmenu.Append(int(item), panel.window_caption, "Show %s window" % panel.window_caption) 509 wx.EVT_MENU(self, int(item), self._on_view) 510 menubar.Append(viewmenu, '&Window') 519 511 520 512 # Perspective
Note: See TracChangeset
for help on using the changeset viewer.