Ejemplo n.º 1
0
 def PanelShowProducts(self):
     cont = uicls.Container(parent=self.actionCont,
                            pos=(0, 0, 0, 200),
                            align=uiconst.TOTOP,
                            state=uiconst.UI_HIDDEN)
     self.productScroll = scroll = uicls.Scroll(parent=cont,
                                                name='productsScroll',
                                                align=uiconst.TOTOP,
                                                height=175)
     scroll.HideUnderLay()
     self.LoadProductScroll()
     uicls.Frame(parent=scroll, color=(1.0, 1.0, 1.0, 0.2))
     self.buttonContainer = uicls.Container(parent=self.actionCont,
                                            pos=(0, 0, 0, 30),
                                            align=uiconst.TOBOTTOM,
                                            state=uiconst.UI_PICKCHILDREN)
     btns = [[
         localization.GetByLabel('UI/PI/Common/CreateRoute'),
         self._CreateRoute, 'productScroll'
     ]]
     self.createRouteButton = uicls.ButtonGroup(btns=btns,
                                                parent=cont,
                                                line=False,
                                                alwaysLite=True)
     btns = [[
         localization.GetByLabel('UI/PI/Common/DeleteRoute'),
         self._DeleteRoute, ()
     ]]
     self.deleteRouteButton = uicls.ButtonGroup(btns=btns,
                                                parent=cont,
                                                line=False,
                                                alwaysLite=True)
     self.createRouteButton.state = uiconst.UI_HIDDEN
     self.deleteRouteButton.state = uiconst.UI_HIDDEN
     return cont
Ejemplo n.º 2
0
 def ApplyAttributes(self, attributes):
     uicls.Window.ApplyAttributes(self, attributes)
     self.homeStation = None
     self.potentialHomeStations = None
     self.cloneTypeID = None
     sm.RegisterNotify(self)
     self.SetWndIcon('ui_18_128_3', mainTop=-8)
     self.SetMinSize([350, 270])
     self.SetCaption(localization.GetByLabel('UI/Medical/Medical'))
     currentSkillPoints = sm.GetService('skills').GetSkillPoints()
     uicls.WndCaptionLabel(
         text=localization.GetByLabel('UI/Medical/Cloning'),
         subcaption=localization.GetByLabel(
             'UI/Medical/Clone/CurrentSkillPoints',
             skillPoints=util.FmtAmt(currentSkillPoints)),
         parent=self.sr.topParent,
         align=uiconst.RELATIVE)
     self.scope = 'station'
     cloneButtons = [
         ('medicalServicesChangeStationBtn',
          localization.GetByLabel('UI/Medical/Clone/ChangeStation'),
          self.PickNewHomeStation, None, 81),
         ('medicalServicesUpgradeCloneBtn',
          localization.GetByLabel('UI/Medical/Clone/UpgradeClone'),
          self.PickNewCloneType, None, 81)
     ]
     btns = uicls.ButtonGroup(btns=cloneButtons,
                              line=1,
                              forcedButtonNames=True)
     self.sr.main.children.append(btns)
     self.sr.cloneBtns = btns
     btns = uicls.ButtonGroup(btns=[
         (localization.GetByLabel('UI/Medical/JumpClone/Install'),
          self.InstallClone, (), 84),
         (localization.GetByLabel('UI/Medical/JumpClone/Destroy'),
          self.DestroyClone, (), 84)
     ],
                              line=1)
     self.sr.main.children.append(btns)
     self.sr.jumpcloneBtns = btns
     tabs = ([
         localization.GetByLabel('UI/Medical/Clone'), self.sr.main, self,
         'podclone', self.sr.cloneBtns
     ], [
         localization.GetByLabel('UI/Medical/JumpClone'), self.sr.main,
         self, 'jumpclone', self.sr.jumpcloneBtns
     ])
     self.maintabs = uicls.TabGroup(name='tabparent',
                                    parent=self.sr.main,
                                    idx=1)
     self.maintabs.Startup(tabs, 'clonespanel')
     self.sr.scroll = uicls.Scroll(
         parent=self.sr.main,
         padding=(const.defaultPadding, const.defaultPadding,
                  const.defaultPadding, const.defaultPadding))
Ejemplo n.º 3
0
    def AddBtnonly(self):
        self.new = uicls.Container(name='btnonly',
                                   parent=self.parent,
                                   align=uiconst.TOTOP,
                                   height=self.type.get('height', 20))
        btns = []
        align = uiconst.TORIGHT
        for wantedbtn in self.type['buttons']:
            if wantedbtn.has_key('align'):
                al = {'left': uiconst.CENTERLEFT, 'right': uiconst.CENTERRIGHT}
                align = al.get(wantedbtn['align'], uiconst.CENTERRIGHT)
            btns.append([
                wantedbtn['caption'], wantedbtn['function'],
                wantedbtn.get('args', 'self'), None,
                wantedbtn.get('btn_modalresult', 0),
                wantedbtn.get('btn_default', 0),
                wantedbtn.get('btn_cancel', 0)
            ])

        btns = uicls.ButtonGroup(btns=btns,
                                 subalign=align,
                                 line=0,
                                 parent=self.new,
                                 align=uiconst.TOTOP,
                                 unisize=self.type.get('uniSize', 1))
Ejemplo n.º 4
0
 def ApplyAttributes(self, attributes):
     uicls.Window.ApplyAttributes(self, attributes)
     self.locationID = attributes.get('locationID')
     locationName = attributes.get('locationName')
     note = attributes.get('note', '')
     self.typeID = attributes.get('typeID')
     self.scannerInfo = attributes.get('scannerInfo')
     self.parentID = attributes.get('parentID')
     self.bookmark = attributes.get('bookmark')
     if self.bookmark is None:
         self.SetCaption(localization.GetByLabel('UI/PeopleAndPlaces/NewBookmark'))
     else:
         self.SetCaption(localization.GetByLabel('UI/PeopleAndPlaces/EditLocation'))
     self.SetMinSize([280, 186])
     main = uicls.Container(name='main', parent=self.sr.main, align=uiconst.TOALL, left=4, width=4)
     labelContainer = uicls.Container(name='labelContainer', parent=main, align=uiconst.TOTOP, top=8, height=20, padding=(2, 2, 2, 2))
     uicls.EveLabelMedium(text=localization.GetByLabel('UI/PeopleAndPlaces/Label'), parent=labelContainer, align=uiconst.TOLEFT, width=60)
     self.labelEdit = uicls.SinglelineEdit(name='labelEdit', setvalue=locationName, parent=labelContainer, align=uiconst.TOALL, width=0)
     self.labelEdit.OnReturn = self.Confirm
     descriptionContainer = uicls.Container(name='descriptionContainer', parent=main, align=uiconst.TOTOP, top=8, height=60, padding=(2, 2, 2, 2))
     uicls.EveLabelMedium(text=localization.GetByLabel('UI/PeopleAndPlaces/Notes'), parent=descriptionContainer, align=uiconst.TOLEFT, width=60)
     self.notesEdit = uicls.EditPlainText(name='notesEdit', setvalue=note, parent=descriptionContainer, align=uiconst.TOALL)
     folderContainer = uicls.Container(name='folderContainer', parent=main, align=uiconst.TOTOP, top=8, height=20, padding=(2, 2, 2, 2))
     uicls.EveLabelMedium(text=localization.GetByLabel('UI/PeopleAndPlaces/Folder'), parent=folderContainer, align=uiconst.TOLEFT, width=60)
     options = self.GetFolderOptions()
     if self.bookmark is not None:
         ownerID, folderID = self.bookmark.ownerID, self.bookmark.folderID
     else:
         ownerID, folderID = settings.char.ui.Get('defaultBookmarkOwnerAndFolder', (session.charid, None))
     self.folderCombo = uicls.Combo(name='folderCombo', parent=folderContainer, align=uiconst.TOALL, select=(ownerID, folderID), options=options, width=0)
     buttons = self.GetButtons()
     buttonGroup = uicls.ButtonGroup(name='buttonGroup', parent=main, btns=buttons)
     submitButton = buttonGroup.GetBtnByIdx(0)
     submitButton.OnSetFocus()
Ejemplo n.º 5
0
 def GetEulaConfirmation(self):
     self.waitingForEula = 1
     self.eulaclosex.state = uiconst.UI_HIDDEN
     self.eulaBlock = uicls.Fill(parent=self.eulaParent.parent, idx=self.eulaParent.parent.children.index(self.eulaParent) + 1, state=uiconst.UI_NORMAL, color=(0.0, 0.0, 0.0, 0.75))
     par = uicls.Container(name='btnpar', parent=self.eulaBrowser, align=uiconst.TOBOTTOM, height=40, idx=0)
     self.scrollText = uicls.EveLabelMedium(text=localization.GetByLabel('UI/Login/ScrollToBottom'), parent=par, align=uiconst.CENTER, idx=0, state=uiconst.UI_NORMAL)
     btns = uicls.ButtonGroup(btns=[[localization.GetByLabel('UI/Login/Accept'),
       self.AcceptEula,
       2,
       81,
       uiconst.ID_OK,
       0,
       0], [localization.GetByLabel('UI/Login/Decline'),
       self.ClickExit,
       (),
       81,
       uiconst.ID_CANCEL,
       0,
       1]], line=0)
     btns.state = uiconst.UI_HIDDEN
     par.children.insert(0, btns)
     self.acceptbtns = btns
     self.pushButtons.SelectPanelByArgs(('eula',))
     self.eulaBrowser.OnUpdatePosition = self.ScrollingEula
     self.waitingForEula = 1
Ejemplo n.º 6
0
 def InitCloneFacilityPanel(self):
     panel = self.sr.clonefacilityPanel
     btns = [(localization.GetByLabel('UI/Ship/ShipConfig/Invite'),
              self.InviteClone, (), 84),
             (localization.GetByLabel('UI/Ship/ShipConfig/Destroy'),
              self.DestroyClone, (), 84)]
     self.cloneFacilityButtons = uicls.ButtonGroup(btns=btns, parent=panel)
     if not session.solarsystemid:
         self.cloneFacilityButtons.GetBtnByIdx(0).Disable()
     numClones = int(0)
     totalClones = int(
         getattr(
             sm.GetService('godma').GetItem(self.shipItem.itemID),
             'maxJumpClones', 0))
     text = localization.GetByLabel('UI/Ship/ShipConfig/NumJumpClones',
                                    numClones=numClones,
                                    totalClones=totalClones)
     self.sr.cloneInfo = uicls.EveLabelSmall(
         text=text,
         parent=panel,
         align=uiconst.TOTOP,
         padding=(const.defaultPadding, const.defaultPadding,
                  const.defaultPadding, 0),
         state=uiconst.UI_NORMAL)
     self.sr.clonescroll = uicls.Scroll(name='clonescroll',
                                        parent=panel,
                                        padding=const.defaultPadding)
     self.cloneinited = 1
Ejemplo n.º 7
0
 def PanelShowStorage(self):
     cont = uicls.Container(parent=self.actionCont,
                            pos=(0, 0, 0, 200),
                            align=uiconst.TOTOP,
                            state=uiconst.UI_HIDDEN)
     self.storageContentScroll = scroll = uicls.Scroll(
         parent=cont,
         name='storageContentsScroll',
         align=uiconst.TOTOP,
         height=175)
     scroll.HideUnderLay()
     uicls.Frame(parent=scroll, color=(1.0, 1.0, 1.0, 0.2))
     self.LoadStorageContentScroll()
     self.buttonContainer = uicls.Container(parent=self.actionCont,
                                            pos=(0, 0, 0, 30),
                                            align=uiconst.TOBOTTOM,
                                            state=uiconst.UI_PICKCHILDREN)
     btns = [[
         localization.GetByLabel('UI/PI/Common/CreateRoute'),
         self._CreateRoute, 'storageContentScroll'
     ],
             [
                 localization.GetByLabel('UI/PI/Common/ExpeditedTransfer'),
                 self._CreateTransfer, None
             ]]
     self.createRouteButton = uicls.ButtonGroup(btns=btns,
                                                parent=cont,
                                                line=False,
                                                alwaysLite=True)
     return cont
Ejemplo n.º 8
0
 def DrawLeftSide(self):
     self.sr.leftside = uicls.Container(name='leftside', parent=self.sr.main, align=uiconst.TOLEFT, width=256)
     uicls.Container(name='push', parent=self.sr.leftside, align=uiconst.TOTOP, height=6)
     self.sr.leftBottomPanel = uicls.Container(name='leftBottomPanel', parent=self.sr.leftside, align=uiconst.TOBOTTOM, height=26)
     self.sr.leftMainPanel = uicls.Container(name='leftMainPanel', parent=self.sr.leftside, align=uiconst.TOALL, pos=(const.defaultPadding,
      0,
      const.defaultPadding,
      0))
     dummyParent = uicls.Container(name='dummy', parent=self.sr.leftMainPanel, align=uiconst.TOALL, pos=(0, 0, 0, 0))
     ownerParent = uicls.Container(name='ownerParent', parent=dummyParent, align=uiconst.TOTOP, height=20)
     uicls.Container(name='push', parent=ownerParent, align=uiconst.TORIGHT, width=1)
     options = [(localization.GetByLabel('UI/Fitting/FittingWindow/FittingManagement/PersonalFittings'), session.charid), (localization.GetByLabel('UI/Fitting/FittingWindow/FittingManagement/CorporationFittings'), session.corpid)]
     selected = settings.user.ui.Get('savedFittingsCombo', None)
     if selected != session.charid and selected != session.corpid:
         selected = session.charid
     self.ownerID = selected
     self.sr.ownerCombo = uicls.Combo(label=None, parent=ownerParent, options=options, name='savedFittingsCombo', select=selected, callback=self.ChangeOwnerFilter, pos=(1, 1, 0, 0), align=uiconst.TOALL)
     searchContainer = uicls.Container(name='searchContainer', parent=dummyParent, align=uiconst.TOTOP, top=const.defaultPadding, height=20)
     self.sr.searchTextField = uicls.SinglelineEdit(name='searchTextField', parent=searchContainer, align=uiconst.TOLEFT, width=160, maxLength=40, left=1)
     self.sr.searchButton = uicls.Button(parent=searchContainer, label=localization.GetByLabel('UI/Common/Buttons/Search'), align=uiconst.CENTERRIGHT, func=self.Search)
     self.sr.scroll = uicls.Scroll(parent=dummyParent, align=uiconst.TOALL, padding=(0,
      const.defaultPadding,
      0,
      const.defaultPadding))
     self.sr.scroll.multiSelect = 0
     buttonContainer = uicls.Container(name='', parent=self.sr.leftBottomPanel, pos=(0, 0, 0, 0))
     parent = self.sr.fitButtons = uicls.ButtonGroup(btns=[[localization.GetByLabel('UI/Commands/Export'), self.ExportFittings, ()], [localization.GetByLabel('UI/Commands/Import'), self.ImportFittings, ()]], parent=buttonContainer, idx=0)
     self.exportButton = parent.GetBtnByLabel(localization.GetByLabel('UI/Commands/Export'))
     self.DrawFittings()
Ejemplo n.º 9
0
 def Load(self, args):
     sm.GetService('corpui').LoadTop(
         '50_16',
         localization.GetByLabel(
             'UI/Corporations/CorporationWindow/Members/Decorations/CorpMemberDecorations'
         ))
     if not self.sr.Get('inited', 0):
         if const.corpRolePersonnelManager & eve.session.corprole == const.corpRolePersonnelManager:
             btns = []
             btns.append([
                 localization.GetByLabel(
                     'UI/Corporations/CorporationWindow/Members/Decorations/CreateDecorationButton'
                 ), self.CreateDecorationForm, None, None
             ])
             self.toolbarContainer = uicls.Container(
                 name='toolbarContainer',
                 align=uiconst.TOBOTTOM,
                 parent=self)
             buttons = uicls.ButtonGroup(btns=btns,
                                         parent=self.toolbarContainer)
             self.toolbarContainer.height = 20 if not len(
                 btns) else buttons.height
         self.sr.scroll = uicls.Scroll(
             name='decorations',
             parent=self,
             padding=(const.defaultPadding, const.defaultPadding,
                      const.defaultPadding, const.defaultPadding))
         self.sr.scroll.sr.id = 'corp_decorations_scroll'
         self.sr.inited = 1
     self.LoadDecorations()
Ejemplo n.º 10
0
 def ApplyAttributes(self, attributes):
     uicls.Window.ApplyAttributes(self, attributes)
     self.contracts = {}
     self.stuff = {}
     self.SetWndIcon('33_4', mainTop=-8)
     self.SetMinSize([350, 270])
     self.SetCaption(
         localization.GetByLabel('UI/Insurance/InsuranceWindow/Title'))
     uicls.WndCaptionLabel(
         text=localization.GetByLabel('UI/Insurance/InsuranceWindow/Title'),
         parent=self.sr.topParent,
         align=uiconst.RELATIVE)
     self.scope = 'station'
     btns = uicls.ButtonGroup(btns=[(localization.GetByLabel(
         'UI/Insurance/InsuranceWindow/Commands/Insure'),
                                     self.InsureFromBtn, None, 81)],
                              line=1)
     self.sr.main.children.append(btns)
     self.sr.insureBtns = btns
     self.sr.scroll = uicls.Scroll(
         parent=self.sr.main,
         padding=(const.defaultPadding, const.defaultPadding,
                  const.defaultPadding, const.defaultPadding))
     self.sr.scroll.sr.id = 'insurance'
     self.sr.scroll.multiSelect = 0
     self.sr.scroll.sr.minColumnWidth = {
         localization.GetByLabel('UI/Common/Type'): 30
     }
     self.ShowInsuranceInfo()
Ejemplo n.º 11
0
 def CreateWindow(self):
     btns = []
     self.toolbarContainer = uicls.Container(name='toolbarContainer',
                                             align=uiconst.TOBOTTOM,
                                             parent=self)
     if eve.session.allianceid is None:
         corporation = sm.GetService('corp').GetCorporation(
             eve.session.corpid)
         if corporation.ceoID == eve.session.charid:
             createAllianceLabel = localization.GetByLabel(
                 'UI/Corporations/CorporationWindow/Alliances/Home/CreateAlliance'
             )
             btns.append(
                 [createAllianceLabel, self.CreateAllianceForm, None, None])
     elif const.corpRoleChatManager & eve.session.corprole == const.corpRoleChatManager:
         addBulletinLabel = localization.GetByLabel(
             'UI/Corporations/CorporationWindow/Alliances/Home/AddBulletin')
         btns.append([addBulletinLabel, self.AddBulletin, None, None])
     if len(btns):
         buttons = uicls.ButtonGroup(btns=btns,
                                     parent=self.toolbarContainer)
     self.toolbarContainer.height = 20 if not len(btns) else buttons.height
     bulletinParent = uicls.Container(name='bulletinParent',
                                      parent=self,
                                      align=uiconst.TOALL,
                                      pos=(0, 0, 0, 0))
     uicls.Container(name='push',
                     parent=bulletinParent,
                     align=uiconst.TOLEFT,
                     width=const.defaultPadding)
     self.messageArea = uicls.Scroll(parent=bulletinParent)
     self.messageArea.HideBackground()
     self.messageArea.RemoveActiveFrame()
     if session.allianceid is not None:
         self.LoadBulletins()
Ejemplo n.º 12
0
 def ApplyAttributes(self, attributes):
     uicls.Container.ApplyAttributes(self, attributes)
     self.events = []
     self.settingsName = self.__guid__.split('.')[1] + 'ignoreEvents'
     settings.user.ui.Set(self.settingsName, self.default_ignoreEvents)
     self.ignoreEvents = settings.user.ui.Get(self.settingsName,
                                              self.default_ignoreEvents)
     self.updatePending = False
     self.showMax = 100
     self.scrollUpdateRequested = False
     self.isPaused = False
     self.rightCont = uicls.Container(name='rightCont',
                                      parent=self,
                                      align=uiconst.TORIGHT,
                                      width=150,
                                      padding=3)
     uicls.Label(parent=self.rightCont,
                 align=uiconst.TOTOP,
                 text='<color=red>IGNORE LIST</color>')
     uicls.Label(
         parent=self.rightCont,
         align=uiconst.TOBOTTOM,
         text='Right-click logged entries to add that event type to ignore')
     self.ignoreScroll = uicls.Scroll(parent=self.rightCont,
                                      align=uiconst.TOALL)
     self._UpdateIgnoreScroll()
     btns = (('Clear', self.ResetEventData, ()),
             ('<color=green>Pause logging</color>', self.PauseResumeLogging,
              ()))
     btnGroup = uicls.ButtonGroup(parent=self, btns=btns)
     self.pauseResumeBtn = btnGroup.GetBtnByIdx(1)
     self.scroll = uicls.Scroll(parent=self, align=uiconst.TOALL, padding=3)
     uthread.new(self._UpdateScrollThread)
Ejemplo n.º 13
0
    def GetUnderlay(self):
        if self.underlay is None:
            for each in uicore.layer.main.children[:]:
                if each is not None and not each.destroyed and each.name == 'services':
                    uicore.registry.UnregisterWindow(each)
                    each.OnClick = None
                    each.Minimize = None
                    each.Maximize = None
                    each.Close()

            self.underlay = uicls.Sprite(name='services', parent=uicore.layer.main, align=uiconst.TOTOP, state=uiconst.UI_HIDDEN)
            self.underlay.scope = 'station'
            self.underlay.minimized = 0
            self.underlay.Minimize = self.MinimizeUnderlay
            self.underlay.Maximize = self.MaximizeUnderlay
            main = uicls.Container(name='mainparentXX', parent=self.underlay, align=uiconst.TOALL, pos=(0, 0, 0, 0))
            main.OnClick = self.ClickParent
            main.state = uiconst.UI_NORMAL
            sub = uicls.Container(name='subparent', parent=main, align=uiconst.TOALL, pos=(0, 0, 0, 0))
            captionparent = uicls.Container(name='captionparent', parent=main, align=uiconst.TOPLEFT, left=128, top=36, idx=0)
            caption = uicls.CaptionLabel(text='', parent=captionparent)
            self.closeBtn = uicls.ButtonGroup(btns=[[localization.GetByLabel('UI/Commands/CmdClose'),
              self.CloseSvc,
              None,
              81]], parent=sub)
            self.sr.underlay = uicls.WindowUnderlay(parent=main)
            self.sr.underlay.padding = (-1, -10, -1, 0)
            svcparent = uicls.Container(name='serviceparent', parent=sub, align=uiconst.TOALL, pos=(0, 0, 0, 0))
            self.underlay.sr.main = main
            self.underlay.sr.svcparent = svcparent
            self.underlay.sr.caption = caption
            uicore.registry.RegisterWindow(self.underlay)
        return self.underlay
Ejemplo n.º 14
0
    def DrawRightSide(self):
        self.sr.rightside = uicls.Container(name='rightside', parent=self.sr.main, align=uiconst.TOALL, pos=(0, 0, 0, 0))
        a = uicls.Container(name='push', parent=self.sr.rightside, align=uiconst.TOTOP, height=6)
        self.sr.rightBottomPanel = uicls.Container(name='rightBottomPanel', parent=self.sr.rightside, align=uiconst.TOBOTTOM, height=26)
        self.sr.rightMainPanel = uicls.Container(name='rightMainPanel', parent=self.sr.rightside, align=uiconst.TOALL, pos=(0, 0, 0, 0))
        topParent = uicls.Container(parent=self.sr.rightMainPanel, align=uiconst.TOTOP, height=80)
        topLeftParent = uicls.Container(parent=topParent, align=uiconst.TOLEFT, width=70)
        topRightParent = uicls.Container(parent=topParent, align=uiconst.TOALL, pos=(0, 0, 0, 0))
        bottomParent = uicls.Container(parent=self.sr.rightMainPanel, align=uiconst.TOALL, pos=(0, 0, 0, 0))
        uicls.Container(name='push', parent=bottomParent, align=uiconst.TOTOP, height=const.defaultPadding)
        uicls.Container(name='push', parent=bottomParent, align=uiconst.TOBOTTOM, height=const.defaultPadding)
        uicls.Container(name='push', parent=bottomParent, align=uiconst.TOLEFT, width=const.defaultPadding)
        uicls.Container(name='push', parent=bottomParent, align=uiconst.TORIGHT, width=const.defaultPadding)
        uicls.Frame(parent=bottomParent)
        self.sr.shipIcon = uicls.Icon(parent=topParent, state=uiconst.UI_HIDDEN, size=64, left=const.defaultPadding, ignoreSize=True)
        self.sr.techicon = uicls.Sprite(name='techIcon', parent=topParent, align=uiconst.RELATIVE, left=const.defaultPadding, width=16, height=16, idx=0)
        self.sr.dragIcon = dragIcon = xtriui.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 = uicls.Container(parent=topRightParent, align=uiconst.TOTOP, height=20)
        self.sr.fittingName = uicls.SinglelineEdit(name='fittingName', parent=fittingNameContainer, align=uiconst.TOPLEFT, pos=(const.defaultPadding,
         1,
         120,
         0), maxLength=40)
        shipInfoContainer = uicls.Container(parent=topRightParent, align=uiconst.TOTOP, height=20)
        self.sr.shipTypeName = uicls.EveLabelMedium(text='', parent=shipInfoContainer, align=uiconst.RELATIVE, state=uiconst.UI_NORMAL, left=const.defaultPadding)
        self.sr.infoicon = uicls.InfoIcon(parent=shipInfoContainer, size=16, left=1, top=0, idx=0, state=uiconst.UI_HIDDEN)
        self.sr.infoicon.OnClick = self.ShowInfo
        self.sr.radioButton = uicls.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(uicls.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 = uicls.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 = uicls.TabGroup(name='tabparent', parent=bottomParent, idx=0)
        self.fittingInfoTab.Startup(tabs, 'fittingInfoTab')
        self.sr.fittingInfo.Startup()
        self.sr.saveDeleteButtons = uicls.ButtonGroup(btns=[[localization.GetByLabel('UI/Fitting/FittingWindow/FittingManagement/Fit'), self.Fit, ()], [localization.GetByLabel('UI/Common/Buttons/Save'), self.Save, ()], [localization.GetByLabel('UI/Common/Buttons/Delete'), self.Delete, ()]], parent=self.sr.rightBottomPanel, idx=0)
Ejemplo n.º 15
0
 def PanelCreateRoute(self, typeID, amount):
     cont = uicls.Container(parent=self.actionCont,
                            pos=(0, 0, 0, 130),
                            align=uiconst.TOTOP,
                            state=uiconst.UI_HIDDEN)
     cont._OnClose = self.OnPanelCreateRouteClosed
     w = self.width - 5
     self.sourceMaxAmount = amount
     self.routeMaxAmount = amount
     self.commodityToRoute = typeID
     self.commoditySourceMaxAmount = amount
     self.currRouteCycleTime = self.pin.GetCycleTime()
     resourceTxt = localization.GetByLabel(
         'UI/PI/Common/ItemAmount',
         itemName=cfg.invtypes.Get(typeID).name,
         amount=int(self.routeMaxAmount))
     CaptionAndSubtext(
         parent=cont,
         caption=localization.GetByLabel('UI/PI/Common/CommodityToRoute'),
         subtext=resourceTxt,
         iconTypeID=typeID,
         top=0,
         width=w)
     CaptionAndSubtext(
         parent=cont,
         caption=localization.GetByLabel('UI/PI/Common/QtyAmount'),
         width=w,
         top=30,
         state=uiconst.UI_DISABLED)
     self.routeAmountEdit = uicls.SinglelineEdit(
         name='routeAmountEdit',
         parent=cont,
         setvalue=self.routeMaxAmount,
         height=14,
         width=45,
         align=uiconst.TOPLEFT,
         top=44,
         ints=(0, self.routeMaxAmount),
         OnChange=self.OnRouteAmountEditChanged)
     self.routeAmountText = uicls.EveLabelSmall(parent=cont,
                                                left=47,
                                                top=46,
                                                state=uiconst.UI_NORMAL)
     self.routeDestText = CaptionAndSubtext(
         parent=cont,
         caption=localization.GetByLabel('UI/Common/Destination'),
         top=70,
         width=w)
     btns = [[
         localization.GetByLabel('UI/PI/Common/CreateRoute'),
         self.SubmitRoute, ()
     ]]
     self.createRouteButton = uicls.ButtonGroup(btns=btns,
                                                parent=cont,
                                                line=False,
                                                alwaysLite=True)
     self.UpdatePanelCreateRoute()
     return cont
Ejemplo n.º 16
0
    def SubPanelSelectedSchematic(self, parent, schematic):
        cont = uicls.Container(parent=parent,
                               pos=(0, 0, 0, 140),
                               align=uiconst.TOTOP,
                               state=uiconst.UI_PICKCHILDREN)
        left = self.infoContRightColAt
        output = schematic.outputs[0]
        schematicTxt = localization.GetByLabel('UI/PI/Common/ItemAmount',
                                               amount=int(output.quantity),
                                               itemName=output.name)
        planet.ui.CaptionAndSubtext(
            parent=cont,
            caption=localization.GetByLabel('UI/PI/Common/OutputProduct'),
            subtext=schematicTxt,
            iconTypeID=output.typeID,
            left=5,
            top=0)
        planet.ui.CaptionAndSubtext(
            parent=cont,
            caption=localization.GetByLabel('UI/PI/Common/CycleTime'),
            subtext=localization.GetByLabel('UI/PI/Common/TimeHourMinSec',
                                            time=schematic.cycleTime * SEC),
            left=5,
            top=40)
        outputVolumeTxt = localization.GetByLabel(
            'UI/PI/Common/CapacityAmount', amount=schematic.outputVolume)
        planet.ui.CaptionAndSubtext(
            parent=cont,
            caption=localization.GetByLabel('UI/PI/Common/OutputPerHour'),
            subtext=outputVolumeTxt,
            left=5,
            top=80)
        for i, input in enumerate(schematic.inputs):
            topPos = i * 40
            caption = localization.GetByLabel('UI/PI/Common/InputNumberX',
                                              inputNum=i + 1)
            subtext = localization.GetByLabel('UI/PI/Common/ItemAmount',
                                              amount=int(input.quantity),
                                              itemName=cfg.invtypes.Get(
                                                  input.typeID).name)
            planet.ui.CaptionAndSubtext(parent=cont,
                                        caption=caption,
                                        subtext=subtext,
                                        iconTypeID=input.typeID,
                                        left=left,
                                        top=topPos)

        btns = [[
            localization.GetByLabel('UI/PI/Common/InstallSchematic'),
            self.InstallSchematic, ()
        ]]
        self.buttons = uicls.ButtonGroup(btns=btns,
                                         parent=cont,
                                         line=False,
                                         alwaysLite=True)
        return cont
Ejemplo n.º 17
0
 def PanelShowRoutes(self, *args):
     self.showRoutesCont = cont = uicls.Container(parent=self.actionCont,
                                                  pos=(0, 0, 0, 168),
                                                  align=uiconst.TOTOP,
                                                  state=uiconst.UI_HIDDEN)
     self.routeScroll = uicls.Scroll(parent=cont,
                                     name='routeScroll',
                                     align=uiconst.TOTOP,
                                     height=160)
     self.routeScroll.multiSelect = False
     self.routeScroll.sr.id = 'planetBaseShowRoutesScroll'
     self.routeInfo = uicls.Container(parent=cont,
                                      pos=(0, 4, 0, 100),
                                      align=uiconst.TOTOP,
                                      state=uiconst.UI_HIDDEN)
     w = self.width / 2 - 10
     self.routeInfoSource = CaptionAndSubtext(
         parent=self.routeInfo,
         caption=localization.GetByLabel('UI/PI/Common/Origin'),
         width=w)
     self.routeInfoDest = CaptionAndSubtext(
         parent=self.routeInfo,
         caption=localization.GetByLabel('UI/PI/Common/Destination'),
         width=w,
         top=38)
     self.routeInfoType = CaptionAndSubtext(
         parent=self.routeInfo,
         caption=localization.GetByLabel('UI/Common/Commodity'),
         width=w,
         left=w)
     self.routeInfoBandwidth = CaptionAndSubtext(
         parent=self.routeInfo,
         caption=localization.GetByLabel('UI/PI/Common/CapacityUsed'),
         width=w,
         left=w,
         top=38)
     btns = []
     if self.pin.IsStorage() and hasattr(self, '_CreateRoute'):
         btns.append([
             localization.GetByLabel('UI/PI/Common/CreateRoute'),
             self._CreateRoute, 'routeScroll'
         ])
     btns.append([
         localization.GetByLabel('UI/PI/Common/DeleteRoute'),
         self._DeleteRouteFromEntry, ()
     ])
     self.routeInfoBtns = uicls.ButtonGroup(btns=btns,
                                            parent=self.routeInfo,
                                            line=False,
                                            alwaysLite=True)
     self.LoadRouteScroll()
     self.routeScroll.HideUnderLay()
     uicls.Frame(parent=self.routeScroll, color=(1.0, 1.0, 1.0, 0.2))
     return cont
Ejemplo n.º 18
0
    def CreateWindow(self):
        toppar = uicls.Container(name='options',
                                 parent=self,
                                 align=uiconst.TOTOP,
                                 height=36)
        uicls.Container(name='push',
                        parent=toppar,
                        align=uiconst.TOTOP,
                        height=6)
        viewOptionsList1 = [[
            localization.GetByLabel('UI/Corporations/Common/Roles'), VIEW_ROLES
        ],
                            [
                                localization.GetByLabel(
                                    'UI/Corporations/Common/GrantableRoles'),
                                VIEW_GRANTABLE_ROLES
                            ]]
        viewOptionsList2 = []
        for roleGrouping in self.sr.roleGroupings.itervalues():
            viewOptionsList2.append([
                localization.GetByMessageID(roleGrouping.roleGroupNameID),
                roleGrouping.roleGroupID
            ])

        i = 0
        for optlist, label, config, defval, width in [
            (viewOptionsList1, localization.GetByLabel('UI/Common/View'),
             'viewtype', 1000, 146),
            (viewOptionsList2, localization.GetByLabel('UI/Common/Type'),
             'rolegroup', None, 146)
        ]:
            combo = uicls.Combo(label=label,
                                parent=toppar,
                                options=optlist,
                                name=config,
                                callback=self.OnComboChange,
                                width=width,
                                pos=(5 + i * (width + 4), 0, 0, 0),
                                align=uiconst.BOTTOMLEFT)
            self.sr.Set(label, combo)
            i += 1

        toppar.height = max(combo.height + 14, 36)
        self.sr.scroll = uicls.Scroll(
            name='journal',
            parent=self,
            padding=(const.defaultPadding, const.defaultPadding,
                     const.defaultPadding, const.defaultPadding))
        self.sr.scroll.OnColumnChanged = self.OnColumnChanged
        btns = uicls.ButtonGroup(btns=[[
            localization.GetByLabel('UI/Common/Buttons/SaveChanges'),
            self.SaveChanges, (), 81
        ]])
        self.children.insert(0, btns)
Ejemplo n.º 19
0
 def ApplyAttributes(self, attributes):
     uicls.Window.ApplyAttributes(self, attributes)
     self.isChangingOrder = False
     self.loadedTab = None
     self.waypointBtns = uicls.ButtonGroup(
         parent=self.sr.main,
         btns=[[
             localization.GetByLabel('UI/Map/MapPallet/btnOptimizeRoute'),
             sm.GetService('autoPilot').OptimizeRoute, (), 66
         ]])
     self.sr.waypointopt = uicls.Container(name='waypointopt',
                                           parent=self.sr.main,
                                           align=uiconst.TOBOTTOM,
                                           clipChildren=True,
                                           padding=(const.defaultPadding, 0,
                                                    const.defaultPadding,
                                                    0))
     self.sr.scroll2 = uicls.Scroll(parent=self.sr.main,
                                    padding=const.defaultPadding)
     self.sr.scroll2.sr.id = 'autopilotSettings'
     self.sr.scroll2.sr.content.OnDropData = self.MoveWaypoints
     uicls.EveLabelMedium(text=localization.GetByLabel(
         'UI/Map/MapPallet/lblChangeWaypointPriority'),
                          parent=self.sr.waypointopt,
                          pos=(3, 2, 0, 0))
     checkbox = uicls.Checkbox(
         text=localization.GetByLabel('UI/Map/MapPallet/cbExpandWaypoints'),
         parent=self.sr.waypointopt,
         configName='expandwaypoints',
         retval=None,
         checked=settings.user.ui.Get('expandwaypoints', 1),
         callback=self.OnCheckboxWaypoints,
         align=uiconst.TOPLEFT,
         pos=(1, 18, 140, 0))
     checkbox.data = {'key': 'expandwaypoints', 'retval': None}
     self.sr.waypointopt.height = checkbox.height + 22
     autopilottabs = uicls.TabGroup(name='tabparent',
                                    parent=self.sr.main,
                                    idx=0)
     autopilottabs.Startup(
         [[
             localization.GetByLabel('UI/Map/MapPallet/tabWaypoints'),
             self.sr.scroll2, self, 'waypointconf', self.sr.waypointopt
         ],
          [
              localization.GetByLabel('UI/Map/MapPallet/tabMapAdvoidance'),
              self.sr.scroll2, self, 'avoidconf', None
          ]],
         'autopilottabs',
         autoselecttab=1)
     self.sr.autopilottabs = autopilottabs
Ejemplo n.º 20
0
    def CreateWindow(self):
        toppar = uicls.Container(name='options', parent=self, align=uiconst.TOTOP, height=54)
        sidepar = uicls.Container(name='sidepar', parent=toppar, align=uiconst.TORIGHT, width=54)
        icon = uicls.Button(parent=toppar, icon='ui_77_32_41', iconSize=20, align=uiconst.BOTTOMRIGHT, left=6, func=self.Navigate, args=1)
        icon.hint = localization.GetByLabel('UI/Common/Next')
        self.sr.fwdBtn = icon
        icon = uicls.Button(parent=toppar, icon='ui_77_32_42', iconSize=20, align=uiconst.BOTTOMRIGHT, left=26, func=self.Navigate, args=-1)
        icon.hint = localization.GetByLabel('UI/Common/Previous')
        self.sr.backBtn = icon
        uicls.Container(name='push', parent=toppar, align=uiconst.TOTOP, height=6)
        optlist = [[localizationUtil.FormatNumeric(10), 10],
         [localizationUtil.FormatNumeric(25), 25],
         [localizationUtil.FormatNumeric(50), 50],
         [localizationUtil.FormatNumeric(100), 100],
         [localizationUtil.FormatNumeric(500), 500]]
        countcombo = uicls.Combo(label=localization.GetByLabel('UI/Common/PerPage'), parent=toppar, options=optlist, name='membersperpage', callback=self.OnComboChange, width=92, pos=(2, 36, 0, 0))
        self.sr.MembersPerPage = countcombo
        viewOptionsList1 = [[localization.GetByLabel('UI/Corporations/Common/Roles'), VIEW_ROLES], [localization.GetByLabel('UI/Corporations/Common/GrantableRoles'), VIEW_GRANTABLE_ROLES], [localization.GetByLabel('UI/Corporations/Common/Titles'), VIEW_TITLES]]
        viewOptionsList2 = []
        for roleGrouping in self.sr.roleGroupings.itervalues():
            viewOptionsList2.append([localization.GetByMessageID(roleGrouping.roleGroupNameID), roleGrouping.roleGroupID])

        i = 0
        for optlist, label, config, defval in [(viewOptionsList1,
          localization.GetByLabel('UI/Common/ViewMode'),
          'viewtype',
          1000), (viewOptionsList2,
          localization.GetByLabel('UI/Common/Type'),
          'rolegroup',
          None)]:
            combo = uicls.Combo(label=label, parent=toppar, options=optlist, name=config, callback=self.OnComboChange, width=146, pos=(countcombo.left + countcombo.width + 6 + i * 152,
             countcombo.top,
             0,
             0))
            setattr(self.sr, config + 'Combo', combo)
            i += 1

        self.sr.scroll = uicls.Scroll(name='journal', parent=self, padding=(const.defaultPadding,
         const.defaultPadding,
         const.defaultPadding,
         const.defaultPadding))
        self.sr.scroll.OnColumnChanged = self.OnColumnChanged
        buttons = [[localization.GetByLabel('UI/Common/Buttons/SaveChanges'),
          self.SaveChanges,
          (),
          81]]
        btns = uicls.ButtonGroup(btns=buttons)
        self.children.insert(0, btns)
Ejemplo n.º 21
0
 def _ConstructBottomContainer(self):
     if self.editsEnabled:
         btnName = localization.GetByLabel(
             'UI/PI/Common/SurveyInstallProgram')
         btns = [(btnName, self._ApplyProgram, None)]
     else:
         btnName = localization.GetByLabel('UI/PI/Common/SurveyStopProgram')
         btns = [(btnName, self._StopProgram, None)]
     btns.append(
         (localization.GetByLabel('UI/Common/Close'), self._Cancel, None))
     btnGroup = uicls.ButtonGroup(btns=btns,
                                  parent=self.bottomCont,
                                  line=False)
     self.submitButton = btnGroup.GetBtnByLabel(btnName)
     self.SetCurrentResource(self.currResourceTypeID)
     self._SetSubmitButtonState()
Ejemplo n.º 22
0
 def ApplyAttributes(self, attributes):
     VGoodsBuyWindow.ApplyAttributes(self, attributes)
     self.totalColor = '0xfff1f202'
     self.LoadWnd(attributes.offerKV)
     self.btns = uicls.ButtonGroup(
         btns=[[
             localization.GetByLabel('UI/VirtualGoodsStore/Buttons/Buy'),
             self.Buy, (), None
         ],
               [
                   localization.GetByLabel('UI/Common/Buttons/Cancel'),
                   self.Cancel, (), None
               ]],
         parent=self.sr.main,
         idx=0)
     self.CheckHeights()
Ejemplo n.º 23
0
 def PanelDecommissionLink(self):
     cont = uicls.Container(parent=self.actionCont,
                            pos=(0, 0, 0, 0),
                            align=uiconst.TOTOP,
                            state=uiconst.UI_HIDDEN)
     text = localization.GetByLabel('UI/PI/Common/DecommissionLink',
                                    typeName=cfg.invtypes.Get(
                                        self.pin.link.typeID).name)
     editBox = self._DrawEditBox(cont, text)
     cont.height = editBox.height + 25
     btns = [[
         localization.GetByLabel('UI/PI/Common/Proceed'),
         self._DecommissionSelf, None
     ]]
     uicls.ButtonGroup(btns=btns, parent=cont, line=False, alwaysLite=True)
     return cont
Ejemplo n.º 24
0
 def CreateWindow(self):
     logoLabel = localization.GetByLabel(
         'UI/Corporations/CorporationWindow/Alliances/Members/Logo')
     nameLabel = localization.GetByLabel('UI/Common/Name')
     chosenExecLabel = localization.GetByLabel(
         'UI/Corporations/CorporationWindow/Alliances/Members/ChosenExecutor'
     )
     self.sr.headers = [logoLabel, nameLabel, chosenExecLabel]
     if eve.session.allianceid is not None:
         self.toolbarContainer = uicls.Container(name='toolbarContainer',
                                                 align=uiconst.TOTOP,
                                                 parent=self,
                                                 left=const.defaultPadding,
                                                 top=const.defaultPadding)
         if eve.session.corprole & const.corpRoleDirector == const.corpRoleDirector:
             declareSupportLabel = localization.GetByLabel(
                 'UI/Corporations/CorporationWindow/Alliances/Members/DeclareSupport'
             )
             btns = [[
                 declareSupportLabel, self.DeclareSupportForm, None, None
             ]]
             t = uicls.ButtonGroup(btns=btns,
                                   parent=self.toolbarContainer,
                                   line=0)
         else:
             hintLabel = localization.GetByLabel(
                 'UI/Corporations/CorporationWindow/Alliances/Members/DirectorDeclareWarHint'
             )
             t = uicls.EveLabelMedium(text=hintLabel,
                                      parent=self.toolbarContainer,
                                      align=uiconst.TOTOP,
                                      state=uiconst.UI_NORMAL)
         self.toolbarContainer.height = t.height
     self.sr.scroll = uicls.Scroll(
         parent=self,
         padding=(const.defaultPadding, const.defaultPadding,
                  const.defaultPadding, const.defaultPadding))
     if eve.session.allianceid is None:
         notInAllianceLabel = localization.GetByLabel(
             'UI/Corporations/CorporationWindow/Alliances/CorpNotInAlliance',
             corpName=cfg.eveowners.Get(eve.session.corpid).ownerName)
         self.sr.scroll.Load(fixedEntryHeight=19,
                             contentList=[],
                             noContentHint=notInAllianceLabel)
         return
     self.ShowMembers()
Ejemplo n.º 25
0
 def SetAbortFunc(self, func):
     args = None
     if type(func) == types.TupleType:
         func, args = func
     if self.abortbtnpar is None:
         if func is None:
             return
         self.abortbtnpar = uicls.ButtonGroup(btns=[[
             localization.GetByLabel('UI/Commands/Abort'), func, args, 66
         ]])
         self.abortbtn = self.abortbtnpar.children[0].children[0]
         self.sr.main.children.insert(0, self.abortbtnpar)
     if func is None:
         self.abortbtnpar.state = uiconst.UI_HIDDEN
     else:
         self.abortbtnpar.state = uiconst.UI_NORMAL
         self.abortbtn.OnClick = (func, args)
Ejemplo n.º 26
0
 def ApplyAttributes(self, attributes):
     VGoodsBuyWindow.ApplyAttributes(self, attributes)
     self.totalColor = '0xff05adae'
     windowText = localization.GetByLabel(
         'UI/VirtualGoodsStore/ExchangePlexCaption')
     self.exchangeRate = self.rate = sm.GetService(
         'store').GetPlexToAURExchangeRate()
     self.localPlexes = sm.GetService('store').GetAvailableLocalPlexes()
     self.topImage.SetTexturePath('res:/UI/Texture/Icons/7_64_12.png')
     self.SetCaption(windowText)
     self.captionLabel.text = windowText
     self.firstLabel.text = localization.GetByLabel(
         'UI/VirtualGoodsStore/ExchangeRate')
     self.firstValue.text = localization.GetByLabel(
         'UI/VirtualGoodsStore/AURperPLEX', numAUR=self.exchangeRate)
     numLocalPlexes = sum((i.stacksize for i in self.localPlexes))
     if numLocalPlexes > 0:
         initialQty = 1
     else:
         initialQty = 0
     self.qtyEdit.SetValue(initialQty)
     self.qtyEdit.IntMode(0, numLocalPlexes)
     self.qtyAvailLabel.text = localization.GetByLabel(
         'UI/VirtualGoodsStore/PlexAvailableInHangar',
         numPLEX=numLocalPlexes)
     self.totalLabel.text = localization.GetByLabel(
         'UI/VirtualGoodsStore/Payout')
     initialTotalValue = initialQty * self.exchangeRate
     totalText = util.FmtAmt(initialTotalValue)
     self.totalText = self.GetTotalText(initialTotalValue)
     self.totalValueLabel.text = self.totalText
     self.btns = uicls.ButtonGroup(
         btns=[[
             localization.GetByLabel(
                 'UI/VirtualGoodsStore/Buttons/Exchange'), self.Sell, (),
             None
         ],
               [
                   localization.GetByLabel('UI/Common/Buttons/Cancel'),
                   self.Cancel, (), None
               ]],
         parent=self.sr.main,
         idx=0)
     self.CheckHeights()
Ejemplo n.º 27
0
 def Load(self, args):
     self.voteTypes = {const.voteCEO: localization.GetByLabel('UI/Corporations/CorpSanctionableActions/NewCEO'),
      const.voteWar: localization.GetByLabel('UI/Corporations/CorpSanctionableActions/DeclarationOfWar'),
      const.voteShares: localization.GetByLabel('UI/Corporations/CorpSanctionableActions/CreationOfShares'),
      const.voteKickMember: localization.GetByLabel('UI/Corporations/CorpSanctionableActions/Expulsion'),
      const.voteGeneral: localization.GetByLabel('UI/Corporations/CorpSanctionableActions/GeneralVote'),
      const.voteItemUnlock: localization.GetByLabel('UI/Corporations/CorpSanctionableActions/UnlockBlueprint'),
      const.voteItemLockdown: localization.GetByLabel('UI/Corporations/CorpSanctionableActions/LockBlueprint')}
     self.headers = [localization.GetByLabel('UI/Corporations/CorpSanctionableActions/Type'),
      localization.GetByLabel('UI/Corporations/CorpSanctionableActions/Title'),
      localization.GetByLabel('UI/Corporations/CorpSanctionableActions/Description'),
      localization.GetByLabel('UI/Corporations/CorpSanctionableActions/Expires'),
      localization.GetByLabel('UI/Corporations/CorpSanctionableActions/ActedUpon'),
      localization.GetByLabel('UI/Corporations/CorpSanctionableActions/InEffect'),
      localization.GetByLabel('UI/Corporations/CorpSanctionableActions/Rescinded')]
     if not self.sr.Get('inited', 0):
         self.sr.inited = 1
         self.toolbarContainer = uicls.Container(name='toolbarContainer', align=uiconst.TOBOTTOM, parent=self)
         buttonOptions = [[localization.GetByLabel('UI/Corporations/CorpSanctionableActions/ShowAll'),
           self.ShowSanctionableActionsNotInEffect,
           True,
           81]]
         btns = uicls.ButtonGroup(btns=buttonOptions, parent=self.toolbarContainer)
         self.toolbarContainer.height = btns.height
         self.sr.mainBtns = btns
         self.sr.scroll = uicls.Scroll(name='sanctionableactions', parent=self, padding=(const.defaultPadding,
          const.defaultPadding,
          const.defaultPadding,
          const.defaultPadding))
         self.sr.tabs = uicls.TabGroup(name='tabparent', parent=self, idx=0)
         self.sr.tabs.Startup([[localization.GetByLabel('UI/Corporations/CorpSanctionableActions/InEffect'),
           self,
           self,
           'ineffect'], [localization.GetByLabel('UI/Corporations/CorpSanctionableActions/NotInEffect'),
           self,
           self,
           'notineffect']], 'corpsanctionableact')
     sm.GetService('corpui').LoadTop('ui_7_64_5', localization.GetByLabel('UI/Corporations/CorpSanctionableActions/SanctionableActions'))
     if args == 'ineffect':
         self.ShowSanctionableActionsInEffect()
     elif args == 'notineffect':
         self.ShowSanctionableActionsNotInEffect()
Ejemplo n.º 28
0
 def ConstructLayout(self, *args):
     self.countSelectedText = ''
     self.sr.textContainer = uicls.Container(name='textContainer',
                                             align=uiconst.TOTOP,
                                             parent=self.sr.main,
                                             height=65,
                                             padding=const.defaultPadding)
     self.sr.textLabel = uicls.EveLabelMedium(text=localization.GetByLabel(
         'UI/Fitting/LegacyImport', maxFittings=const.maxCharFittings),
                                              align=uiconst.TOTOP,
                                              parent=self.sr.textContainer)
     self.sr.textContainer2 = uicls.Container(name='textContainer',
                                              align=uiconst.TOTOP,
                                              parent=self.sr.main,
                                              height=15,
                                              padding=const.defaultPadding)
     self.sr.countSelectedTextLabel = uicls.EveLabelMedium(
         text=self.countSelectedText,
         align=uiconst.TOALL,
         parent=self.sr.textContainer2)
     self.sr.buttonContainer = uicls.Container(name='buttonContainer',
                                               align=uiconst.TOBOTTOM,
                                               parent=self.sr.main)
     btns = [[
         localization.GetByLabel('UI/Generic/Cancel'), self.CloseByUser,
         None, 81
     ], [localization.GetByLabel('UI/Generic/OK'), self.Import, None, 81]]
     self.buttonGroup = uicls.ButtonGroup(btns=btns,
                                          parent=self.sr.buttonContainer)
     self.okBtn = self.buttonGroup.children[0].children[1]
     self.sr.buttonContainer.height = 23
     self.sr.scrolllistcontainer = uicls.Container(
         name='scrolllistcontainer',
         align=uiconst.TOALL,
         parent=self.sr.main,
         pos=(0, 0, 0, 0))
     self.sr.scroll = uicls.Scroll(
         name='scroll',
         parent=self.sr.scrolllistcontainer,
         padding=(const.defaultPadding, const.defaultPadding,
                  const.defaultPadding, const.defaultPadding))
     self.ConstructScrollList()
Ejemplo n.º 29
0
 def CreateWindow(self):
     btns = []
     self.toolbarContainer = uicls.Container(name='toolbarContainer',
                                             align=uiconst.TOBOTTOM,
                                             parent=self)
     if eve.session.allianceid is None:
         corporation = sm.GetService('corp').GetCorporation(
             eve.session.corpid)
         if corporation.ceoID == eve.session.charid:
             createAllianceLabel = localization.GetByLabel(
                 'UI/Corporations/CorporationWindow/Alliances/Home/CreateAlliance'
             )
             btns.append(
                 [createAllianceLabel, self.CreateAllianceForm, None, None])
     elif eve.session.corprole & const.corpRoleDirector == const.corpRoleDirector:
         editAllianceLabel = localization.GetByLabel(
             'UI/Corporations/CorporationWindow/Alliances/Home/EditAlliance'
         )
         declareWarLabel = localization.GetByLabel(
             'UI/Corporations/CorporationWindow/Alliances/Home/DeclareWar')
         btns.append([editAllianceLabel, self.EditAllianceForm, None, None])
         btns.append([declareWarLabel, self.DeclareWarForm, None, None])
     if len(btns):
         buttons = uicls.ButtonGroup(btns=btns,
                                     parent=self.toolbarContainer)
     self.toolbarContainer.height = 20 if not len(btns) else buttons.height
     self.sr.scroll = uicls.Scroll(
         parent=self,
         padding=(const.defaultPadding, const.defaultPadding,
                  const.defaultPadding, const.defaultPadding))
     if eve.session.allianceid is None:
         corpNotInAllianceLabel = localization.GetByLabel(
             'UI/Corporations/CorporationWindow/Alliances/Home/CorporationNotInAlliance',
             corpName=cfg.eveowners.Get(eve.session.corpid).ownerName)
         self.sr.scroll.Load(fixedEntryHeight=19,
                             contentList=[],
                             noContentHint=corpNotInAllianceLabel)
         return
     self.LoadScroll()
Ejemplo n.º 30
0
 def SetAbortConfirmFunc(self, abortFunc, confirmFunc):
     abortArgs = None
     confirmArgs = None
     if type(abortFunc) == types.TupleType:
         abortFunc, abortArgs = abortFunc
     if type(confirmFunc) == types.TupleType:
         confirmFunc, confirmArgs = confirmFunc
     if self.abortconfirmbtnpar is None:
         self.abortconfirmbtnpar = uicls.ButtonGroup(
             btns=[[
                 localization.GetByLabel('UI/Common/Yes'), self.Confirm, (
                 ), None, 0, 1, 0
             ],
                   [
                       localization.GetByLabel('UI/Common/No'), self.Abort,
                       (), None, 0, 0, 1
                   ]])
         self.abortconfirmbtnpar.align = uiconst.TOBOTTOM
         self.confirmbtn = self.abortconfirmbtnpar.children[0].children[0]
         self.abortbtn = self.abortconfirmbtnpar.children[0].children[1]
         self.sr.main.children.insert(0, self.abortconfirmbtnpar)
     uicore.registry.AddModalWindow(self)