def __init__(self): self.name = __WIN_NAME__ self.title = 'Dillo Tools {0}'.format(dilloTools.getVersion()) self.mainColumn = None self.heightBuffer = 0 self.bgMult = .75 self.gridColor = [0.26, 0.26, 0.26] self.cats = {} self._tools = None
def createMenu(tools, p=None): """Create and populate the Dillo Tools menu. This menu can be created in alternate locations by passing a menu or window to the p parameter""" LOG.debug('Building Menu...') if p is None: if '$gMainWindow' in melGlobals.keys(): p = melGlobals['gMainWindow'] else: LOG.warning('cannot add Dillo Tools menu, gMainWindow not found') return setParent(p) longName = '{0}|{1}'.format(p, __MENU_NAME__) if menu(longName, ex=True): deleteUI(__MENU_NAME__) with menu(__MENU_NAME__, l='Dillo Tools', p=p, to=True): createMenuTools(tools) createGuiShortcuts() menuItem(d=True) menuItem(l='v{0}'.format(dilloTools.getVersion()), en=False)