def showInAddonList(addon): if ao.exists(addon): if addon in addonList.getItems(): # Select the addon in the tree. addonList.deselectAllItems() addonList.selectItem(addon) addonList.ensureVisible(addon) else: # The addon was not currently visible, so make sure it is. tree.selectItem('category-tree-root') addonList.deselectAllItems() refreshListIfVisible() addonList.selectItem(addon) addonList.ensureVisible(addon)
def settingFilter(s): if len(s.getRequiredAddons()) > 0: ident = s.getRequiredAddons()[0] properTab = ident # The addon does not exist? if not ao.exists(ident) or ao.get(ident).isUninstalled(): return False if s.getGroup(): # Addon setting with a group. properTab += '-' + s.getGroup() elif not s.getGroup(): properTab = 'general-options' else: properTab = s.getGroup() return properTab == areaId
def xlate(key): if ao.exists(key): return '<a href="%s">%s</a>' % \ (key, language.translate(key)) else: return key