def __init__(self, *args): guiutils.SubGUI.__init__(self) # Do this first, so we set up interceptors and so on early on try: from storytext import createShortcutBar from version_control.custom_widgets_storytext import customEventTypes uiMapFiles = plugins.findDataPaths([ "*.uimap" ], *args) self.widget = createShortcutBar(uiMapFiles=uiMapFiles, customEventTypes=customEventTypes) self.widget.show() except ImportError: self.widget = None
def __init__(self, *args): guiutils.SubGUI.__init__(self) # Do this first, so we set up interceptors and so on early on try: from storytext import createShortcutBar from version_control.custom_widgets_storytext import customEventTypes uiMapFiles = plugins.findDataPaths(["*.uimap"], *args) self.widget = createShortcutBar(uiMapFiles=uiMapFiles, customEventTypes=customEventTypes) self.widget.show() except ImportError: self.widget = None
def createWindowContents(self): vbox = gtk.VBox() vbox.pack_start(self.getMenuBar(), expand=False, fill=False) vbox.pack_start(self.getTaskBar(), expand=False, fill=False) vbox.pack_start(self.getNotebook(), expand=True, fill=True) try: from storytext import createShortcutBar shortcutBar = createShortcutBar() if shortcutBar: vbox.pack_start(shortcutBar, expand=False, fill=False) shortcutBar.show() except ImportError: pass vbox.show() return vbox