def ismandarinmodel(modelName): from pinyin.config import getconfig modelTags = getconfig().getmodeltagslist() for tag in modelTags: if tag in modelName: return True return False
def ptkRebuildAddonsMenu(self): ptkMenu = None for menu in self._menus: if menu.title() == "Pinyin Toolkit": ptkMenu = menu break ptkMenu.addSeparator() config = getconfig() hooks.buildHooks(ptkMenu, mw, config, thenotifier, themediamanager, updaters)
def __init__(self, mw, notifier, mediamanager, updaters): self.mw = mw self.notifier = notifier self.mediamanager = mediamanager self.updaters = updaters self.config = getconfig()