def build_toplevel(self, layout, layout_file=None): self.layout_file = layout_file self.font = self.get_font('fixedFont', 12) self.font11 = self.get_font('fixedFont', 11) self.font14 = self.get_font('fixedFont', 14) self.font18 = self.get_font('fixedFont', 18) self.w.tooltips = None self.ds = Desktop.Desktop(self) self.ds.build_desktop(layout, lo_file=layout_file, widget_dict=self.w) self.gpmon = PluginManager(self.logger, self, self.ds, self.mm) for win in self.ds.toplevels: # add delete/destroy callbacks win.add_callback('close', self.quit) win.set_title("Queue Planner") root = win self.ds.add_callback('all-closed', self.quit) self.w.root = root menuholder = self.w['menu'] self.w.menubar = self.add_menus(menuholder) statusholder = self.w['status'] self.add_statusbar(statusholder) self.w.root.show()
def build_toplevel(self): self.font = self.getFont('fixedFont', 12) self.font11 = self.getFont('fixedFont', 11) self.font14 = self.getFont('fixedFont', 14) self.font18 = self.getFont('fixedFont', 18) self.w.tooltips = None self.ds = Desktop.Desktop(self) self.ds.make_desktop(self.layout, widgetDict=self.w) # TEMP: FIX ME! self.gpmon.ds = self.ds for win in self.ds.toplevels: # add delete/destroy callbacks win.add_callback('close', self.quit) win.set_title("Ginga") root = win self.ds.add_callback('all-closed', self.quit) self.w.root = root self.w.fscreen = None # get informed about window closures in existing workspaces for wsname in self.ds.get_wsnames(): nb = self.ds.get_nb(wsname) if nb.has_callback('page-switch'): nb.add_callback('page-switch', self.page_switch_cb) if nb.has_callback('page-close'): nb.add_callback('page-close', self.page_closed_cb, wsname) if 'menu' in self.w: menuholder = self.w['menu'] self.w.menubar = self.add_menus(menuholder) self.add_dialogs() if 'status' in self.w: statusholder = self.w['status'] self.add_statusbar(statusholder) self.w.root.show()