Beispiel #1
0
 def GetPanelLabel(self, label, count):
     if count > 0:
         return localization.GetByLabel('UI/Mail/Notifications/GroupUnreadLabel', groupName=label, unreadCount=count)
     else:
         return label
    def DrawIndex(self, indexName = None, indexID = None):
        container = uiprimitives.Container(name='container', parent=self.sr.hubs, align=uiconst.TOTOP, pos=(0, 0, 0, 40), padding=(10, 10, 10, 0))
        leftContainer = uiprimitives.Container(name='leftContainer', parent=container, align=uiconst.TOALL, pos=(0, 0, 0, 0), padding=(0, 0, 0, 0))
        rightContainer = uiprimitives.Container(name='rightContainer', parent=container, align=uiconst.TORIGHT, pos=(0, 0, 20, 20), padding=(0, 0, 0, 0))
        topContainer = uiprimitives.Container(name='topContainer', parent=leftContainer, align=uiconst.TOPLEFT, pos=(0,
         0,
         LEVEL_SIZE * 5 + 14,
         10), padding=(0, 0, 0, 0))
        bottomContainer = uiprimitives.Container(name='bottomContainer', parent=leftContainer, align=uiconst.BOTTOMLEFT, pos=(0,
         0,
         LEVEL_SIZE * 5 + 14,
         LEVEL_SIZE + 4), padding=(0, 0, 0, 0))
        uiprimitives.Line(parent=bottomContainer, align=uiconst.TOTOP, color=FILLED_COLOR)
        uiprimitives.Line(parent=bottomContainer, align=uiconst.TOBOTTOM, color=FILLED_COLOR)
        uiprimitives.Line(parent=bottomContainer, align=uiconst.TOLEFT, color=FILLED_COLOR)
        uiprimitives.Line(parent=bottomContainer, align=uiconst.TORIGHT, color=FILLED_COLOR)
        topLeftContainer = uiprimitives.Container(name='topLeftContainer', parent=topContainer, align=uiconst.TOLEFT, pos=(0, 0, 30, 0), padding=(0, 0, 0, 0))
        topRightContainer = uiprimitives.Container(name='topRightContainer', parent=topContainer, align=uiconst.TOALL, pos=(0, 0, 0, 0), padding=(0, 0, 2, 0))
        devIndex = self.devIndices.get(indexID, None)
        indexInfo = sm.GetService('sov').GetLevelForIndex(indexID, devIndex=devIndex)
        t = uicontrols.EveLabelMedium(text=indexName, parent=topLeftContainer, state=uiconst.UI_DISABLED)
        t2 = uicontrols.EveLabelMedium(text=localization.GetByLabel('UI/InfrastructureHub/LevelX', level=indexInfo.level), parent=topRightContainer, state=uiconst.UI_DISABLED, align=uiconst.TOPRIGHT)
        if indexID == const.attributeDevIndexSovereignty:
            indexList = [ str(v) for v in sm.GetService('sov').GetTimeIndexValuesInDays() ]
        iconPath = 'ui_73_16_211'
        hintTextChangeIcon = localization.GetByLabel('UI/InfrastructureHub/ValueChangeUp')
        for i in range(1, 6):
            if i == 1:
                leftPadding = 2
            else:
                leftPadding = 1
            if i == 5:
                rightPadding = 2
            else:
                rightPadding = 1
            level = uiprimitives.Container(name='level%d' % i, parent=bottomContainer, align=uiconst.TOLEFT, pos=(0,
             0,
             LEVEL_SIZE,
             LEVEL_SIZE), padding=(leftPadding,
             2,
             rightPadding,
             2))
            level.state = uiconst.UI_NORMAL
            if indexID == const.attributeDevIndexSovereignty:
                hintText = localization.GetByLabel('UI/InfrastructureHub/LevelNeedsSovForDays', level=i, days=int(indexList[i - 1]))
            else:
                hintText = localization.GetByLabel('UI/InfrastructureHub/LevelX', level=i)
            level.hint = hintText
            if i <= indexInfo.level:
                uiprimitives.Fill(parent=level, color=FILLED_COLOR)
            elif i == indexInfo.level + 1 and indexInfo.remainder > 0:
                uiprimitives.Fill(parent=level, color=EMPTY_COLOR)
                levelPart = uiprimitives.Container(name='levelPartial', parent=level, align=uiconst.TOLEFT, pos=(0,
                 0,
                 int(indexInfo.remainder * LEVEL_SIZE),
                 0), idx=0)
                levelPart.state = uiconst.UI_NORMAL
                perc = indexInfo.remainder * 100
                levelPart.hint = localization.GetByLabel('UI/InfrastructureHub/PercentageOfLevel', perc=int(perc), level=i)
                if not indexInfo.increasing:
                    iconPath = 'ui_73_16_212'
                    hintTextChangeIcon = localization.GetByLabel('UI/InfrastructureHub/ValueChangeDown')
                uiprimitives.Fill(parent=levelPart, color=PARTIAL_COLOR)
            else:
                uiprimitives.Fill(parent=level, color=EMPTY_COLOR)

        if indexID != const.attributeDevIndexSovereignty and indexInfo.remainder != 0.0 and indexInfo.level != 0:
            changeIcon = uicontrols.Icon(icon=iconPath, parent=rightContainer, align=uiconst.CENTER, pos=(4, 8, 16, 16))
            changeIcon.hint = hintTextChangeIcon
Beispiel #3
0
 def Load(self, data):
     iconsize = 48
     self.factionParent.Flush()
     if data.factionID:
         owner = cfg.eveowners.Get(data.factionID)
         uiutil.GetLogoIcon(parent=self.factionParent,
                            align=uiconst.RELATIVE,
                            size=64,
                            itemID=data.factionID,
                            ignoreSize=True,
                            hint=localization.GetByLabel(
                                'UI/Incursion/Journal/FactionStagingRuler',
                                faction=owner.ownerName))
     else:
         uicontrols.Icon(parent=self.factionParent,
                         size=64,
                         icon='ui_94_64_16',
                         ignoreSize=True,
                         hint=localization.GetByLabel(
                             'UI/Incursion/Journal/StagingSystemUnclaimed'),
                         align=uiconst.RELATIVE)
     rowHeader = localization.GetByLabel(
         'UI/Incursion/Journal/ReportRowHeader',
         constellation=data.constellationID,
         constellationInfo=('showinfo', const.typeConstellation,
                            data.constellationID))
     self.constellationLabel.SetText(rowHeader)
     incursionStateMessages = [
         localization.GetByLabel('UI/Incursion/Journal/Withdrawing'),
         localization.GetByLabel('UI/Incursion/Journal/Mobilizing'),
         localization.GetByLabel('UI/Incursion/Journal/Established')
     ]
     self.statusText.SetText(incursionStateMessages[data.state])
     if data.jumps is not None:
         distanceAwayText = localization.GetByLabel(
             'UI/Incursion/Journal/ReportRowNumJumps', jumps=data.jumps)
     else:
         distanceAwayText = localization.GetByLabel(
             'UI/Incursion/Journal/ReportRowSystemUnreachable')
     bodyText = localization.GetByLabel(
         'UI/Incursion/Journal/ReportRowBody',
         color='<color=' + sm.GetService('map').GetSystemColorString(
             data.stagingSolarSystemID) + '>',
         security=data.security,
         securityColor=sm.GetService('map').GetSystemColorString(
             data.stagingSolarSystemID),
         system=data.stagingSolarSystemID,
         systemInfo=('showinfo', const.typeSolarSystem,
                     data.stagingSolarSystemID),
         distanceAway=distanceAwayText)
     self.stagingText.SetText(bodyText)
     self.statusBar.SetInfluence(taleCommon.CalculateDecayedInfluence(
         data.influenceData),
                                 None,
                                 animate=False)
     self.bossIcon.SetBossSpawned(data.hasBoss)
     self.corpMapButton.OnClick = lambda: sm.GetService(
         'viewState').ActivateView('starmap',
                                   interestID=data.constellationID,
                                   starColorMode=STARMODE_FRIENDS_CORP)
     self.mapButton.OnClick = lambda: sm.GetService(
         'viewState').ActivateView('starmap',
                                   interestID=data.constellationID,
                                   starColorMode=STARMODE_INCURSION)
     self.autopilotButton.OnClick = lambda: sm.GetService(
         'starmap').SetWaypoint(data.stagingSolarSystemID,
                                clearOtherWaypoints=True)
     self.lpButton.OnClick = lambda: sm.GetService(
         'journal').ShowIncursionTab(flag=IncursionTab.LPLog,
                                     taleID=data.taleID,
                                     constellationID=data.constellationID)
     self.loyaltyPoints.number.SetText(
         localization.GetByLabel(
             'UI/Incursion/Journal/NumberLoyaltyPointsAcronym',
             points=util.FmtAmt(data.loyaltyPoints)))
Beispiel #4
0
    def Load(self, node):
        self.sr.node = node
        c = node.contract
        self.sr.node.contractID = c.contractID
        self.sr.node.solarSystemID = c.startSolarSystemID
        items = node.contractItems
        issuerID = [c.issuerID, c.issuerCorpID][not not c.forCorp]
        fromName = cfg.eveowners.Get(issuerID).ownerName
        if c.acceptorID:
            toID = c.acceptorID
        else:
            toID = c.assigneeID
        if toID == 0:
            toName = localization.GetByLabel(
                'UI/Contracts/ContractEntry/NoneParen')
        else:
            toName = cfg.eveowners.Get(toID).ownerName
        name = GetContractTitle(c, items)
        if not node.Get('callerdefined', False):
            node.label = '%s<t>%s<t>%s<t>%s%s' % (
                name, GetContractTypeText(c.type), fromName, toName,
                node.Get('additionalColumns', ''))
        self.sr.label.text = self.sr.node.label = node.label
        self.OnSelectCallback = node.Get('callback', None)
        if node.Get('selected', 0):
            self.Select()
        else:
            self.Deselect()
        self.state = uiconst.UI_NORMAL
        self.sr.claiming = 0
        self.sr.node.name = name
        self.hint = ''
        loc = ''
        jmps = None
        hintList = []
        if c.startSolarSystemID > 0:
            n = sm.GetService('clientPathfinderService').GetAutopilotJumpCount(
                session.solarsystemid2, c.startSolarSystemID)
            if c.startStationID == eve.session.stationid:
                jmps = localization.GetByLabel('UI/Generic/CurrentStation')
            elif c.startSolarSystemID == eve.session.solarsystemid2:
                jmps = localization.GetByLabel('UI/Generic/CurrentSystem')
            elif n == 1:
                jmps = localization.GetByLabel('UI/Contracts/OneJumpAway')
            else:
                jmps = localization.GetByLabel(
                    'UI/Contracts/ContractEntry/NumJumpsAway', numJumps=n)
        hintLine = localization.GetByLabel(
            'UI/Contracts/ContractEntry/ContractTypeWithType',
            contractType=GetContractTypeText(c.type))
        hintList.append(hintLine)
        if c.title != '':
            hintLine = localization.GetByLabel(
                'UI/Contracts/ContractEntry/IssuerDescriptionWithDescription',
                description=c.title)
            hintList.append(hintLine)
        if jmps:
            hintLine = localization.GetByLabel(
                'UI/Contracts/ContractEntry/ContractLocation',
                location=c.startSolarSystemID,
                numJumpsInfo=jmps)
        else:
            labelText = localization.GetByLabel(
                'UI/Contracts/ContractEntry/MenuLocation')
            hintLine = localization.GetByLabel(
                'UI/Contracts/ContractsService/BoldGenericLabel',
                labelText=labelText)
        hintList.append(hintLine)
        if c.type in [const.conTypeAuction, const.conTypeItemExchange
                      ] and len(items) > 0:
            itemList = []
            itemReqList = []
            numItems = 0
            numItemsReq = 0
            for e in items:
                if e.inCrate:
                    itemInfo = cfg.FormatConvert(const.UE_TYPEIDANDQUANTITY,
                                                 e.itemTypeID,
                                                 max(1, e.quantity))
                    itemList.append(itemInfo)
                    numItems += 1
                else:
                    itemReqInfo = cfg.FormatConvert(const.UE_TYPEIDANDQUANTITY,
                                                    e.itemTypeID,
                                                    max(1, e.quantity))
                    itemReqList.append(itemReqInfo)
                    numItemsReq += 1

            if len(itemList) >= 2:
                itemList.append(
                    localization.GetByLabel('UI/Common/MoreWithTrailing'))
            if len(itemReqList) >= 2:
                itemReqList.append(
                    localization.GetByLabel('UI/Common/MoreWithTrailing'))
            if len(itemList) == 0:
                itemList.append(
                    localization.GetByLabel(
                        'UI/Contracts/ContractEntry/NoneParen'))
            itemsString = localization.formatters.FormatGenericList(itemList)
            strItems = localization.GetByLabel(
                'UI/Contracts/ContractEntry/ItemsWithItemList',
                itemsString=itemsString)
            hintList.append(strItems)
            if len(itemReqList) > 0:
                reqItemsString = localization.formatters.FormatGenericList(
                    itemReqList)
                itemsReq = localization.GetByLabel(
                    'UI/Contracts/ContractEntry/ItemsRequiredWithItemList',
                    reqItemsString=reqItemsString)
                hintList.append(itemsReq)
            if len(itemList) >= 2 or len(itemReqList) >= 2:
                hintList.append(
                    localization.GetByLabel(
                        'UI/Contracts/ContractEntry/OpenForItems'))
            if c.assigneeID > 0:
                labelText = localization.GetByLabel(
                    'UI/Contracts/ContractEntry/PrivateContract')
                string = localization.GetByLabel(
                    'UI/Contracts/ContractsService/BoldGenericLabel',
                    labelText=labelText)
                hintList.append(string)
        newHint = '<br>'.join(hintList)
        self.hint = newHint
Beispiel #5
0
    def SetHint(self, node, label):
        self.sr.node = node
        c = node.contract
        hintList = []
        boldLabel = localization.GetByLabel(
            'UI/Contracts/ContractsService/BoldGenericLabel', labelText=label)
        hintList.append(boldLabel)
        hintLine = localization.GetByLabel(
            'UI/Contracts/ContractEntry/ContractTypeWithType',
            contractType=GetContractTypeText(c.type))
        hintList.append(hintLine)
        hintLine = localization.GetByLabel(
            'UI/Contracts/ContractEntry/ContractLocation',
            location=c.startSolarSystemID,
            numJumpsInfo=node.numJumps)
        hintList.append(hintLine)
        if c.forCorp:
            issuerID = c.issuerCorpID
        else:
            issuerID = c.issuerID
        issuer = cfg.eveowners.Get(issuerID)
        hintLine = localization.GetByLabel(
            'UI/Contracts/ContractEntry/IssuerWithName',
            issuerName=issuer.name)
        hintList.append(hintLine)
        if c.type in [const.conTypeAuction, const.conTypeItemExchange
                      ] and len(node.contractItems) > 0:
            itemList = []
            itemReqList = []
            numItems = 0
            numItemsReq = 0
            for e in node.contractItems:
                if e.inCrate:
                    itemInfo = cfg.FormatConvert(const.UE_TYPEIDANDQUANTITY,
                                                 e.itemTypeID,
                                                 max(1, e.quantity))
                    itemList.append(itemInfo)
                    numItems += 1
                else:
                    itemReqInfo = cfg.FormatConvert(const.UE_TYPEIDANDQUANTITY,
                                                    e.itemTypeID,
                                                    max(1, e.quantity))
                    itemReqList.append(itemReqInfo)
                    numItemsReq += 1

            if len(itemList) >= 2:
                itemList.append(
                    localization.GetByLabel('UI/Common/MoreWithTrailing'))
            if len(itemReqList) >= 2:
                itemReqList.append(
                    localization.GetByLabel('UI/Common/MoreWithTrailing'))
            if len(itemList) == 0:
                itemList.append(
                    localization.GetByLabel(
                        'UI/Contracts/ContractEntry/NoneParen'))
            itemsString = localization.formatters.FormatGenericList(itemList)
            strItems = localization.GetByLabel(
                'UI/Contracts/ContractEntry/ItemsWithItemList',
                itemsString=itemsString)
            hintList.append(strItems)
            if len(itemReqList) > 0:
                reqItemsString = localization.formatters.FormatGenericList(
                    itemReqList)
                itemsReq = localization.GetByLabel(
                    'UI/Contracts/ContractEntry/ItemsRequiredWithItemList',
                    reqItemsString=reqItemsString)
                hintList.append(itemsReq)
            if len(itemList) >= 2 or len(itemReqList) >= 2:
                hintList.append(
                    localization.GetByLabel(
                        'UI/Contracts/ContractEntry/OpenForItems'))
        if c.title != '':
            hintLine = localization.GetByLabel(
                'UI/Contracts/ContractEntry/IssuerDescriptionWithDescription',
                description=c.title)
            hintList.append(hintLine)
        newHint = '<br>'.join(hintList)
        self.hint = newHint
def RealActivateAccelerationGate(itemID):
    if eve.rookieState and not sm.StartService('tutorial').CheckAccelerationGateActivation():
        return
    sm.StartService('sessionMgr').PerformSessionChange(localization.GetByLabel('UI/Inflight/ActivateGate'), sm.RemoteSvc('keeper').ActivateAccelerationGate, itemID, violateSafetyTimer=1)
    log.LogNotice('Acceleration Gate activated to ', itemID)
Beispiel #7
0
 def OnDungeonTriggerMessage(self, messageType, messageID):
     color = self.GetMessageColor(messageType)
     body = localization.GetByMessageID(messageID)
     sm.GetService('LSC').LocalEchoAll('<color=%s>%s</color>' % (color, body), localization.GetByLabel('UI/Common/Message'))
Beispiel #8
0
    def ShowStationItems(self, key):
        self.ShowLoad()
        hangarInv = sm.GetService('invCache').GetInventory(
            const.containerHangar)
        items = hangarInv.List(const.flagHangar)
        if not len(items):
            self.SetHint(
                localization.GetByLabel('UI/Inventory/AssetsWindow/NoAssets'))
            return
        assetsList = []
        self.sr.scroll.Load(fixedEntryHeight=42,
                            contentList=[],
                            headers=uix.GetInvItemDefaultHeaders())
        itemname = ' ' + key
        itemSet = set()
        for each in items:
            if each.flagID not in (const.flagHangar, const.flagWallet):
                continue
            if key == 'ships':
                if each.categoryID != const.categoryShip:
                    continue
            elif key == 'modules':
                if not evetypes.IsCategoryHardwareByCategory(
                        evetypes.GetCategoryID(each.typeID)):
                    continue
            elif key == 'minerals':
                if each.groupID != const.groupMineral:
                    continue
            elif key == 'charges':
                if each.categoryID != const.categoryCharge:
                    continue
            else:
                itemname = None
                if each.categoryID == const.categoryShip or evetypes.IsCategoryHardwareByCategory(
                        evetypes.GetCategoryID(each.typeID)
                ) or each.groupID == const.groupMineral or each.categoryID == const.categoryCharge:
                    continue
            itemSet.add(each)

        self.PrimeLocationNames(itemSet)
        for eachItem in itemSet:
            assetsList.append(
                listentry.Get('InvAssetItem',
                              data=uix.GetItemData(
                                  eachItem,
                                  'details',
                                  scrollID=self.sr.scroll.sr.id)))

        locText = {
            'ships':
            localization.GetByLabel(
                'UI/Inventory/AssetsWindow/NoShipsAtStation'),
            'modules':
            localization.GetByLabel(
                'UI/Inventory/AssetsWindow/NoModulesAtStation'),
            'minerals':
            localization.GetByLabel(
                'UI/Inventory/AssetsWindow/NoMineralsAtStation'),
            'charges':
            localization.GetByLabel(
                'UI/Inventory/AssetsWindow/NoChargesAtStation')
        }
        if not assetsList:
            if not itemname:
                self.SetHint(
                    localization.GetByLabel(
                        'UI/Inventory/AssetsWindow/NoAssetsInCategoryAtStation'
                    ))
            else:
                self.SetHint(locText[key])
        else:
            self.SetHint()
        self.sr.scroll.Load(contentList=assetsList,
                            sortby='label',
                            headers=uix.GetInvItemDefaultHeaders())
        self.HideLoad()
Beispiel #9
0
    def Refresh(self, *args):
        self.station_inited = 0
        self.search_inited = 0
        self.filt_inited = 0
        try:
            self.scrollPosition[
                self.key] = self.sr.scroll.GetScrollProportion()
        except:
            self.scrollPosition[self.key] = 0.0

        self._RecoverSearchText()
        uix.Flush(self.sr.main)
        self.sr.scroll = uicontrols.Scroll(
            parent=self.sr.main,
            padding=(const.defaultPadding, const.defaultPadding,
                     const.defaultPadding, const.defaultPadding))
        self.sr.scroll.sr.id = 'assets'
        self.sr.scroll.sr.minColumnWidth = {
            localization.GetByLabel('UI/Common/Name'): 44
        }
        self.sr.scroll.allowFilterColumns = 1
        self.sr.scroll.OnNewHeaders = self.ReloadTabs
        self.sr.scroll.sortGroups = True
        self.sr.scroll.SetColumnsHiddenByDefault(
            uix.GetInvItemDefaultHiddenHeaders())
        tabs = [
            [
                localization.GetByLabel('UI/Inventory/AssetsWindow/AllItems'),
                self.sr.scroll, self, 'allitems'
            ],
            [
                localization.GetByLabel('UI/Common/LocationTypes/Region'),
                self.sr.scroll, self, 'regitems'
            ],
            [
                localization.GetByLabel(
                    'UI/Common/LocationTypes/Constellation'), self.sr.scroll,
                self, 'conitems'
            ],
            [
                localization.GetByLabel('UI/Common/LocationTypes/SolarSystem'),
                self.sr.scroll, self, 'sysitems'
            ],
            [
                localization.GetByLabel(
                    'UI/Inventory/AssetSearch/SearchInStations'),
                self.sr.scroll, self, 'search'
            ],
            [
                localization.GetByLabel('UI/Inventory/AssetSafety/Safety'),
                self.sr.scroll, self, 'safety'
            ]
        ]
        if eve.session.stationid:
            tabs.insert(4, [
                localization.GetByLabel('UI/Common/LocationTypes/Station'),
                self.sr.scroll, self, 'station'
            ])
        self.sr.maintabs = uicontrols.TabGroup(name='tabparent',
                                               parent=self.sr.main,
                                               idx=0,
                                               tabs=tabs,
                                               groupID='assetspanel',
                                               silently=True)
Beispiel #10
0
    def _Load(self, key, reloadStationID=None):
        self.loading = 1
        self.pending = None
        if key != self.key:
            self.scrollPosition[
                self.key] = self.sr.scroll.GetScrollProportion()
        self.key = key
        if self.safetyCont:
            self.safetyCont.display = False
        if key == 'safety':

            def Hide(cont):
                if cont:
                    cont.display = False

            Hide(self.sr.scroll)
            Hide(self.sr.search_cont)
            Hide(self.sr.filt_cont)
            Hide(self.sr.station_tabs)
            if self.safetyCont is None or self.safetyCont.destroyed:
                self.safetyCont = AssetSafetyCont(
                    parent=self.sr.main,
                    padding=4,
                    controller=SafetyControllerCharacter())
            self.safetyCont.display = True
            self.safetyCont.Load()
        if key[:7] == 'station':
            if not self.station_inited:
                idx = self.sr.main.children.index(self.sr.maintabs)
                self.sr.station_tabs = uicontrols.TabGroup(name='tabparent2',
                                                           parent=self.sr.main,
                                                           idx=idx + 1)
                tabs = [
                    [
                        localization.GetByLabel('UI/Common/ItemTypes/Ships'),
                        self.sr.scroll, self,
                        '%sships' % key
                    ],
                    [
                        localization.GetByLabel('UI/Common/ItemTypes/Modules'),
                        self.sr.scroll, self,
                        '%smodules' % key
                    ],
                    [
                        localization.GetByLabel('UI/Common/ItemTypes/Charges'),
                        self.sr.scroll, self,
                        '%scharges' % key
                    ],
                    [
                        localization.GetByLabel(
                            'UI/Common/ItemTypes/Minerals'), self.sr.scroll,
                        self,
                        '%sminerals' % key
                    ],
                    [
                        localization.GetByLabel('UI/Common/Other'),
                        self.sr.scroll, self,
                        '%sother' % key
                    ]
                ]
                self.station_inited = 1
                self.sr.station_tabs.Startup(tabs,
                                             'assetsatstation',
                                             silently=True)
            if self.sr.Get('filt_cont', None):
                self.sr.filt_cont.state = uiconst.UI_HIDDEN
            self.sr.station_tabs.state = uiconst.UI_NORMAL
            if self.sr.Get('search_cont', None):
                self.sr.search_cont.state = uiconst.UI_HIDDEN
            if key != 'station':
                self.ShowStationItems(key[7:])
            else:
                self.sr.station_tabs.AutoSelect(1)
        elif key in ('allitems', 'regitems', 'conitems', 'sysitems'):
            if not getattr(self, 'filt_inited', False):
                self.sr.filt_cont = uiprimitives.Container(align=uiconst.TOTOP,
                                                           height=67,
                                                           parent=self.sr.main,
                                                           top=2,
                                                           idx=1)
                self.sr.sortcombo = uicontrols.Combo(
                    label=localization.GetByLabel('UI/Common/SortBy'),
                    parent=self.sr.filt_cont,
                    options=self.sortOptions,
                    name='sortcombo',
                    select=None,
                    callback=self.Filter,
                    width=115,
                    pos=(5, 16, 0, 0))
                l = self.sr.sortcombo.width + self.sr.sortcombo.left + const.defaultPadding
                self.sr.filtcombo = uicontrols.Combo(
                    label=localization.GetByLabel('UI/Common/View'),
                    parent=self.sr.filt_cont,
                    options=[],
                    name='filtcombo',
                    select=None,
                    callback=self.Filter,
                    width=115,
                    pos=(l, 16, 0, 0))
                self.sr.filt_cont.height = self.sr.filtcombo.top + self.sr.filtcombo.height
                self.filt_inited = 1
            self.sr.filt_cont.state = uiconst.UI_PICKCHILDREN
            if key in ('regitems', 'conitems', 'sysitems'):
                self.sr.filtcombo.state = uiconst.UI_NORMAL
            else:
                self.sr.filtcombo.state = uiconst.UI_HIDDEN
            if self.sr.Get('station_tabs', None):
                self.sr.station_tabs.state = uiconst.UI_HIDDEN
            if self.sr.Get('search_cont', None):
                self.sr.search_cont.state = uiconst.UI_HIDDEN
            self.ShowAll(key, None, None)
        elif key == 'search':
            if self.sr.Get('station_tabs', None):
                self.sr.station_tabs.state = uiconst.UI_HIDDEN
            if not self.search_inited:
                self.sr.search_cont = uiprimitives.Container(
                    align=uiconst.TOTOP, height=37, parent=self.sr.main, idx=1)
                uiprimitives.Container(name='comboCont',
                                       align=uiconst.TOLEFT,
                                       parent=self.sr.search_cont,
                                       width=100 + const.defaultPadding)
                top = const.defaultPadding + 14
                self.sr.sortcombosearch = uicontrols.Combo(
                    label=localization.GetByLabel('UI/Common/SortBy'),
                    parent=self.sr.search_cont,
                    options=self.sortOptions,
                    name='sortcombosearch',
                    select=None,
                    callback=self.Search,
                    width=100,
                    pos=(const.defaultPadding, top, 0, 0))
                buttonCont = uiprimitives.Container(name='bottonCont',
                                                    align=uiconst.TORIGHT,
                                                    parent=self.sr.search_cont)
                sprite = uiprimitives.Sprite(
                    name='questionMarkSprite',
                    parent=buttonCont,
                    align=uiconst.TOPRIGHT,
                    pos=(const.defaultPadding, top, 20, 20),
                    state=uiconst.UI_NORMAL,
                    texturePath='res:/UI/Texture/Icons/105_32_32.png',
                    opacity=0.75)
                sprite.LoadTooltipPanel = self.LoadInfoTooltip
                button = uicontrols.Button(
                    parent=buttonCont,
                    label=localization.GetByLabel('UI/Common/Buttons/Search'),
                    left=sprite.left + sprite.width + const.defaultPadding,
                    top=top,
                    func=self.Search,
                    align=uiconst.TOPRIGHT)
                buttonCont.width = button.width + const.defaultPadding * 3 + sprite.width
                self.sr.searchtype = SearchBox(
                    name='assetssearchtype',
                    parent=self.sr.search_cont,
                    left=const.defaultPadding,
                    padBottom=1,
                    width=0,
                    top=top,
                    label=localization.GetByLabel('UI/Common/SearchText'),
                    maxLength=100,
                    OnReturn=self.Search,
                    align=uiconst.TOALL,
                    keywords=self.searchKeywords,
                    isTypeField=True)
                self._RestoreSearchText()
                self.search_inited = 1
            if self.sr.Get('filt_cont', None):
                self.sr.filt_cont.state = uiconst.UI_HIDDEN
            self.sr.search_cont.state = uiconst.UI_PICKCHILDREN
            sortKeySearch = settings.char.ui.Get('assetsSearchSortKey', None)
            self.ShowSearch(sortKeySearch)
            self.Search()
        self.loading = 0
        if self.pending:
            self.Load(*self.pending)
Beispiel #11
0
    def ShowAll(self, key, keyID, sortKey, *args):
        if keyID is None:
            keyID = settings.char.ui.Get('assetsKeyID_%s' % key, None)
        oldSortKey = settings.char.ui.Get('assetsSortKey', None)
        if sortKey is not None:
            if oldSortKey != sortKey:
                for k in self.scrollPosition.keys():
                    self.scrollPosition[k] = 0.0

        else:
            sortKey = oldSortKey
        settings.char.ui.Set('assetsKeyID_%s' % key, keyID)
        settings.char.ui.Set('assetsSortKey', sortKey)
        self.ShowLoad()
        self.SetHint()
        closed = [0, 1][getattr(self, 'invalidateOpenState_%s' % key, 0)]
        sortlocations = sm.StartService('assets').GetAll(key,
                                                         keyID=keyID,
                                                         sortKey=sortKey)
        options = [(localization.GetByLabel('UI/Common/Current'), (key, 0))]
        opts = {}
        for r in sm.StartService('assets').locationCache.iterkeys():
            if key == 'regitems' and util.IsRegion(
                    r) or key == 'conitems' and util.IsConstellation(
                        r) or key == 'sysitems' and util.IsSolarSystem(r):
                opts[cfg.evelocations.Get(r).name] = r

        keys = opts.keys()
        keys.sort()
        for k in keys:
            options.append((k, (key, opts[k])))

        try:
            self.sr.filtcombo.LoadOptions(options, None)
            if keyID:
                self.sr.filtcombo.SelectItemByLabel(
                    cfg.evelocations.Get(keyID).name)
            if sortKey:
                self.sr.sortcombo.SelectItemByIndex(sortKey)
        except (Exception, ):
            sys.exc_clear()

        destPathList = sm.GetService('starmap').GetDestinationPath()
        scrolllist = []
        for solarsystemID, station in sortlocations:
            data = self.GetLocationData(solarsystemID,
                                        station,
                                        key,
                                        forceClosed=closed,
                                        scrollID=self.sr.scroll.sr.id,
                                        sortKey=sortKey,
                                        path=destPathList)
            scrolllist.append(
                listentry.Get(entryType=None,
                              data=data,
                              decoClass=LocationGroup))

        if self.destroyed:
            return
        setattr(self, 'invalidateOpenState_%s' % key, 0)
        locText = {
            'allitems':
            localization.GetByLabel(
                'UI/Inventory/AssetsWindow/NoAssetsAtStation'),
            'regitems':
            localization.GetByLabel(
                'UI/Inventory/AssetsWindow/NoAssetsInRegion'),
            'conitems':
            localization.GetByLabel(
                'UI/Inventory/AssetsWindow/NoAssetsInConstellation'),
            'sysitems':
            localization.GetByLabel(
                'UI/Inventory/AssetsWindow/NoAssetsInSolarSystem')
        }
        scrollPosition = self.scrollPosition[key]
        self.sr.scroll.Load(contentList=scrolllist,
                            headers=uix.GetInvItemDefaultHeaders(),
                            noContentHint=locText[key],
                            scrollTo=scrollPosition)
        self.HideLoad()
Beispiel #12
0
 def Startup(self, *args):
     listentry.Generic.Startup(self, *args)
     self.joinleaveBtn = uicls.Button(parent=self, label=localization.GetByLabel('UI/Chat/ChannelWindow/Join'), func=self.JoinLeaveChannelFromBtn, idx=0, left=2, align=uiconst.CENTERRIGHT)
Beispiel #13
0
 def GetNameFromMessageIDWithReplacement(self, messageID):
     if messageID == const.CHAT_SYSTEM_CHANNEL:
         return localization.GetByLabel('UI/Chat/SystemChannels')
     else:
         return localization.GetByMessageID(messageID)
Beispiel #14
0
 def Startup(self, *args):
     listentry.Generic.Startup(self, *args)
     if sm.StartService('LSC').IsCreator(self.sr.node.channel.channelID):
         self.joinleaveBtn = uicls.Button(parent=self, label=localization.GetByLabel('UI/Chat/ChannelWindow/Delete'), func=self.DeleteChannel, idx=0, left=2, align=uiconst.CENTERRIGHT)
     else:
         self.joinleaveBtn = uicls.Button(parent=self, label=localization.GetByLabel('UI/Chat/ChannelWindow/Subscribe'), func=self.JoinLeaveChannelFromBtn, idx=0, left=2, align=uiconst.CENTERRIGHT)
Beispiel #15
0
    def DrawRightSide(self):
        self.sr.rightside = uiprimitives.Container(name='rightside', parent=self.sr.main, align=uiconst.TOALL, pos=(0, 0, 0, 0))
        a = uiprimitives.Container(name='push', parent=self.sr.rightside, align=uiconst.TOTOP, height=6)
        self.sr.rightMainPanel = uiprimitives.Container(name='rightMainPanel', parent=self.sr.rightside, align=uiconst.TOALL, pos=(0, 0, 0, 0))
        topParent = uiprimitives.Container(parent=self.sr.rightMainPanel, align=uiconst.TOTOP, height=80)
        topLeftParent = uiprimitives.Container(parent=topParent, align=uiconst.TOLEFT, width=70)
        topRightParent = uiprimitives.Container(parent=topParent, align=uiconst.TOALL, pos=(0, 0, 0, 0))
        bottomParent = uiprimitives.Container(parent=self.sr.rightMainPanel, align=uiconst.TOALL, pos=(0, 0, 0, 0))
        uiprimitives.Container(name='push', parent=bottomParent, align=uiconst.TOTOP, height=const.defaultPadding)
        uiprimitives.Container(name='push', parent=bottomParent, align=uiconst.TOBOTTOM, height=const.defaultPadding)
        uiprimitives.Container(name='push', parent=bottomParent, align=uiconst.TOLEFT, width=const.defaultPadding)
        uiprimitives.Container(name='push', parent=bottomParent, align=uiconst.TORIGHT, width=const.defaultPadding)
        self.sr.shipIcon = uicontrols.Icon(parent=topParent, state=uiconst.UI_HIDDEN, size=64, left=const.defaultPadding, ignoreSize=True)
        self.sr.techicon = uiprimitives.Sprite(name='techIcon', parent=topParent, align=uiconst.RELATIVE, left=const.defaultPadding, width=16, height=16, idx=0)
        self.sr.dragIcon = dragIcon = FittingDraggableIcon(name='theicon', align=uiconst.TOPLEFT, parent=topParent, height=64, width=64, top=const.defaultPadding, left=const.defaultPadding)
        dragIcon.Startup(self.fitting)
        dragIcon.hint = localization.GetByLabel('UI/Fitting/FittingWindow/FittingManagement/FittingIconHint')
        dragIcon.OnClick = self.ClickDragIcon
        dragIcon.state = uiconst.UI_NORMAL
        fittingNameContainer = uiprimitives.Container(parent=topRightParent, align=uiconst.TOTOP, height=20)
        self.sr.fittingName = uicontrols.SinglelineEdit(name='fittingName', parent=fittingNameContainer, align=uiconst.TOPLEFT, pos=(const.defaultPadding,
         1,
         120,
         0), maxLength=40)
        shipInfoContainer = uiprimitives.Container(parent=topRightParent, align=uiconst.TOTOP, height=20)
        self.sr.shipTypeName = uicontrols.EveLabelMedium(text='', parent=shipInfoContainer, align=uiconst.RELATIVE, state=uiconst.UI_NORMAL, left=const.defaultPadding)
        self.sr.infoicon = InfoIcon(parent=shipInfoContainer, left=1, top=0, idx=0, state=uiconst.UI_HIDDEN)
        self.sr.infoicon.OnClick = self.ShowInfo
        self.sr.radioButton = uiprimitives.Container(name='', parent=topRightParent, align=uiconst.TOPLEFT, height=50, width=100, top=fittingNameContainer.height + shipInfoContainer.height)
        radioBtns = []
        for cfgname, value, label, checked, group in [['fittingNone',
          session.charid,
          localization.GetByLabel('UI/Fitting/FittingWindow/FittingManagement/Personal'),
          self.ownerID == None,
          'ownership'], ['fittingOwnerCorporation',
          session.corpid,
          localization.GetByLabel('UI/Fitting/FittingWindow/FittingManagement/Corporation'),
          self.ownerID == session.corpid,
          'ownership']]:
            radioBtns.append(uicontrols.Checkbox(text=label, parent=self.sr.radioButton, configName=cfgname, retval=value, checked=checked, groupname=group, callback=None))

        self.sr.radioButtons = radioBtns
        self.sr.fittingDescription = uicls.EditPlainText(setvalue=None, parent=bottomParent, align=uiconst.TOALL, maxLength=400)
        self.sr.fittingInfo = uicontrols.Scroll(name='fittingInfoScroll', parent=bottomParent)
        tabs = [[localization.GetByLabel('UI/Fitting/FittingWindow/FittingManagement/Fittings'),
          self.sr.fittingInfo,
          self,
          None,
          self.sr.fittingInfo], [localization.GetByLabel('UI/Common/Description'),
          self.sr.fittingDescription,
          self,
          None,
          self.sr.fittingDescription]]
        self.fittingInfoTab = uicontrols.TabGroup(name='tabparent', parent=bottomParent, idx=0)
        self.fittingInfoTab.Startup(tabs, 'fittingInfoTab')
        self.sr.fittingInfo.Startup()
        saveDeleteButtons = FlowContainer(name='buttonParent', parent=self.sr.rightside, align=uiconst.TOBOTTOM, padding=6, autoHeight=True, centerContent=True, contentSpacing=uiconst.BUTTONGROUPMARGIN, idx=0)
        self.fitBtn = Button(parent=saveDeleteButtons, label=localization.GetByLabel('UI/Fitting/FittingWindow/FittingManagement/Fit'), func=self.Fit, align=uiconst.NOALIGN)
        self.saveBtn = Button(parent=saveDeleteButtons, label=localization.GetByLabel('UI/Common/Buttons/Save'), func=self.Save, align=uiconst.NOALIGN)
        self.deleteBtn = Button(parent=saveDeleteButtons, label=localization.GetByLabel('UI/Common/Buttons/Delete'), func=self.Delete, align=uiconst.NOALIGN)
        if boot.region != 'optic':
            self.exportBtn = Button(parent=saveDeleteButtons, label=localization.GetByLabel('UI/Fitting/FittingWindow/FittingManagement/ExportToClipboard'), func=self.ExportFittingToClipboard, align=uiconst.NOALIGN)
            self.exportBtn.hint = localization.GetByLabel('UI/Fitting/FittingWindow/FittingManagement/ExportToClipboardHint')
Beispiel #16
0
 STATE_PURSUIT: 'STATE_PURSUIT',
 STATE_FLEEING: 'STATE_FLEEING',
 STATE_REINFORCED: 'STATE_REINFORCED',
 STATE_OPERATING: 'STATE_OPERATING',
 STATE_ENGAGE: 'STATE_ENGAGE',
 STATE_VULNERABLE: 'STATE_VULNERABLE',
 STATE_SHIELD_REINFORCE: 'STATE_SHIELD_REINFORCE',
 STATE_ARMOR_REINFORCE: 'STATE_ARMOR_REINFORCE',
 STATE_INVULNERABLE: 'STATE_INVULNERABLE',
 STATE_WARPAWAYANDDIE: 'STATE_WARPAWAYANDDIE',
 STATE_WARPAWAYANDCOMEBACK: 'STATE_WARPAWAYANDCOMEBACK',
 STATE_WARPTOPOSITION: 'STATE_WARPTOPOSITION',
 STATE_SALVAGING: 'STATE_SALVAGING'}
INCAPACITATION_DISTANCE = 250000
COMMAND_DISTANCE = INCAPACITATION_DISTANCE
POS_STRUCTURE_STATE = {const.pwnStructureStateAnchored: localization.GetByLabel('UI/Entities/States/Anchored'),
 const.pwnStructureStateAnchoring: localization.GetByLabel('UI/Entities/States/Anchoring'),
 const.pwnStructureStateIncapacitated: localization.GetByLabel('UI/Entities/States/Incapacitated'),
 const.pwnStructureStateInvulnerable: localization.GetByLabel('UI/Entities/States/Invulnerable'),
 const.pwnStructureStateOnline: localization.GetByLabel('UI/Entities/States/Online'),
 const.pwnStructureStateOnlining: localization.GetByLabel('UI/Entities/States/Onlining'),
 const.pwnStructureStateOperating: localization.GetByLabel('UI/Entities/States/Operating'),
 const.pwnStructureStateReinforced: localization.GetByLabel('UI/Entities/States/Reinforced'),
 const.pwnStructureStateUnanchored: localization.GetByLabel('UI/Entities/States/Unanchored'),
 const.pwnStructureStateUnanchoring: localization.GetByLabel('UI/Entities/States/Unanchoring'),
 const.pwnStructureStateVulnerable: localization.GetByLabel('UI/Entities/States/Vulnerable'),
 const.pwnStructureStateAnchor: localization.GetByLabel('UI/Inflight/MoonMining/Structures/Anchor'),
 const.pwnStructureStateUnanchor: localization.GetByLabel('UI/Inflight/MoonMining/Structures/Unanchor'),
 const.pwnStructureStateOffline: localization.GetByLabel('UI/Inflight/MoonMining/Structures/Offline'),
 const.pwnStructureStateOnlineActive: localization.GetByLabel('UI/Inflight/MoonMining/States/OnlineActive'),
 const.pwnStructureStateOnlineStartingUp: localization.GetByLabel('UI/Inflight/MoonMining/States/OnlineStartingUp')}
    def ApplyAttributes(self, attributes):
        Window.ApplyAttributes(self, attributes)
        initialUrl = attributes.initialUrl
        self.reloadingTrustedSites = False
        self.awaitingTitle = False
        self.nextTabID = 1
        self.currentTab = None
        self.browserHostManager = sm.GetService(
            'browserHostManager').GetBrowserHost()
        self.tabs = []
        self.browserButtons = (('Back', self.HistoryBack, 20, 'back',
                                'UI/Browser/Back'),
                               ('Forward', self.HistoryForward, 60, 'next',
                                'UI/Browser/Forward'), (None, None, None, None,
                                                        None),
                               ('Reload', self.ReloadPage, -40, 'reload',
                                'UI/Browser/Reload'),
                               ('Stop', self.StopLoading, 20, 'stop',
                                'UI/Browser/Stop'), (None, None, None, None,
                                                     None),
                               ('Home', self.GoHome, 0, 'home',
                                'UI/Browser/Home'))
        self.MakeUnstackable()
        self.SetMinSize([260, 180])
        self.SetMaxSize([uicore.desktop.width, uicore.desktop.height])
        self.PrepareMenuBar()
        self.PrepareNavigationBar()
        self.PrepareNavigationButtons()
        self.PrepareTabBar()
        self.PrepareStatusBar()
        mainArea = self.GetMainArea()
        if not settings.user.ui.Get('browserShowNavBar', True):
            self.navigationBar.state = uiconst.UI_HIDDEN
        if not settings.user.ui.Get('browserShowStatusBar', True):
            self.statusBar.state = uiconst.UI_HIDDEN
        for name, GetMenu in [
            (localization.GetByLabel('UI/Browser/View'), lambda:
             [(localization.GetByLabel('UI/Browser/Reload'), self.ReloadPage,
               ()),
              (localization.GetByLabel('UI/Browser/ViewSource'), self.
               DocumentSource, ()),
              (localization.GetByLabel(
                  'UI/Browser/BrowserHistory/BrowserHistoryCaption'), self.
               OpenBrowserHistory, ())]),
            (localization.GetByLabel('UI/Browser/Bookmarks'),
             self.GetBookmarkMenu),
            (localization.GetByLabel('UI/Browser/Options'),
             lambda: [(localization.GetByLabel('UI/Browser/GeneralSettings'),
                       self.EditGeneralSettings, ()), None,
                      (localization.GetByLabel('UI/Browser/TrustedSites'), self
                       .EditSites, ('trusted', ))])
        ]:
            opt = WindowDropDownMenu(name='menuoption', parent=self.menuBar)
            opt.Setup(name, GetMenu)

        self.crashNotifierContainer = Container(name='crashNotifierContainer',
                                                parent=mainArea,
                                                align=uiconst.CENTER,
                                                state=uiconst.UI_HIDDEN,
                                                width=240,
                                                height=80,
                                                idx=0)
        crashText = Label(text=localization.GetByLabel('UI/Browser/Crashed'),
                          parent=self.crashNotifierContainer,
                          width=220,
                          left=10,
                          top=10,
                          fontsize=16,
                          letterspace=1)
        Fill(parent=self.crashNotifierContainer, color=(0.0, 0.0, 0.0, 1.0))
        self.crashNotifierContainer.height = max(80, crashText.textheight + 20)
        bp = browser.BrowserPane(parent=mainArea,
                                 align=uiconst.TOALL,
                                 state=uiconst.UI_NORMAL,
                                 padLeft=const.defaultPadding + 6,
                                 padRight=const.defaultPadding + 6,
                                 padTop=6,
                                 padBottom=6)
        bp.Startup()
        self.browserPane = bp
        Fill(parent=mainArea,
             color=(0.0, 0.0, 0.0, 1.0),
             padLeft=const.defaultPadding,
             padRight=const.defaultPadding)
        self.OnClientFlaggedListsChange()
        browseToUrl = initialUrl
        if browseToUrl is None or browseToUrl == 'home':
            browseToUrl = str(
                settings.user.ui.Get('HomePage2',
                                     browserutil.DefaultHomepage()))
        self.AddTab(browseToUrl)
Beispiel #18
0
 def GetDefaultColumnWidth():
     return {
         localization.GetByLabel('UI/Industry/Facility'): 230,
         localization.GetByLabel('UI/Common/Owner'): 230
     }
def RealEnterWormhole(itemID):
    fromSecClass = sm.StartService('map').GetSecurityClass(session.solarsystemid)
    if fromSecClass == const.securityClassHighSec and eve.Message('WormholeJumpingFromHiSec', {}, uiconst.YESNO, suppress=uiconst.ID_YES) != uiconst.ID_YES:
        return
    log.LogNotice('Wormhole Jump from', session.solarsystemid2, 'to', itemID)
    sm.StartService('sessionMgr').PerformSessionChange(localization.GetByLabel('UI/Inflight/EnterWormhole'), sm.RemoteSvc('wormholeMgr').WormholeJump, itemID)
Beispiel #20
0
 def GetHeaders(showInstallation=True, showLocation=True):
     return (localization.GetByLabel('UI/Common/Jumps'),
             localization.GetByLabel('UI/Common/Security'),
             localization.GetByLabel('UI/Industry/Facility'),
             localization.GetByLabel(
                 industryUIConst.ACTIVITY_NAMES[ACTIVITIES[0]]),
             localization.GetByLabel(
                 industryUIConst.ACTIVITY_NAMES[ACTIVITIES[1]]),
             localization.GetByLabel(
                 industryUIConst.ACTIVITY_NAMES[ACTIVITIES[2]]),
             localization.GetByLabel(
                 industryUIConst.ACTIVITY_NAMES[ACTIVITIES[3]]),
             localization.GetByLabel(
                 industryUIConst.ACTIVITY_NAMES[ACTIVITIES[4]]),
             localization.GetByLabel('UI/Industry/Tax'),
             localization.GetByLabel('UI/Industry/FacilityType'),
             localization.GetByLabel('UI/Common/Owner'))
Beispiel #21
0
 def GetClassHint(cls):
     if sm.GetService('infoPanel').GetModeForPanel(
             cls.panelTypeID) != MODE_COLLAPSED:
         return localization.GetByLabel(cls.label)
Beispiel #22
0
    def SetupEducationSection(self, *args):
        info = self.GetInfo()
        padding = self.padValue
        if self.sr.educationCont:
            self.sr.educationCont.Close()
        self.sr.educationCont = uiprimitives.Container(
            name='educationCont',
            parent=self.sr.rightSide,
            align=uiconst.TOTOP,
            height=self.startEducationHeight,
            padding=(padding, padding, padding, 0))
        sub = uiprimitives.Container(name='sub',
                                     parent=self.sr.educationCont,
                                     align=uiconst.TOALL,
                                     state=uiconst.UI_PICKCHILDREN,
                                     padding=(padding, padding, padding,
                                              padding))
        topCont = uiprimitives.Container(name='topCont',
                                         parent=sub,
                                         align=uiconst.TOTOP,
                                         state=uiconst.UI_PICKCHILDREN,
                                         pos=(0, 30, 0, 78))
        text = uicls.CCLabel(state=uiconst.UI_NORMAL,
                             parent=sub,
                             text=localization.GetByLabel(
                                 'UI/CharacterCreation/EducationSelection'),
                             fontsize=20,
                             align=uiconst.TOPLEFT,
                             letterspace=1,
                             idx=1,
                             pos=(0, -6, 0, 0),
                             uppercase=1,
                             color=ccConst.COLOR50)
        text.hint = localization.GetByLabel(
            'UI/CharacterCreation/HelpTexts/chooseEducationHint')
        self.schoolTextCont = textCont = uiprimitives.Container(
            name='textCont',
            parent=sub,
            align=uiconst.TOALL,
            state=uiconst.UI_PICKCHILDREN)
        self.sr.schoolNameText = uicls.CCLabel(parent=textCont,
                                               text='',
                                               fontsize=14,
                                               align=uiconst.TOPLEFT,
                                               letterspace=1,
                                               idx=1,
                                               pos=(0, 0, 0, 0),
                                               color=ccConst.COLOR50)
        self.sr.schoolDescrText = uicls.CCLabel(parent=textCont,
                                                text='',
                                                fontsize=10,
                                                align=uiconst.TOTOP,
                                                letterspace=0,
                                                idx=1,
                                                padTop=20,
                                                shadowOffset=(0, 0),
                                                bold=0,
                                                color=ccConst.COLOR50)
        hiliteFrame = uicontrols.Frame(name='hiliteFrame',
                                       parent=self.sr.educationCont,
                                       frameConst=ccConst.MAINFRAME_INV)
        uiprimitives.Fill(name='fill',
                          parent=self.sr.educationCont,
                          color=(0.0, 0.0, 0.0, 0.5))
        if not self.schoolInfo:
            schools = sm.GetService('cc').GetData('schools',
                                                  ['raceID', info.raceID], 1)
            for each in schools:
                info = sm.GetService('cc').GetData('schools',
                                                   ['schoolID', each.schoolID])
                self.schoolInfo[each.schoolID] = info

        left = 0
        offsetByRace = {
            const.raceCaldari: 17,
            const.raceMinmatar: 14,
            const.raceAmarr: 11,
            const.raceGallente: 20
        }
        iconNumOffset = offsetByRace.get(info.raceID)
        for schoolID, info in self.schoolInfo.iteritems():
            c = uiprimitives.Container(name='c',
                                       parent=topCont,
                                       align=uiconst.TOPLEFT,
                                       state=uiconst.UI_PICKCHILDREN,
                                       pos=(left, 0, 100, 80))
            hexName = localization.GetByMessageID(info.schoolNameID)
            label = uicls.CCLabel(parent=c,
                                  text='<center>%s' % hexName,
                                  fontsize=12,
                                  align=uiconst.CENTERTOP,
                                  letterspace=0,
                                  idx=1,
                                  pos=(0, 46, c.width, 0),
                                  shadowOffset=(0, 0),
                                  bold=0,
                                  color=ccConst.COLOR50)
            hex = uicls.CCHexButtonSchool(name='schoolHex',
                                          parent=c,
                                          align=uiconst.CENTERTOP,
                                          state=uiconst.UI_NORMAL,
                                          pos=(0, -10, 64, 64),
                                          pickRadius=32,
                                          info=info,
                                          id=schoolID,
                                          hexName=hexName,
                                          func=self.SetSchool,
                                          iconNum=schoolID - iconNumOffset)
            left += 110
            self.schoolConts[schoolID] = hex
Beispiel #23
0
 def Load(self, node):
     self.sr.node = node
     c = node.contract
     numJumps = node.numJumps
     self.sr.node.contractID = c.contractID
     self.sr.node.solarSystemID = c.startSolarSystemID
     self.sr.node.name = name = GetContractTitle(c, node.contractItems)
     if prefs.GetValue('contractsSimpleView', 0):
         self.sr.icon.state = uiconst.UI_HIDDEN
         self.sr.contractIconParent.width = 6
     else:
         self.sr.icon.state = uiconst.UI_DISABLED
         self.sr.contractIconParent.width = self.iconSize + 5
     label = '<color=0xFFFFA600>%s</color>' % name
     if len(node.contractItems) == 1:
         item = node.contractItems[0]
         group = cfg.invtypes.Get(item.itemTypeID).Group()
         if group.categoryID == const.categoryBlueprint:
             if item.copy:
                 label += ' (%s)' % localization.GetByLabel(
                     'UI/Generic/Copy').lower()
             else:
                 label += ' (%s)' % localization.GetByLabel(
                     'UI/Generic/Original').lower()
     if c.type == const.conTypeAuction:
         label += ' (%s)' % localization.GetByLabel(
             'UI/Contracts/Auction').lower()
     self.sr.contractLabel.SetText(label)
     if c.type in [const.conTypeAuction, const.conTypeItemExchange] and len(
             node.contractItems) == 1:
         typeID = node.contractItems[0].itemTypeID
         self.sr.icon.LoadIconByTypeID(typeID=typeID,
                                       size=32,
                                       ignoreSize=True,
                                       isCopy=getattr(
                                           node.contractItems[0], 'copy',
                                           False))
         if self.sr.icon.state != uiconst.UI_HIDDEN:
             uix.GetTechLevelIcon(self.sr.techIcon, 1, typeID)
     else:
         self.sr.icon.LoadIcon(GetContractIcon(node.contract.type),
                               ignoreSize=True)
         self.sr.techIcon.state = uiconst.UI_HIDDEN
     numJumpsTxt = ''
     if numJumps == 0:
         if c.startStationID == session.stationid:
             numJumpsTxt = localization.GetByLabel(
                 'UI/Generic/CurrentStation')
         elif c.startSolarSystemID == session.solarsystemid2:
             numJumpsTxt = localization.GetByLabel(
                 'UI/Generic/CurrentSystem')
     elif numJumps == 1:
         numJumpsTxt = localization.GetByLabel('UI/Contracts/OneJumpAway')
     else:
         numJumpsTxt = localization.GetByLabel(
             'UI/Contracts/ContractEntry/NumJumpsAway', numJumps=numJumps)
     if int(node.numJumps) > cc.NUMJUMPS_UNREACHABLE:
         numJumpsTxt = '<color=0xffff6666>%s</color>' % localization.GetByLabel(
             'UI/Generic/Unreachable').upper()
     self.sr.jumpsLabel.SetText(numJumpsTxt)
     self.sr.timeLeftLabel.SetText(GetContractTimeLeftText(c))
     self.SetHint(node, label)
Beispiel #24
0
 def SetupNameSection(self, *args):
     info = self.GetInfo()
     padding = self.padValue
     if self.sr.nameCont:
         self.sr.nameCont.Close()
     if self.isSerenity:
         maxFirstNameChars = 37
         contHeight = 120
     else:
         maxFirstNameChars = 24
         contHeight = 160
     self.sr.nameCont = uiprimitives.Container(name='nameCont',
                                               parent=self.sr.rightSide,
                                               align=uiconst.TOTOP,
                                               pos=(0, 0, 0, contHeight),
                                               padding=(padding, padding,
                                                        padding, 0))
     if not uicore.layer.charactercreation.CanChangeName():
         self.sr.nameCont.height = 0
         return
     sub = uiprimitives.Container(name='sub',
                                  parent=self.sr.nameCont,
                                  align=uiconst.TOALL,
                                  state=uiconst.UI_PICKCHILDREN,
                                  padding=(padding, padding, padding,
                                           padding))
     hiliteFrame = uicontrols.Frame(name='hiliteFrame',
                                    parent=self.sr.nameCont,
                                    frameConst=ccConst.MAINFRAME_INV)
     uiprimitives.Fill(name='fill',
                       parent=self.sr.nameCont,
                       color=(0.0, 0.0, 0.0, 0.5))
     text = uicls.CCLabel(
         parent=sub,
         text=localization.GetByLabel('UI/CharacterCreation/NameSelection'),
         fontsize=20,
         align=uiconst.TOPLEFT,
         letterspace=1,
         idx=1,
         pos=(0, -6, 0, 0),
         uppercase=1,
         color=ccConst.COLOR50)
     text.SetRGB(1.0, 1.0, 1.0)
     text.SetAlpha(1.0)
     top = 30
     firstName = info.charFirstName or ''
     self.sr.firstNameEdit = edit = uicontrols.SinglelineEdit(
         name='firstNameEdit',
         setvalue=firstName,
         parent=sub,
         pos=(0, top, 150, 0),
         maxLength=maxFirstNameChars,
         align=uiconst.TOTOP,
         OnChange=self.EnteringName,
         color=(1.0, 1.0, 1.0, 1.0),
         hinttext=localization.GetByLabel('UI/CharacterCreation/FirstName'))
     edit.OnReturn = self.CheckAvailability
     edit.OnAnyChar = self.OnCharInFirstName
     offset = 20
     if not self.isSerenity:
         btnTop = edit.top + edit.height + offset - 2
         btn = uicls.CharCreationButton(
             parent=sub,
             label=localization.GetByLabel(
                 'UI/CharacterCreation/Randomize'),
             pos=(0, btnTop, 0, 0),
             align=uiconst.TOPRIGHT,
             func=self.RandomizeLastName)
         rightPadding = btn.width + 10
         lastNameEditCont = uiprimitives.Container(
             name='lastNameEditCont',
             parent=sub,
             align=uiconst.TOTOP,
             state=uiconst.UI_PICKCHILDREN,
             pos=(0, offset - 10, 0, 29),
             padding=(0, 0, rightPadding, 0))
         lastNameEditCont.isTabOrderGroup = 1
         lastName = info.charLastName or ''
         self.sr.lastNameEdit = edit = uicontrols.SinglelineEdit(
             name='lastNameEdit',
             parent=lastNameEditCont,
             setvalue=lastName,
             pos=(0, 10, 0, 0),
             maxLength=12,
             align=uiconst.TOTOP,
             OnChange=self.EnteringName,
             color=(1.0, 1.0, 1.0, 1.0),
             hinttext=localization.GetByLabel(
                 'UI/CharacterCreation/LastName'))
         edit.OnReturn = self.CheckAvailability
         edit.OnAnyChar = self.OnCharInLastName
         self.sr.firstNameEdit.padRight = rightPadding
     availCont = uiprimitives.Container(name='availCont',
                                        parent=sub,
                                        align=uiconst.TOTOP,
                                        state=uiconst.UI_PICKCHILDREN,
                                        pos=(0, offset, 0, 0))
     availBtn = uicls.CharCreationButton(
         parent=availCont,
         label=localization.GetByLabel(
             'UI/CharacterCreation/CheckNameAvailability'),
         pos=(0, 0, 0, 0),
         align=uiconst.TOPLEFT,
         func=self.CheckAvailability)
     availCont.height = availBtn.height
     left = availBtn.width + 4
     self.sr.availabilityLabel = uicontrols.EveLabelMedium(
         parent=availCont,
         align=uiconst.CENTERLEFT,
         left=left + 16,
         state=uiconst.UI_DISABLED)
     self.sr.availableIcon = uicontrols.Icon(parent=availCont,
                                             align=uiconst.CENTERLEFT,
                                             pos=(left, 0, 16, 16),
                                             state=uiconst.UI_HIDDEN)
     self.sr.availableIcon.LoadIcon('ui_38_16_193')
Beispiel #25
0
 def GetDynamicHeight(_self, *args):
     text = localization.GetByLabel('UI/Contracts/ContractEntry/WantToBuy')
     textWidth, textHeight = uicontrols.EveLabelMedium.MeasureTextSize(text)
     if not prefs.GetValue('contractsSimpleView', 0):
         textHeight *= 2
     return textHeight + const.defaultPadding
Beispiel #26
0
 def CheckAvailability(self, *args):
     if self.checkingName:
         return
     else:
         self.checkingName = 1
         charFirstName = self.sr.firstNameEdit.GetValue()
         if self.isSerenity:
             charLastName = ''
         else:
             charLastName = self.sr.lastNameEdit.GetValue()
             self.sr.lastNameEdit.CloseHistoryMenu()
         self.sr.firstNameEdit.CloseHistoryMenu()
         charName = charFirstName.strip()
         if charLastName:
             charName += ' %s' % charLastName
         self.NotifyCCLayerOfAvailabilityCheck(charName)
         if charName in self.namesChecked:
             valid = self.namesChecked[charName]
         else:
             valid = sm.RemoteSvc('charUnboundMgr').ValidateNameEx(
                 charName, len(self.namesChecked))
             self.namesChecked[charName] = valid
         self.sr.availableIcon.state = uiconst.UI_DISABLED
         self.sr.availabilityLabel.state = uiconst.UI_DISABLED
         isAvailable = util.KeyVal()
         self.checkingName = 0
         if valid == 1:
             self.sr.availableIcon.LoadIcon('ui_38_16_193')
             self.sr.availabilityLabel.text = ''
             isAvailable.charName = charName
             isAvailable.reason = ''
             uicore.layer.charactercreation.setFirstLastNameCallback(
                 charFirstName, charLastName)
             return isAvailable
         validStates = {
             -1:
             localization.GetByLabel(
                 'UI/CharacterCreation/InvalidName/TooShort'),
             -2:
             localization.GetByLabel(
                 'UI/CharacterCreation/InvalidName/TooLong'),
             -5:
             localization.GetByLabel(
                 'UI/CharacterCreation/InvalidName/IllegalCharacter'),
             -6:
             localization.GetByLabel(
                 'UI/CharacterCreation/InvalidName/TooManySpaces'),
             -7:
             localization.GetByLabel(
                 'UI/CharacterCreation/InvalidName/ConsecutiveSpaces'),
             -101:
             localization.GetByLabel(
                 'UI/CharacterCreation/InvalidName/Unavailable'),
             -102:
             localization.GetByLabel(
                 'UI/CharacterCreation/InvalidName/Unavailable')
         }
         reason = validStates.get(
             valid,
             localization.GetByLabel(
                 'UI/CharacterCreation/InvalidName/IllegalCharacter'))
         self.sr.availableIcon.LoadIcon('ui_38_16_194')
         self.sr.availabilityLabel.text = reason
         if not self.isSerenity:
             self.sr.lastNameEdit.SelectAll()
             uicore.registry.SetFocus(self.sr.lastNameEdit)
         isAvailable.charName = None
         isAvailable.reason = reason
         return isAvailable
 def OnEntrySelected(self, typeID):
     uix.Flush(self.sr.icon)
     typeIcon = uicontrols.Icon(parent=self.sr.icon, align=uiconst.TOPLEFT, pos=(0, 10, 64, 64), ignoreSize=True, typeID=typeID, size=64)
     text = cfg.invtypes.Get(typeID).description
     info = localization.GetByLabel('UI/InfrastructureHub/EntryDescription', item=typeID, description=text)
     self.sr.desc.SetValue(info)
Beispiel #28
0
    def SetupAncestrySection(self, *args):
        info = self.GetInfo()
        padding = self.padValue
        if self.sr.ancestyCont:
            self.sr.ancestyCont.Close()
        self.sr.ancestyCont = uiprimitives.Container(
            name='ancestryCont',
            parent=self.sr.rightSide,
            align=uiconst.TOTOP,
            height=self.startAncestryHeight,
            padding=(padding, padding, padding, 0))
        sub = uiprimitives.Container(name='sub',
                                     parent=self.sr.ancestyCont,
                                     align=uiconst.TOALL,
                                     state=uiconst.UI_PICKCHILDREN,
                                     padding=(padding, padding, padding,
                                              padding))
        topCont = uiprimitives.Container(name='topCont',
                                         parent=sub,
                                         align=uiconst.TOTOP,
                                         state=uiconst.UI_PICKCHILDREN,
                                         pos=(0, 30, 0, 78))
        text = uicls.CCLabel(state=uiconst.UI_NORMAL,
                             parent=sub,
                             text=localization.GetByLabel(
                                 'UI/CharacterCreation/AncestrySelection'),
                             fontsize=20,
                             align=uiconst.TOPLEFT,
                             letterspace=1,
                             idx=1,
                             pos=(0, -6, 0, 0),
                             uppercase=1,
                             color=ccConst.COLOR50)
        text.hint = localization.GetByLabel(
            'UI/CharacterCreation/HelpTexts/chooseAncestryHint')
        self.ancestryTextCont = textCont = uiprimitives.Container(
            name='textCont',
            parent=sub,
            align=uiconst.TOALL,
            state=uiconst.UI_PICKCHILDREN)
        self.sr.ancestryNameText = uicls.CCLabel(parent=textCont,
                                                 text='',
                                                 fontsize=14,
                                                 align=uiconst.TOPLEFT,
                                                 letterspace=1,
                                                 idx=1,
                                                 pos=(0, 0, 0, 0),
                                                 color=ccConst.COLOR50)
        self.sr.ancestryDescrText = uicls.CCLabel(parent=textCont,
                                                  text='',
                                                  fontsize=10,
                                                  align=uiconst.TOTOP,
                                                  letterspace=0,
                                                  idx=1,
                                                  padTop=20,
                                                  shadowOffset=(0, 0),
                                                  bold=0,
                                                  color=ccConst.COLOR50)
        hiliteFrame = uicontrols.Frame(name='hiliteFrame',
                                       parent=self.sr.ancestyCont,
                                       frameConst=ccConst.MAINFRAME_INV)
        uiprimitives.Fill(name='fill',
                          parent=self.sr.ancestyCont,
                          color=(0.0, 0.0, 0.0, 0.5))
        if not self.ancestryInfo:
            ancestries = sm.GetService('cc').GetData(
                'ancestries', ['bloodlineID', info.bloodlineID], 1)
            for each in ancestries:
                self.ancestryInfo[each.ancestryID] = each

        self.ancestryConts = {}
        left = 0
        for i, (ancestryID, info) in enumerate(self.ancestryInfo.iteritems()):
            c = uiprimitives.Container(name='c',
                                       parent=topCont,
                                       align=uiconst.TOPLEFT,
                                       state=uiconst.UI_PICKCHILDREN,
                                       pos=(left, 0, 100, 80))
            hexName = localization.GetByMessageID(info.ancestryNameID)
            label = uicls.CCLabel(parent=c,
                                  text='<center>%s' % hexName,
                                  fontsize=12,
                                  align=uiconst.CENTERTOP,
                                  letterspace=0,
                                  idx=1,
                                  pos=(0, 46, c.width, 0),
                                  shadowOffset=(0, 0),
                                  bold=0,
                                  color=ccConst.COLOR50)
            hex = uicls.CCHexButtonAncestry(name='ancestryHex',
                                            parent=c,
                                            align=uiconst.CENTERTOP,
                                            state=uiconst.UI_NORMAL,
                                            pos=(0, -10, 64, 64),
                                            pickRadius=32,
                                            info=info,
                                            id=ancestryID,
                                            hexName=hexName,
                                            func=self.SetAncestry,
                                            iconNum=ancestryID - 1)
            left += 110
            self.ancestryConts[ancestryID] = hex
Beispiel #29
0
 def ApplyAttributes(self, attributes):
     uicontrols.SE_BaseClassCore.ApplyAttributes(self, attributes)
     self.iconsize = iconsize = 44
     LineUnderlay(parent=self, align=uiconst.TOBOTTOM)
     self.factionParent = uiprimitives.Container(name='factionParent',
                                                 parent=self,
                                                 align=uiconst.TOLEFT,
                                                 pos=(0, 0, 64, 64),
                                                 padding=MARGIN)
     middleCont = uiprimitives.Container(parent=self,
                                         name='middleContainer',
                                         width=MIDDLECONTAINER_WIDTH,
                                         align=uiconst.TOLEFT,
                                         padTop=MARGIN,
                                         clipChildren=True)
     self.constellationLabel = BigReportLabel(name='constellationName',
                                              parent=middleCont,
                                              fontsize=20,
                                              align=uiconst.TOTOP,
                                              state=uiconst.UI_NORMAL)
     self.statusText = SmallReportLabel(parent=middleCont,
                                        align=uiconst.TOTOP,
                                        uppercase=True)
     SmallReportLabel(name='systemInfluence',
                      parent=middleCont,
                      align=uiconst.TOTOP,
                      text=localization.GetByLabel(
                          'UI/Incursion/Common/HUDInfluenceTitle'))
     self.statusBar = uicls.SystemInfluenceBar(parent=middleCont,
                                               pos=(0, 0, 200, 10),
                                               align=uiconst.TOTOP,
                                               padding=(0, 4, 0, 4))
     self.stagingText = SmallReportLabel(parent=middleCont,
                                         align=uiconst.TOTOP,
                                         state=uiconst.UI_NORMAL)
     self.bossIcon = uicls.IncursionBossIcon(parent=middleCont,
                                             left=3,
                                             top=3,
                                             align=uiconst.TOPRIGHT,
                                             idx=0)
     btn = uix.GetBigButton(iconsize,
                            self,
                            left=self.BUTTON_OFFSET,
                            top=MARGIN,
                            align=uiconst.BOTTOMLEFT)
     btn.hint = localization.GetByLabel(
         'UI/Incursion/Journal/ShowActiveCorpMembersInMap')
     btn.sr.icon.LoadIcon('res:/ui/Texture/WindowIcons/corpmap.png',
                          ignoreSize=True)
     self.corpMapButton = btn
     btn = uix.GetBigButton(iconsize,
                            self,
                            left=self.BUTTON_OFFSET + 50,
                            top=MARGIN,
                            align=uiconst.BOTTOMLEFT)
     btn.hint = localization.GetByLabel(
         'UI/Incursion/Journal/ShowOnStarMap')
     btn.sr.icon.LoadIcon('res:/ui/Texture/WindowIcons/map.png',
                          ignoreSize=True)
     self.mapButton = btn
     btn = uix.GetBigButton(iconsize,
                            self,
                            left=self.BUTTON_OFFSET + 100,
                            top=MARGIN,
                            align=uiconst.BOTTOMLEFT)
     btn.hint = localization.GetByLabel(
         'UI/Incursion/Journal/StagingAsAutopilotDestination')
     btn.sr.icon.LoadIcon('res:/ui/Texture/WindowIcons/ships.png',
                          ignoreSize=True)
     self.autopilotButton = btn
     btn = uix.GetBigButton(iconsize,
                            self,
                            left=self.BUTTON_OFFSET,
                            top=MARGIN)
     btn.hint = localization.GetByLabel(
         'UI/Incursion/Journal/ViewLoyaltyPointLog')
     btn.sr.icon.LoadIcon('res:/ui/Texture/WindowIcons/lpstore.png',
                          ignoreSize=True)
     self.lpButton = btn
     self.loyaltyPoints = ReportNumber(
         name='loyaltyPoints',
         parent=self,
         pos=(self.BUTTON_OFFSET + 50, MARGIN, 105, iconsize),
         number=0,
         hint=localization.GetByLabel(
             'UI/Incursion/Journal/LoyaltyPointsWin'),
         padding=(4, 4, 4, 4))
Beispiel #30
0
    def LoadGroupFromNode(self, node, refreshing = 0, selectedIDs = [], *args):
        group = node
        settings.char.ui.Set('mail_lastnotification', group.groupID)
        notifications = []
        if group.groupID == const.notificationGroupUnread:
            notifications = sm.GetService('notificationSvc').GetFormattedUnreadNotifications()
            senders = [ value.senderID for value in sm.GetService('notificationSvc').GetUnreadNotifications() ]
        else:
            notifications = sm.GetService('notificationSvc').GetFormattedNotifications(group.groupID)
            senders = [ value.senderID for value in sm.GetService('notificationSvc').GetNotificationsByGroupID(group.groupID) ]
        sm.GetService('mailSvc').PrimeOwners(senders)
        if not self or self.destroyed:
            return
        pos = self.sr.msgScroll.GetScrollProportion()
        scrolllist = []
        for each in notifications:
            senderName = ''
            if each.senderID is not None:
                senderName = cfg.eveowners.Get(each.senderID).ownerName
            label = '<t>' + senderName + '<t>' + each.subject + '<t>' + util.FmtDate(each.created, 'ls')
            if group.groupID == const.notificationGroupUnread:
                typeGroup = notificationUtil.GetTypeGroup(each.typeID)
                labelPath = notificationUtil.groupNamePaths.get(typeGroup, None)
                if labelPath is None:
                    typeName = ''
                else:
                    typeName = localization.GetByLabel(labelPath)
                label += '<t>' + typeName
            hint = each.body.replace('<br>', '')
            hint = uiutil.TruncateStringTo(hint, HINTCUTOFF, localization.GetByLabel('UI/Common/MoreTrail'))
            data = util.KeyVal()
            data.cleanLabel = label
            data.parentNode = node
            data.label = label
            data.hint = hint
            data.id = each.notificationID
            data.typeID = each.typeID
            data.senderID = each.senderID
            data.data = util.KeyVal(read=each.processed)
            data.info = each
            data.OnClick = self.LoadReadingPaneFromEntry
            data.OnDblClick = self.DblClickNotificationEntry
            data.GetMenu = self.GetEntryMenu
            data.ignoreRightClick = 1
            data.isSelected = each.notificationID in selectedIDs
            data.Draggable_blockDrag = 1
            scrolllist.append(listentry.Get('MailEntry', data=data))

        scrollHeaders = [localization.GetByLabel('UI/Mail/Status'),
         localization.GetByLabel('UI/Mail/Sender'),
         localization.GetByLabel('UI/Mail/Subject'),
         localization.GetByLabel('UI/Mail/Received')]
        if group.groupID == const.notificationGroupUnread:
            scrollHeaders.append(localization.GetByLabel('UI/Mail/Notifications/GroupName'))
        if not self or self.destroyed:
            return
        self.sr.msgScroll.Load(contentList=scrolllist, headers=scrollHeaders, noContentHint=localization.GetByLabel('UI/Mail/Notifications/NoNotifications'))
        if not refreshing:
            self.ClearReadingPane()
        else:
            self.sr.msgScroll.ScrollToProportion(pos)
        self.UpdateCounters()