Exemplo n.º 1
0
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)
Exemplo n.º 2
0
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)
Exemplo n.º 3
0
        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
Exemplo n.º 4
0
 def xlate(key):
     if ao.exists(key):
         return '<a href="%s">%s</a>' % \
                (key, language.translate(key))
     else:
         return key
Exemplo n.º 5
0
 def xlate(key):
     if ao.exists(key):
         return '<a href="%s">%s</a>' % \
                (key, language.translate(key))
     else:
         return key