Esempio n. 1
0
    def GetPresetOptions(self):
        p = sm.GetService('overviewPresetSvc').GetAllPresets().keys()
        options = []
        for name in p:
            defaultName = sm.GetService('overviewPresetSvc').GetDefaultOverviewName(name)
            if defaultName:
                options.append((' ' + defaultName.lower(), (defaultName, name)))
            else:
                displayName = sm.GetService('overviewPresetSvc').GetPresetDisplayName(name)
                options.append((displayName.lower(), (displayName, name)))

        options = SortListOfTuples(options)
        options.insert(0, (GetByLabel('UI/Inflight/Scanner/UseActiveOverviewSettings'), None))
        return options
    def GetPresetOptions(self):
        p = sm.GetService('overviewPresetSvc').GetAllPresets().keys()
        options = []
        for name in p:
            defaultName = sm.GetService('overviewPresetSvc').GetDefaultOverviewName(name)
            if defaultName:
                options.append((' ' + defaultName.lower(), (defaultName, name)))
            else:
                displayName = sm.GetService('overviewPresetSvc').GetPresetDisplayName(name)
                options.append((displayName.lower(), (displayName, name)))

        options = SortListOfTuples(options)
        options.insert(0, (GetByLabel('UI/Inflight/Scanner/UseActiveOverviewSettings'), None))
        return options
Esempio n. 3
0
    def ShowOffices(self):
        if self.selectedGroupButtonID != OFFICESPANEL:
            return
        self.LoadButtons()
        corpsWithOffices = sm.GetService('corp').GetCorporationsWithOfficesAtStation()
        cfg.corptickernames.Prime([ c.corporationID for c in corpsWithOffices ])
        scrolllist = []
        for corp in corpsWithOffices:
            data = KeyVal()
            data.corpName = corp.corporationName
            data.corpID = corp.corporationID
            data.corporation = corp
            scrolllist.append((data.corpName.lower(), GetListEntry('OfficeEntry', data=data)))

        scrolllist = SortListOfTuples(scrolllist)
        numUnrentedOffices = self.GetNumberOfUnrentedOffices()
        availOfficesLabel = localization.GetByLabel('UI/Station/Lobby/NumAvailableOffices', numOffices=numUnrentedOffices)
        scrolllist.insert(0, GetListEntry('Header', {'label': availOfficesLabel}))
        if not self.destroyed:
            self.officesScroll.Load(contentList=scrolllist)
Esempio n. 4
0
    def ShowOffices(self):
        if self.selectedGroupButtonID != OFFICESPANEL:
            return
        self.LoadButtons()
        corpsWithOffices = sm.GetService('corp').GetCorporationsWithOfficesAtStation()
        cfg.corptickernames.Prime([ c.corporationID for c in corpsWithOffices ])
        scrolllist = []
        for corp in corpsWithOffices:
            data = KeyVal()
            data.corpName = corp.corporationName
            data.corpID = corp.corporationID
            data.corporation = corp
            scrolllist.append((data.corpName.lower(), GetListEntry('OfficeEntry', data=data)))

        scrolllist = SortListOfTuples(scrolllist)
        numUnrentedOffices = self.GetNumberOfUnrentedOffices()
        availOfficesLabel = localization.GetByLabel('UI/Station/Lobby/NumAvailableOffices', numOffices=numUnrentedOffices)
        scrolllist.insert(0, GetListEntry('Header', {'label': availOfficesLabel}))
        if not self.destroyed:
            self.officesScroll.Load(contentList=scrolllist)