def ConstructLayout(self):
     corpName = cfg.eveowners.Get(self.corpid).name
     corpInfoCont = uiprimitives.Container(name='corpInfo', parent=self.sr.main, align=uiconst.TOTOP, height=68, padding=const.defaultPadding)
     corpLogoCont = uiprimitives.Container(name='corpLogo', parent=corpInfoCont, align=uiconst.TOLEFT, width=68)
     corpTextCont = uiprimitives.Container(name='corpName', parent=corpInfoCont, align=uiconst.TOALL)
     applicationCont = uiprimitives.Container(name='corpInfo', parent=self.sr.main, align=uiconst.TOALL, padding=(const.defaultPadding,
      0,
      const.defaultPadding,
      const.defaultPadding))
     uiutil.GetOwnerLogo(corpLogoCont, self.corpid, size=64, noServerCall=True)
     corpText = localization.GetByLabel('UI/Corporations/BaseCorporationUI/ApplyForMembership', corporation=corpName)
     corpNameLabel = uicontrols.EveLabelLarge(parent=corpTextCont, text=corpText, top=12, align=uiconst.TOPLEFT, width=270)
     editText = localization.GetByLabel('UI/Corporations/BaseCorporationUI/CorporationApplicationText')
     editLabel = uicontrols.EveLabelSmall(parent=applicationCont, text=editText, align=uiconst.TOTOP)
     tax = self.corporation.taxRate * 100
     taxText = localization.GetByLabel('UI/Corporations/BaseCorporationUI/CurrentTaxRateForCorporation', corporation=corpName, taxRate=tax)
     taxLabel = uicontrols.EveLabelSmall(parent=applicationCont, text=taxText, align=uiconst.TOBOTTOM)
     corpService = sm.GetService('corp')
     aggressionSettings = corpService.GetAggressionSettings(self.corpid)
     statusText = corpService.GetCorpFriendlyFireStatus(aggressionSettings)
     ffText = localization.GetByLabel('UI/Corporations/FriendlyFire/FriendlyFireStatus', ffStatus=statusText)
     ffCont = uiprimitives.Container(parent=applicationCont, align=uiconst.TOBOTTOM, height=16)
     friendlyFireLabel = uicontrols.EveLabelSmall(parent=ffCont, text=ffText, align=uiconst.TOLEFT)
     helpIcon = MoreInfoIcon(parent=ffCont, align=uiconst.TORIGHT, hint=localization.GetByLabel('UI/Corporations/FriendlyFire/Description'))
     if self.corporation and not self.corporation.isRecruiting:
         notRecruitingText = localization.GetByLabel('UI/Corporations/BaseCorporationUI/RecruitmentMayBeClosed')
         notRecruiting = uicontrols.EveLabelSmall(parent=applicationCont, text=notRecruitingText, align=uiconst.TOBOTTOM, idx=0)
         self.SetMinSize((self.default_width, self.default_height + notRecruiting.textheight), refresh=True)
     self.applicationText = uicls.EditPlainText(setvalue='', parent=applicationCont, align=uiconst.TOALL, maxLength=1000)
Example #2
0
 def ApplyAttributes(self, attributes):
     uicontrols.Window.ApplyAttributes(self, attributes)
     self.scope = 'station_inflight'
     self.SetCaption('Add snippet to detention list')
     self.SetMinSize([256, 256], 1)
     self.MakeUnResizeable()
     self.SetWndIcon()
     self.SetTopparentHeight(0)
     self.sr.main = uiutil.GetChild(self, 'main')
     textparent = uiprimitives.Container(name='push',
                                         align=uiconst.TOTOP,
                                         height=48,
                                         parent=self.sr.main)
     uicontrols.Label(
         text=
         'Remove everything from the message below except\nfor the snippet that you want to add to the automatic \ndetention list',
         parent=textparent,
         left=6,
         top=3,
         fontsize=12,
         width=250,
         align=uiconst.TOPLEFT)
     self.sr.reason = uicls.EditPlainText(setvalue='',
                                          parent=self.sr.main,
                                          align=uiconst.TOPLEFT,
                                          width=248,
                                          height=150,
                                          top=50)
     mainbtns = uicontrols.ButtonGroup(
         btns=[['Add snippet', self.Confirm, (
         ), 81], ['Cancel', self.Cancel, (), 81]])
     self.sr.main.children.insert(0, mainbtns)
Example #3
0
 def ConstructLayout(self):
     charInfoCont = uicls.Container(name='charInfo',
                                    parent=self.sr.main,
                                    align=uiconst.TOTOP,
                                    height=68,
                                    padding=const.defaultPadding)
     charLogoCont = uicls.Container(name='charLogo',
                                    parent=charInfoCont,
                                    align=uiconst.TOLEFT,
                                    width=68)
     charTextCont = uicls.Container(name='charName',
                                    parent=charInfoCont,
                                    align=uiconst.TOALL)
     applicationCont = uicls.Container(name='charInfo',
                                       parent=self.sr.main,
                                       align=uiconst.TOALL,
                                       padding=(const.defaultPadding, 0,
                                                const.defaultPadding,
                                                const.defaultPadding))
     uiutil.GetOwnerLogo(charLogoCont,
                         self.charID,
                         size=64,
                         noServerCall=True)
     charText = localization.GetByLabel(
         'UI/Corporations/CorpApplications/ApplicationSubjectLine',
         player=self.charID)
     charNameLabel = uicls.EveLabelLarge(parent=charTextCont,
                                         text=charText,
                                         top=12,
                                         align=uiconst.TOPLEFT,
                                         width=270)
     editText = localization.GetByLabel(
         'UI/Corporations/BaseCorporationUI/CorporationApplicationText')
     editLabel = uicls.EveLabelSmall(parent=applicationCont,
                                     text=editText,
                                     align=uiconst.TOTOP)
     self.rejectRb = uicls.Checkbox(text=localization.GetByLabel(
         'UI/Corporations/CorpApplications/RejectApplication'),
                                    parent=applicationCont,
                                    configName='reject',
                                    retval=1,
                                    checked=False,
                                    groupname='state',
                                    align=uiconst.TOBOTTOM)
     self.acceptRb = uicls.Checkbox(text=localization.GetByLabel(
         'UI/Corporations/CorpApplications/ApplicationInviteApplicant'),
                                    parent=applicationCont,
                                    configName='accept',
                                    retval=0,
                                    checked=True,
                                    groupname='state',
                                    align=uiconst.TOBOTTOM)
     if self.status not in (const.crpApplicationAppliedByCharacter,
                            const.crpApplicationAcceptedByCorporation):
         self.rejectRb.state = uiconst.UI_HIDDEN
         self.acceptRb.state = uiconst.UI_HIDDEN
     self.applicationText = uicls.EditPlainText(setvalue=self.appText,
                                                parent=applicationCont,
                                                maxLength=1000,
                                                readonly=True)
 def ApplyAttributes(self, attributes):
     uicontrols.Window.ApplyAttributes(self, attributes)
     self.SetWndIcon(self.iconNum, mainTop=-10)
     self.SetCaption(localization.GetByLabel('UI/SystemMenu/DisplayAndGraphics/OptimizeSettings/Header'))
     self.SetMinSize([360, 240])
     self.MakeUnResizeable()
     self.sr.windowCaption = uicontrols.CaptionLabel(text=localization.GetByLabel('UI/SystemMenu/DisplayAndGraphics/OptimizeSettings/Header'), parent=self.sr.topParent, align=uiconst.RELATIVE, left=70, top=15, state=uiconst.UI_DISABLED, fontsize=18)
     self.SetScope('all')
     main = self.sr.main
     optimizeSettingsOptions = [(localization.GetByLabel('UI/SystemMenu/DisplayAndGraphics/OptimizeSettings/OptimizeSettingsSelect'), None),
      (localization.GetByLabel('UI/SystemMenu/DisplayAndGraphics/OptimizeSettings/OptimizeSettingsMemory'), 1),
      (localization.GetByLabel('UI/SystemMenu/DisplayAndGraphics/OptimizeSettings/OptimizeSettingsPerformance'), 2),
      (localization.GetByLabel('UI/SystemMenu/DisplayAndGraphics/OptimizeSettings/OptimizeSettingsQuality'), 3)]
     combo = self.combo = uicontrols.Combo(label='', parent=main, options=optimizeSettingsOptions, name='', select=None, callback=self.OnComboChange, labelleft=0, align=uiconst.TOTOP)
     combo.SetHint(localization.GetByLabel('UI/SystemMenu/DisplayAndGraphics/OptimizeSettings/OptimizeSettingsSelect'))
     combo.padding = (6, 0, 6, 0)
     self.messageArea = uicls.EditPlainText(parent=main, readonly=1, hideBackground=1, padding=6)
     self.messageArea.HideBackground()
     self.messageArea.RemoveActiveFrame()
     uicontrols.Frame(parent=self.messageArea, color=(0.4, 0.4, 0.4, 0.5))
     self.messageArea.SetValue(localization.GetByLabel('UI/SystemMenu/DisplayAndGraphics/OptimizeSettings/OptimizeSettingsSelectInfo'))
     btns = uicontrols.ButtonGroup(btns=[[localization.GetByLabel('UI/Common/Buttons/Apply'),
       self.Apply,
       (),
       66], [localization.GetByLabel('UI/Common/Buttons/Cancel'),
       self.CloseByUser,
       (),
       66]], parent=main, idx=0)
     return self
Example #5
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()
Example #6
0
 def ConstructLayout(self):
     corpName = cfg.eveowners.Get(self.corpid).name
     corpInfoCont = uicls.Container(name='corpInfo',
                                    parent=self.sr.main,
                                    align=uiconst.TOTOP,
                                    height=68,
                                    padding=const.defaultPadding)
     corpLogoCont = uicls.Container(name='corpLogo',
                                    parent=corpInfoCont,
                                    align=uiconst.TOLEFT,
                                    width=68)
     corpTextCont = uicls.Container(name='corpName',
                                    parent=corpInfoCont,
                                    align=uiconst.TOALL)
     applicationCont = uicls.Container(name='corpInfo',
                                       parent=self.sr.main,
                                       align=uiconst.TOALL,
                                       padding=(const.defaultPadding, 0,
                                                const.defaultPadding,
                                                const.defaultPadding))
     uiutil.GetOwnerLogo(corpLogoCont,
                         self.corpid,
                         size=64,
                         noServerCall=True)
     corpText = localization.GetByLabel(
         'UI/Corporations/BaseCorporationUI/ApplyForMembership',
         corporation=corpName)
     corpNameLabel = uicls.EveLabelLarge(parent=corpTextCont,
                                         text=corpText,
                                         top=12,
                                         align=uiconst.TOPLEFT,
                                         width=270)
     editText = localization.GetByLabel(
         'UI/Corporations/BaseCorporationUI/CorporationApplicationText')
     editLabel = uicls.EveLabelSmall(parent=applicationCont,
                                     text=editText,
                                     align=uiconst.TOTOP)
     tax = self.corporation.taxRate * 100
     taxText = localization.GetByLabel(
         'UI/Corporations/BaseCorporationUI/CurrentTaxRateForCorporation',
         corporation=corpName,
         taxRate=tax)
     taxLabel = uicls.EveLabelSmall(parent=applicationCont,
                                    text=taxText,
                                    align=uiconst.TOBOTTOM)
     if self.corporation and not self.corporation.isRecruiting:
         notRecruitingText = localization.GetByLabel(
             'UI/Corporations/BaseCorporationUI/RecruitmentMayBeClosed')
         notRecruiting = uicls.EveLabelSmall(parent=applicationCont,
                                             text=notRecruitingText,
                                             align=uiconst.TOBOTTOM,
                                             idx=0)
         self.SetMinSize((self.default_width,
                          self.default_height + notRecruiting.textheight),
                         refresh=True)
     self.applicationText = uicls.EditPlainText(setvalue='',
                                                parent=applicationCont,
                                                align=uiconst.TOALL,
                                                maxLength=1000)
Example #7
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)
Example #8
0
 def ConstructLayout(self):
     cont = uicls.Container(parent=self.sr.main,
                            align=uiconst.TOALL,
                            padding=const.defaultPadding)
     if boot.region == 'optic':
         nameValue = localization.GetByLabel(
             'UI/Corporations/CorporationWindow/Alliances/Home/NameAlliance',
             allianceName=cfg.eveowners.Get(session.corpid).ownerName)
     else:
         nameValue = localization.GetByLabel(
             'UI/Corporations/CorporationWindow/Alliances/Home/NameAlliance',
             languageID=localization.LOCALE_SHORT_ENGLISH,
             allianceName=cfg.eveowners.Get(session.corpid).ownerName)
     self.nameEdit = uicls.SinglelineEdit(
         parent=cont,
         label=localization.GetByLabel('UI/Common/Name'),
         align=uiconst.TOTOP,
         maxLength=100,
         padTop=12,
         setvalue=nameValue)
     shortNameCont = uicls.Container(parent=cont,
                                     align=uiconst.TOTOP,
                                     height=30,
                                     padTop=20)
     suggestBtn = uicls.Button(
         parent=shortNameCont,
         align=uiconst.TOPRIGHT,
         label=localization.GetByLabel(
             'UI/Corporations/CorporationWindow/Alliances/Home/SuggestCommand'
         ),
         func=self.GetSuggestedTickerNames)
     editWidth = self.width - suggestBtn.width - 16
     self.shortNameEdit = uicls.SinglelineEdit(
         parent=shortNameCont,
         label=localization.GetByLabel(
             'UI/Corporations/CorporationWindow/Alliances/Home/ShortName'),
         align=uiconst.TOPLEFT,
         maxLength=5,
         width=editWidth)
     self.urlEdit = uicls.SinglelineEdit(
         parent=cont,
         label=localization.GetByLabel('UI/Common/URL'),
         align=uiconst.TOTOP,
         maxLenght=2048,
         padTop=12)
     editLabel = uicls.EveLabelSmall(
         parent=cont,
         text=localization.GetByLabel('UI/Common/Description'),
         height=16,
         align=uiconst.TOTOP,
         padTop=12)
     self.descriptionEdit = uicls.EditPlainText(parent=cont,
                                                align=uiconst.TOTOP,
                                                maxLength=5000,
                                                height=80)
 def StartupWelcomePanel(self, *args):
     welcomePanel = self.sr.welcomePanel
     cbCont = uiprimitives.Container(name='cbCont',
                                     parent=welcomePanel,
                                     align=uiconst.TOBOTTOM,
                                     pos=(0, 0, 0, 20))
     self.sr.wekcomeToAllCB = uicontrols.Checkbox(
         text=localization.GetByLabel(
             'UI/EVEMail/MailingLists/SendWelcomeMailToAllCheckbox'),
         parent=cbCont,
         configName='welcomeToAllCB',
         retval=self.mailingListID,
         checked=settings.user.ui.Get(
             'welcomeToAllCB_%s' % self.mailingListID, 0),
         align=uiconst.TOPLEFT,
         pos=(0, 0, 330, 0),
         callback=self.OnCheckboxChange)
     subjectCont = uiprimitives.Container(name='subjectCont',
                                          parent=welcomePanel,
                                          align=uiconst.TOTOP,
                                          pos=(0, 0, 0, 30),
                                          padding=(0, 0, 1, 0))
     subjectTextCont = uiprimitives.Container(name='subjectCont',
                                              parent=subjectCont,
                                              align=uiconst.TOLEFT,
                                              pos=(0, 0, 40, 0))
     subjectLabel = uicontrols.EveHeaderSmall(text=localization.GetByLabel(
         'UI/EVEMail/MailingLists/WelcomeMailSubject'),
                                              parent=subjectTextCont,
                                              align=uiconst.TOPLEFT,
                                              top=2,
                                              left=0,
                                              state=uiconst.UI_NORMAL)
     subjectTextCont.width = subjectLabel.textwidth + 5
     self.sr.subjecField = uicontrols.SinglelineEdit(
         name='subjecField',
         parent=subjectCont,
         maxLength=const.mailMaxSubjectSize,
         pos=(0, 0, 0, 0),
         label='',
         align=uiconst.TOTOP)
     self.sr.welcomeScrollCont = scrollCont = uiprimitives.Container(
         name='scrollCont', parent=welcomePanel, align=uiconst.TOALL)
     self.sr.welcomeEdit = uicls.EditPlainText(
         setvalue='',
         parent=self.sr.welcomeScrollCont,
         align=uiconst.TOALL,
         showattributepanel=1)
     uicontrols.ButtonGroup(btns=[[
         localization.GetByLabel('UI/Common/Buttons/Save'),
         self.SaveWelcomeMail, None, None
     ]],
                            parent=welcomePanel,
                            idx=0,
                            line=False)
Example #10
0
 def DrawInfo(self):
     self.sr.info = uicls.Container(name='info',
                                    parent=self.sr.infoContainer,
                                    align=uiconst.TOALL,
                                    pos=(0, 0, 0, 0),
                                    padding=(10, 2, 10, 10))
     self.sr.icon = uicls.Container(name='icon',
                                    parent=self.sr.info,
                                    align=uiconst.TOLEFT,
                                    pos=(0, 0, 64, 0),
                                    padding=(0, 0, 0, 0))
     self.sr.desc = uicls.EditPlainText(parent=self.sr.info, readonly=1)
     self.sr.desc.HideBackground()
     self.sr.desc.RemoveActiveFrame()
Example #11
0
 def ApplyAttributes(self, attributes):
     uicls.Window.ApplyAttributes(self, attributes)
     self.SetCaption(localization.GetByLabel('UI/Notepad/Notepad'))
     self.SetWndIcon('ui_49_64_2')
     self.SetTopparentHeight(0)
     self.SetMinSize((256, 128))
     self.HideMainIcon()
     self.sr.main.padding = const.defaultPadding
     self.sr.nav = uicls.Container(name='nav', align=uiconst.TOLEFT, width=settings.user.ui.Get('notepadscrollistwidth', 128), parent=self.sr.main, idx=0)
     divider = xtriui.Divider(name='divider', align=uiconst.TOLEFT, idx=1, width=const.defaultPadding, parent=self.sr.main, state=uiconst.UI_NORMAL)
     divider.Startup(self.sr.nav, 'width', 'x', 100, 256)
     self.sr.navbuttons = uicls.Container(name='navbuttons', align=uiconst.TOBOTTOM, parent=self.sr.nav, height=38)
     self.sr.newfolder = uicls.Button(parent=self.sr.navbuttons, label=localization.GetByLabel('UI/Notepad/NewFolder'), padTop=4, align=uiconst.TOTOP, func=self.NewFolderClick)
     self.sr.newnote = uicls.Button(parent=self.sr.navbuttons, label=localization.GetByLabel('UI/Notepad/NewNote'), padTop=4, align=uiconst.TOTOP, func=self.NewNote, args=(0,))
     self.sr.navbuttons.height = sum([ each.height + each.padTop + each.padBottom for each in self.sr.navbuttons.children ]) + 4
     self.sr.senderlist = uicls.Scroll(name='senderlist', parent=self.sr.nav)
     self.sr.senderlist.OnDelete = self.OnDelete
     self.sr.senderlist.multiSelect = 0
     self.sr.note = uicls.Container(name='notecontainer', align=uiconst.TOALL, parent=self.sr.main, pos=(0, 0, 0, 0))
     self.sr.titlecont = uicls.Container(name='titlecontainer', align=uiconst.TOTOP, height=48, parent=self.sr.note)
     uicls.Frame(parent=self.sr.titlecont, padBottom=const.defaultPadding)
     uicls.Container(name='push', align=uiconst.TORIGHT, width=7, parent=self.sr.titlecont)
     uicls.Container(name='push', align=uiconst.TOTOP, height=9, parent=self.sr.titlecont)
     self.sr.icon = uicls.Icon(parent=self.sr.titlecont, pos=(7, 7, 32, 32))
     self.sr.titletext = uicls.EveLabelMedium(text='', parent=self.sr.titlecont, align=uiconst.TOALL, padLeft=46)
     self.sr.browser = uicls.EditPlainText(parent=self.sr.note, showattributepanel=1, counterMax=3900, countWithTags=True)
     self.sr.browser.sr.window = self
     self.sr.browser.allowPrivateDrops = 1
     self.OnScale_ = self._OnResize
     divider.OnSizeChanging = self.OnDividerMove
     self.starting = 1
     import log
     log.LogInfo('Starting Notepad')
     self.bms = None
     self.folders = {}
     self.notes = {}
     self.bookmarknotes = {}
     self.charnotes = {}
     self.settings = {}
     self.settingStrs = {}
     self.notedata = {}
     self.lastid = 0
     uthread.new(self.LoadNotesData)
Example #12
0
 def Execute(self,
             text,
             title,
             buttons,
             icon,
             suppText,
             customicon=None,
             height=None,
             default=None,
             modal=True,
             okLabel=None,
             cancelLabel=None):
     if height is None:
         height = 210
     self.MakeUnMinimizable()
     self.HideHeader()
     self.SetMinSize([340, height])
     self.DefineIcons(icon, customicon)
     if title is None:
         title = localization.GetByLabel('UI/Common/Information')
     self.sr.main = uiutil.FindChild(self, 'main')
     caption = uicls.EveCaptionLarge(text=title,
                                     align=uiconst.CENTERLEFT,
                                     parent=self.sr.topParent,
                                     left=64,
                                     width=270)
     self.SetTopparentHeight(max(56, caption.textheight + 16))
     if text:
         text = text.replace('\r', '').replace('\n', '')
         edit = uicls.EditPlainText(parent=self.sr.main,
                                    padding=const.defaultPadding,
                                    readonly=1)
         self.edit = edit
         uthread.new(self.SetText, text)
     self.DefineButtons(buttons,
                        default=default,
                        okLabel=okLabel,
                        cancelLabel=cancelLabel)
     if suppText:
         self.ShowSupp(suppText)
     if modal:
         uicore.registry.SetFocus(self)
 def ApplyAttributes(self, attributes):
     uicontrols.Window.ApplyAttributes(self, attributes)
     transmission = attributes.transmission
     self.isDockWnd = 0
     caption = getattr(transmission, 'caption', None) or localization.GetByLabel('UI/Generic/Information')
     hasDungeonWarp = getattr(transmission, 'hasDungeonWarp', False)
     self.scope = 'inflight'
     self.sr.main = uiutil.GetChild(self, 'main')
     uiprimitives.Line(parent=self.sr.topParent, align=uiconst.TOBOTTOM)
     uiprimitives.Container(name='push', parent=self.sr.topParent, align=uiconst.TOLEFT, width=70)
     self.sr.header = uicontrols.EveCaptionMedium(text=' ', parent=self.sr.topParent, align=uiconst.TOTOP, padTop=8)
     self.sr.messageArea = uicls.EditPlainText(parent=self.sr.main, padding=const.defaultPadding, readonly=1)
     self.sr.messageArea.HideBackground()
     self.sr.messageArea.RemoveActiveFrame()
     self.NoSeeThrough()
     self.SetMinSize([360, 240], 1)
     self.SetCaption(caption)
     self.MakeUnResizeable()
     self.MakeUnKillable()
     self.SetTopparentHeight(58)
     if not hasDungeonWarp:
         self.DefineButtons(uiconst.OK, okLabel=localization.GetByLabel('UI/Generic/Close'), okFunc=self.Close)
     else:
         self.sr.instanceID = getattr(transmission.rec.rec, 'instanceID', 0)
         self.sr.solarSystemID = getattr(transmission.rec.rec, 'solarSystemID', 0)
         if self.sr.solarSystemID == eve.session.solarsystemid:
             okLabel = localization.GetByLabel('UI/Commands/WarpTo')
             okFunc = self.WarpToEPLocation
         else:
             inFleet = bool(eve.session.fleetid)
             isLeader = sm.GetService('menu').ImFleetLeaderOrCommander()
             if inFleet and isLeader:
                 okLabel = localization.GetByLabel('UI/Fleet/FleetBroadcast/Commands/BroadcastTravelTo')
                 okFunc = self.SetFleetDestination
             else:
                 okLabel = localization.GetByLabel('UI/Inflight/SetDestination')
                 okFunc = self.SetDestination
         if self.sr.instanceID and self.sr.solarSystemID:
             self.DefineButtons(uiconst.OKCANCEL, okLabel=okLabel, okFunc=okFunc, cancelLabel=localization.GetByLabel('UI/Generic/Close'), cancelFunc=self.Close)
         else:
             self.DefineButtons(uiconst.OK, okLabel=localization.GetByLabel('UI/Generic/Close'), okFunc=self.Close)
Example #14
0
 def ConstructLayout(self):
     allianceName = cfg.eveowners.Get(self.allianceID).name
     allianceInfoCont = uiprimitives.Container(name='allianceInfo', parent=self.sr.main, align=uiconst.TOTOP, height=68, padding=const.defaultPadding)
     allianceLogoCont = uiprimitives.Container(name='allianceLogo', parent=allianceInfoCont, align=uiconst.TOLEFT, width=68)
     allianceTextCont = uiprimitives.Container(name='allianceName', parent=allianceInfoCont, align=uiconst.TOALL)
     applicationCont = uiprimitives.Container(name='allianceInfo', parent=self.sr.main, align=uiconst.TOALL, padding=(const.defaultPadding,
      0,
      const.defaultPadding,
      const.defaultPadding))
     uiutil.GetOwnerLogo(allianceLogoCont, self.allianceID, size=64, noServerCall=True)
     allianceText = localization.GetByLabel('UI/Corporations/CorpApplications/YourApplicationToJoin', corpName=allianceName)
     allianceNameLabel = uicontrols.EveLabelLarge(parent=allianceTextCont, text=allianceText, top=12, align=uiconst.TOPLEFT, width=270)
     editText = localization.GetByLabel('UI/Corporations/BaseCorporationUI/CorporationApplicationText')
     editLabel = uicontrols.EveLabelSmall(parent=applicationCont, text=editText, height=16, align=uiconst.TOTOP)
     if self.application.applicationText is not None:
         appText = self.application.applicationText
     else:
         appText = ''
     self.applicationText = uicls.EditPlainText(setvalue=appText, parent=applicationCont, align=uiconst.TOTOP, maxLength=1000, height=100, readonly=True)
     status = uicontrols.EveLabelSmall(parent=applicationCont, text=localization.GetByLabel('UI/Corporations/CorporationWindow/Alliances/Applications/Status'), align=uiconst.TOTOP, top=6)
     statusLabel = uicontrols.EveLabelSmallBold(parent=applicationCont, text=_GetApplicationStatusStr(self.application.state), height=12, align=uiconst.TOTOP)
 def Execute(self,
             text,
             title,
             buttons,
             icon,
             suppText,
             customicon=None,
             height=None,
             default=None,
             modal=True,
             okLabel=None,
             cancelLabel=None):
     self._Execute(title, buttons, icon, suppText, customicon, height,
                   default, modal, okLabel, cancelLabel)
     if text:
         text = text.replace('\r', '').replace('\n', '')
         edit = uicls.EditPlainText(parent=self.sr.main,
                                    padding=const.defaultPadding,
                                    readonly=1)
         self.edit = edit
         uthread.new(self.SetText, text)
Example #16
0
 def ConstructLayout(self):
     allianceName = cfg.eveowners.Get(self.allianceID).name
     allianceInfoCont = uiprimitives.Container(name='allianceInfo', parent=self.sr.main, align=uiconst.TOTOP, height=68, padding=const.defaultPadding)
     allianceLogoCont = uiprimitives.Container(name='allianceLogo', parent=allianceInfoCont, align=uiconst.TOLEFT, width=68)
     allianceTextCont = uiprimitives.Container(name='allianceName', parent=allianceInfoCont, align=uiconst.TOALL)
     applicationCont = uiprimitives.Container(name='allianceInfo', parent=self.sr.main, align=uiconst.TOALL, padding=(const.defaultPadding,
      0,
      const.defaultPadding,
      const.defaultPadding))
     uiutil.GetOwnerLogo(allianceLogoCont, self.allianceID, size=64, noServerCall=True)
     allianceText = localization.GetByLabel('UI/Corporations/BaseCorporationUI/ApplyForMembership', corporation=allianceName)
     allianceNameLabel = uicontrols.EveLabelLarge(parent=allianceTextCont, text=allianceText, top=12, align=uiconst.TOPLEFT, width=270)
     alliance = sm.GetService('alliance').GetAlliance(self.allianceID)
     corp = sm.GetService('corp').GetCorporation(alliance.executorCorpID)
     myCorpName = cfg.eveowners.Get(session.corpid).ownerName
     stdText = localization.GetByLabel('UI/Corporations/BaseCorporationUI/AskJoinAlliance', ceo='-----', ceoID=corp.ceoID, mycorp=myCorpName, alliancename=allianceName, sender=session.charid, mycorpname=myCorpName)
     editText = localization.GetByLabel('UI/Corporations/BaseCorporationUI/CorporationApplicationText')
     editLabel = uicontrols.EveLabelSmall(parent=applicationCont, text=editText, height=16, align=uiconst.TOTOP)
     self.applicationText = uicls.EditPlainText(setvalue=stdText, parent=applicationCont, align=uiconst.TOTOP, maxLength=1000, height=100)
     appText = localization.GetByLabel('UI/Corporations/BaseCorporationUI/ThisApplicationOverwritesOlderOnes')
     appLabel = uicontrols.EveLabelMedium(parent=applicationCont, text=appText, align=uiconst.TOTOP, top=8)
 def ConstructLayout(self):
     self.acceptRb = None
     self.withdrawRb = None
     corpName = cfg.eveowners.Get(self.corpid).name
     corpInfoCont = uiprimitives.Container(name='corpInfo', parent=self.sr.main, align=uiconst.TOTOP, height=68, padding=const.defaultPadding)
     corpLogoCont = uiprimitives.Container(name='corpLogo', parent=corpInfoCont, align=uiconst.TOLEFT, width=68)
     corpTextCont = uiprimitives.Container(name='corpName', parent=corpInfoCont, align=uiconst.TOALL)
     controlCont = uiprimitives.Container(name='buttons', parent=self.sr.main, align=uiconst.TOBOTTOM, padding=(const.defaultPadding,
      0,
      const.defaultPadding,
      const.defaultPadding))
     controlContHeight = 0
     applicationCont = uiprimitives.Container(name='applicationCont', parent=self.sr.main, align=uiconst.TOALL, padding=(const.defaultPadding,
      0,
      const.defaultPadding,
      const.defaultPadding))
     uiutil.GetOwnerLogo(corpLogoCont, self.corpid, size=64, noServerCall=True)
     corpText = localization.GetByLabel('UI/Corporations/CorpApplications/YourApplicationToJoin', corpName=corpName)
     corpNameLabel = uicontrols.EveLabelLarge(parent=corpTextCont, text=corpText, top=12, align=uiconst.TOPLEFT, width=270)
     if self.status == const.crpApplicationAppliedByCharacter:
         statusText = localization.GetByLabel('UI/Corporations/CorpApplications/ApplicationNotProcessed')
         statusLabel = uicontrols.EveLabelSmall(parent=applicationCont, text=statusText, align=uiconst.TOTOP, padBottom=const.defaultPadding)
     else:
         statusText = statusLabel = ''
     editText = localization.GetByLabel('UI/Corporations/BaseCorporationUI/CorporationApplicationText')
     editLabel = uicontrols.EveLabelSmall(parent=applicationCont, text=editText, align=uiconst.TOTOP)
     if self.application.applicationText is not None:
         appText = self.application.applicationText
     else:
         appText = ''
     self.applicationText = uicls.EditPlainText(setvalue=appText, parent=applicationCont, maxLength=1000, readonly=True)
     if self.status in const.crpApplicationActiveStatuses:
         isWithdrawChecked = True
         if self.status in (const.crpApplicationAcceptedByCorporation, const.crpApplicationInvitedByCorporation):
             isWithdrawChecked = False
             self.acceptRb = uicontrols.Checkbox(text=localization.GetByLabel('UI/Corporations/CorpApplications/AcceptApplication'), parent=controlCont, configName='accept', retval=1, checked=True, groupname='stateGroup', align=uiconst.TOBOTTOM)
             controlContHeight += 40
         self.withdrawRb = uicontrols.Checkbox(text=localization.GetByLabel('UI/Corporations/CorpApplications/WithdrawApplication'), parent=controlCont, configName='accept', retval=3, checked=isWithdrawChecked, groupname='stateGroup', align=uiconst.TOBOTTOM)
         controlContHeight += 20
     controlCont.height = controlContHeight
 def ApplyAttributes(self, attributes):
     uicontrols.Window.ApplyAttributes(self, attributes)
     self.application = attributes.application
     self.windowID = 'rejectCorpApplication'
     self.DefineButtons(uiconst.OKCANCEL, okFunc=self.Reject, cancelFunc=self.Cancel, okLabel=localization.GetByLabel('UI/Corporations/CorpApplications/RejectApplication'))
     wndCaption = localization.GetByLabel('UI/Corporations/Applications/ApplicationRejection')
     self.SetCaption(wndCaption)
     self.SetTopparentHeight(0)
     self.MakeUnResizeable()
     topCont = Container(parent=self.sr.main, align=uiconst.TOTOP, height=58)
     textCont = Container(parent=self.sr.main, align=uiconst.TOALL, padding=8)
     charName = cfg.eveowners.Get(self.application.characterID).name
     corpName = cfg.eveowners.Get(self.application.corporationID).name
     logoParent = uiprimitives.Container(parent=topCont, align=uiconst.TOPLEFT, pos=(8, 6, 48, 48))
     uiutil.GetOwnerLogo(logoParent, self.application.characterID, size=48, noServerCall=True)
     characterLink = localization.GetByLabel('UI/Contracts/ContractsWindow/ShowInfoLink', showInfoName=charName, info=('showinfo', const.typeCharacterAmarr, self.application.characterID))
     nameLabel = EveLabelMedium(parent=topCont, left=64, top=12, text=characterLink, align=uiconst.TOTOP, state=uiconst.UI_NORMAL)
     applicationDate = localization.GetByLabel('UI/Corporations/Applications/ApplicationDate', applicationDateTime=self.application.applicationDateTime)
     dateLabel = EveLabelMedium(parent=topCont, left=64, top=2, text=applicationDate, align=uiconst.TOTOP, state=uiconst.UI_NORMAL)
     messageLabel = EveLabelMedium(parent=textCont, align=uiconst.TOTOP, text=localization.GetByLabel('UI/Corporations/CorpApplications/ApplicationRejectionText', charName=charName, corpName=corpName))
     regardsLabel = EveLabelMedium(parent=textCont, align=uiconst.TOBOTTOM, text=localization.GetByLabel('UI/Corporations/CorpApplications/ApplicationRejectionRegards', corpName=corpName), padTop=4)
     self.messageTextEdit = uicls.EditPlainText(parent=textCont, maxLength=4000, hintText=localization.GetByLabel('UI/Corporations/CorpApplications/CorpRejectionMessage'), top=4)
 def DrawStuff(self, *args):
     btns = uicontrols.ButtonGroup(btns=[[localization.GetByLabel('UI/Mail/Notifications/MarkAllAsRead'),
       self.MarkAllRead,
       None,
       81], [localization.GetByLabel('UI/Mail/Notifications/DeleteAll'),
       self.DeleteAll,
       None,
       81]], parent=self, idx=0)
     leftContWidth = settings.user.ui.Get('notifications_leftContWidth', 200)
     self.sr.leftCont = uiprimitives.Container(name='leftCont', parent=self, align=uiconst.TOLEFT, pos=(const.defaultPadding,
      0,
      leftContWidth,
      0))
     self.sr.leftScroll = uicontrols.Scroll(name='leftScroll', parent=self.sr.leftCont, padding=(0,
      const.defaultPadding,
      0,
      const.defaultPadding))
     self.sr.leftScroll.multiSelect = 0
     divider = Divider(name='divider', align=uiconst.TOLEFT, width=const.defaultPadding, parent=self, state=uiconst.UI_NORMAL)
     divider.Startup(self.sr.leftCont, 'width', 'x', 180, 250)
     self.sr.rightCont = uiprimitives.Container(name='rightCont', parent=self, align=uiconst.TOALL, pos=(0,
      0,
      const.defaultPadding,
      const.defaultPadding))
     dividerCont = uicontrols.DragResizeCont(name='dividerCont', settingsID='notificationsSplitSize', parent=self.sr.rightCont, align=uiconst.TOTOP_PROP, minSize=0.1, maxSize=0.9, defaultSize=0.7, clipChildren=True)
     self.sr.readingPaneCont = uiprimitives.Container(name='readingPaneCont', parent=self.sr.rightCont, align=uiconst.TOALL)
     self.sr.readingPane = uicls.EditPlainText(setvalue='', parent=self.sr.readingPaneCont, align=uiconst.TOALL, readonly=1)
     self.sr.msgCont = uiprimitives.Container(name='msgCont', parent=dividerCont)
     self.sr.msgScroll = uicontrols.Scroll(name='msgScroll', parent=self.sr.msgCont, padding=(0,
      const.defaultPadding,
      0,
      0))
     self.sr.msgScroll.sr.id = 'notifications_msgs'
     self.sr.msgScroll.sr.fixedColumns = {localization.GetByLabel('UI/Mail/Status'): 52}
     self.sr.msgScroll.OnSelectionChange = self.MsgScrollSelectionChange
     self.sr.msgScroll.OnDelete = self.DeleteFromKeyboard
     self.inited = True
Example #20
0
 def ApplyAttributes(self, attributes):
     uicontrols.Window.ApplyAttributes(self, attributes)
     isAlliance = attributes.isAlliance
     bulletin = attributes.bulletin
     self.scope = 'all'
     self.bulletin = bulletin
     self.bulletinID = None
     self.editDateTime = None
     self.isAlliance = isAlliance
     self.SetMinSize([420, 300])
     self.SetWndIcon(self.iconNum, mainTop=-10)
     self.SetCaption(localization.GetByLabel('UI/Corporations/EditCorpBulletin/EditBulletinCaption'))
     self.SetTopparentHeight(45)
     main = uiutil.FindChild(self, 'main')
     main.left = main.top = main.width = main.height = const.defaultPadding
     uiprimitives.Container(parent=self.sr.topParent, width=4, align=uiconst.TORIGHT, name='push')
     uiprimitives.Container(parent=self.sr.topParent, width=120, align=uiconst.TOLEFT, name='push')
     titleInput = uicontrols.SinglelineEdit(name='titleInput', parent=self.sr.topParent, align=uiconst.TOBOTTOM, maxLength=100)
     titleInput.OnDropData = self.OnDropData
     self.sr.titleInput = titleInput
     l = uicontrols.EveLabelSmall(text=localization.GetByLabel('UI/Corporations/EditCorpBulletin/BulletinTitle'), parent=titleInput, width=64, height=12, left=48, top=4, state=uiconst.UI_DISABLED)
     l.left = -l.textwidth - 6
     uiprimitives.Container(parent=main, height=const.defaultPadding, align=uiconst.TOTOP, name='push')
     self.sr.messageEdit = uicls.EditPlainText(setvalue='', parent=main, maxLength=2000, showattributepanel=1)
     self.sr.bottom = uiprimitives.Container(name='bottom', parent=self.sr.maincontainer, align=uiconst.TOBOTTOM, height=24, idx=0)
     uicontrols.ButtonGroup(btns=[[localization.GetByLabel('UI/Common/Buttons/Submit'),
       self.ClickSend,
       None,
       None], [localization.GetByLabel('UI/Common/Buttons/Cancel'),
       self.OnCancel,
       None,
       None]], parent=self.sr.bottom, line=False)
     if bulletin is not None:
         self.sr.titleInput.SetValue(bulletin.title)
         self.sr.messageEdit.SetValue(bulletin.body)
         self.bulletinID = bulletin.bulletinID
         self.editDateTime = bulletin.editDateTime
Example #21
0
 def AddTextedit(self):
     self.new = uicls.Container(name='texteditField',
                                parent=self.parent,
                                align=uiconst.TOTOP,
                                height=self.type.get('height', 68))
     self.code = uicls.EditPlainText(
         setvalue=self.type.get('setvalue', '')
         or self.type.get('text', ''),
         parent=self.new,
         padding=(self.leftPush, 2, 0, 2),
         readonly=self.type.get('readonly', 0),
         showattributepanel=self.type.get('showAttribPanel', 0),
         maxLength=self.type.get('maxlength', None)
         or self.type.get('maxLength', None))
     label = self.type.get('label', '')
     if label == '_hide':
         self.code.padLeft = 0
     elif label:
         uicls.EveLabelSmall(text=label,
                             parent=self.new,
                             name='label',
                             left=7,
                             width=self.leftPush - 6,
                             top=5)
Example #22
0
 def ConstructLayout(self):
     alliance = sm.GetService('alliance').GetAlliance()
     cont = uicls.Container(parent=self.sr.main,
                            align=uiconst.TOALL,
                            padding=const.defaultPadding)
     self.urlEdit = uicls.SinglelineEdit(
         parent=cont,
         label=localization.GetByLabel('UI/Common/URL'),
         align=uiconst.TOTOP,
         maxLength=2048,
         padTop=12,
         setvalue=alliance.url)
     editLabel = uicls.EveLabelSmall(
         parent=cont,
         text=localization.GetByLabel('UI/Common/Description'),
         height=16,
         align=uiconst.TOTOP,
         padTop=12)
     self.descriptionEdit = uicls.EditPlainText(
         parent=cont,
         align=uiconst.TOTOP,
         maxLength=5000,
         height=80,
         setvalue=alliance.description)
Example #23
0
    def AddSliders(self, *args):
        self.currentselection = None
        self.ribbonsliders = []
        self.medalsliders = []
        uix.Flush(self.sr.main)
        ribbondata = [
            xtriui.Ribbon,
            [('', None, None), ('', None, None), ('', None, None),
             ('', None, None), ('', None, None)]
        ]
        medaldata = [
            xtriui.Medal,
            [('', None, None), ('', None, None), ('', None, None),
             ('', None, None)]
        ]
        top = 0
        imgSize = 128
        self.sr.buttoncont = uicls.Container(name='Buttons',
                                             align=uiconst.TOBOTTOM,
                                             parent=self.sr.main)
        self.sr.mainpar = uicls.Container(name='MainPar',
                                          align=uiconst.TOALL,
                                          parent=self.sr.main,
                                          pos=(0, 0, 0, 0))
        mp = uicls.Container(name='Left',
                             align=uiconst.TOLEFT,
                             width=imgSize,
                             left=const.defaultPadding,
                             top=const.defaultPadding,
                             parent=self.sr.mainpar)
        medalribbonobject = xtriui.MedalRibbon(name='MedalRibbonParent',
                                               width=128,
                                               height=256,
                                               parent=mp,
                                               align=uiconst.CENTER)
        medalribbonobject.Startup([ribbondata, medaldata], imgSize * 2)
        self.sr.medalribbonobject = medalribbonobject
        btns = []
        btns.append([
            localization.GetByLabel(
                'UI/Corporations/CreateDecorationWindow/Submit'),
            self.SubmitData, None, None
        ])
        btns.append([
            localization.GetByLabel(
                'UI/Corporations/CreateDecorationWindow/Reset'),
            self.AddSliders, None, None
        ])
        buttons = uicls.ButtonGroup(btns=btns,
                                    parent=self.sr.buttoncont,
                                    unisize=0)
        self.sr.buttoncont.height = 20 if not len(btns) else buttons.height
        uicls.Line(parent=self.sr.mainpar, align=uiconst.TOLEFT)
        self.sr.mainselector = uicls.Container(name='MainSelector',
                                               align=uiconst.TOALL,
                                               parent=self.sr.mainpar,
                                               pos=(const.defaultPadding, 0,
                                                    const.defaultPadding, 0))
        uix.GetContainerHeader(
            localization.GetByLabel('UI/Contracts/BasicInfo'),
            self.sr.mainselector, 0, -4)
        uicls.Container(name='push',
                        align=uiconst.TOTOP,
                        height=6,
                        parent=self.sr.mainselector)
        medalnamecont = uicls.Container(parent=self.sr.mainselector,
                                        align=uiconst.TOTOP)
        uicls.Container(name='push',
                        align=uiconst.TOTOP,
                        height=24,
                        parent=medalnamecont)
        uicls.Container(name='push',
                        align=uiconst.TOLEFT,
                        width=4,
                        parent=medalnamecont)
        uicls.Container(name='push',
                        align=uiconst.TORIGHT,
                        width=4,
                        parent=medalnamecont)
        self.sr.medalname = uicls.SinglelineEdit(
            name='medalname',
            parent=medalnamecont,
            setvalue=None,
            pos=(0, 12, 284, 0),
            label=localization.GetByLabel(
                'UI/Corporations/CreateDecorationWindow/DecorationName'),
            maxLength=100)
        top = const.defaultPadding + self.sr.medalname.top + self.sr.medalname.height
        uicls.EveLabelSmall(text=localization.GetByLabel(
            'UI/Corporations/CreateDecorationWindow/Description'),
                            parent=medalnamecont,
                            top=top,
                            width=100)
        self.sr.medaldesc = uicls.EditPlainText(setvalue='',
                                                parent=medalnamecont,
                                                align=uiconst.TOPLEFT,
                                                name='medaldesc',
                                                maxLength=1000,
                                                top=top + 16,
                                                left=-1,
                                                width=286,
                                                height=64)
        medalnamecont.height = self.sr.medalname.height + self.sr.medaldesc.height + 8 + 23
        uicls.Container(name='push',
                        align=uiconst.TOTOP,
                        height=4,
                        parent=self.sr.mainselector)
        uix.GetContainerHeader(
            localization.GetByLabel(
                'UI/Corporations/CreateDecorationWindow/Ribbon'),
            self.sr.mainselector, 1, -4)
        labels = ['caldari', 'minmatar', 'gallente', 'amarr']
        data = []
        for label in labels:
            data.append([
                xtriui.Ribbon,
                [(label, '1_1', None), ('', None, None), ('', None, None),
                 ('', None, None), (label, '1_2', None)]
            ])

        slider = self.GetImageSlider(data)
        slider.SetParentListener(self.sr.medalribbonobject.sr.ribbon, None)
        slider.SetAlign(uiconst.TOPRIGHT)
        slider.PostOnClick = self.PostOnClick
        self.sr.baseribbonslider = slider
        self.ribbonsliders.append(slider)
        parent = slider.parent
        colorPreview = xtriui.ColorPreview(name='colorPreview',
                                           align=uiconst.TORIGHT,
                                           height=32,
                                           width=32)
        uicls.Frame(parent=colorPreview)
        colorPreview.Startup()
        colorPreview.sr.layerid = 4
        colorPreview.sr.dad = self.sr.medalribbonobject.sr.ribbon
        colorPreview.FromInt(-330271)
        colorPreview.state = uiconst.UI_HIDDEN
        push = uicls.Container(name='push',
                               align=uiconst.TORIGHT,
                               height=32,
                               width=4)
        slider.parent.children.insert(0, push)
        slider.parent.children.insert(0, colorPreview)
        ranger = range(1, 4)
        ranger.reverse()
        for x in ranger:
            data = []
            data = self.GetRibbonShapeData('Caldari')
            slider = self.GetImageSlider(data, True)
            slider.SetParentListener(self.sr.medalribbonobject.sr.ribbon, x)
            slider.SetAlign(uiconst.TOPRIGHT)
            slider.PostOnClick = self.PostOnClick
            parent = slider.parent
            self.AddSliderReset(slider)
            colorPreview = xtriui.ColorPreview(name='colorPreview',
                                               align=uiconst.TORIGHT,
                                               width=32,
                                               height=32)
            uicls.Frame(parent=colorPreview)
            colorPreview.Startup()
            colorPreview.sr.layerid = x
            colorPreview.sr.dad = self.sr.medalribbonobject.sr.ribbon
            colorPreview.FromInt(-330271)
            colorPreview.state = uiconst.UI_HIDDEN
            push = uicls.Container(name='push',
                                   align=uiconst.TORIGHT,
                                   height=32,
                                   width=4)
            slider.parent.children.insert(0, push)
            slider.parent.children.insert(0, colorPreview)
            slider.parent.state = uiconst.UI_HIDDEN
            self.ribbonsliders.append(slider)

        uicls.Container(name='push',
                        align=uiconst.TOTOP,
                        height=4,
                        parent=self.sr.mainselector)
        uix.GetContainerHeader(
            localization.GetByLabel(
                'UI/Corporations/CreateDecorationWindow/Medal'),
            self.sr.mainselector, 1, -4)
        labels = (('compass', 2), ('imperial', 2), ('pentagon', 1),
                  ('rombus', 1), ('round', 6), ('shield', 1), ('square',
                                                               2), ('star', 7))
        data = []
        for label, amount in labels:
            for x in xrange(0, amount * 4):
                icon = '%s_%s' % (x / 4 + 1, x % 4 + 1)
                data.append([xtriui.Medal, [(label, icon, None)]])

        slider = self.GetImageSlider(data)
        slider.SetParentListener(self.sr.medalribbonobject.sr.medal, 3)
        slider.SetAlign(uiconst.TOPRIGHT)
        slider.PostOnClick = self.PostOnClick
        self.sr.basemedalslider = slider
        self.medalsliders.append(slider)
        labels = (('elements', 33), )
        ranger = range(0, 3)
        ranger.reverse()
        for i in ranger:
            data = []
            for label, amount in labels:
                for x in xrange(0, amount * 4):
                    icon = '%s_%s' % (x / 4 + 1, x % 4 + 1)
                    data.append([xtriui.Medal, [(label, icon, None)]])

            slider = self.GetImageSlider(data)
            slider.SetParentListener(self.sr.medalribbonobject.sr.medal, i)
            slider.PostOnClick = self.PostOnClick
            slider.SetAlign(uiconst.TOPRIGHT)
            slider.parent.state = uiconst.UI_HIDDEN
            self.AddSliderReset(slider)
            self.medalsliders.append(slider)
Example #24
0
 def ConstructMessageDescriptionContainer(self):
     self.msgDescriptionContainer = uiprimitives.Container(parent=self.messageContainerMain, name='right description', pos=(0, 0, 0, 150), padding=(5, 5, 5, 5), align=uiconst.TOTOP)
     self.msgDescriptionLabel = uicontrols.Label(parent=self.msgDescriptionContainer, name='description text label', text='Description:', pos=(0, 0, 0, 0), align=uiconst.CENTERTOP)
     self.msgDescriptionEdit = uicls.EditPlainText(parent=self.msgDescriptionContainer, name='description edit', value='test', pos=(0, 0, 0, 0), padding=(5, 25, 5, 10), maxLength=self.maxTextLength)
Example #25
0
 def ConstructMessageTextContainer(self):
     self.msgTextContainer = uiprimitives.Container(parent=self.messageContainerMain, name='right text', pos=(0, 0, 0, 0), padding=(5, 5, 5, 5), align=uiconst.TOALL)
     self.msgTextLabel = uicontrols.Label(parent=self.msgTextContainer, name='message text label', text='Message:', pos=(0, 0, 0, 0), align=uiconst.CENTERTOP)
     self.msgTextEdit = uicls.EditPlainText(parent=self.msgTextContainer, name='text edit', pos=(0, 0, 0, 0), padding=(5, 25, 5, 10), maxLength=self.maxTextLength)
Example #26
0
 def ApplyAttributes(self, attributes):
     uicls.Window.ApplyAttributes(self, attributes)
     self.typeID = None
     self.scope = 'all'
     self.SetCaption(localization.GetByLabel('UI/Preview/PreviewCaption'))
     self.sr.main = uiutil.GetChild(self, 'main')
     self.SetWndIcon()
     self.SetTopparentHeight(0)
     self.SetMinSize([420, 320])
     self.sr.rightSide = rightSide = uicls.Container(name='rightSide',
                                                     parent=self.sr.main,
                                                     align=uiconst.TOALL,
                                                     pos=(0, 0, 0, 0),
                                                     padding=(6, 6, 6, 6),
                                                     clipChildren=1)
     self.loadingWheel = uicls.LoadingWheel(parent=self.sr.rightSide,
                                            align=uiconst.CENTER,
                                            state=uiconst.UI_NORMAL)
     listbtn = uicls.MenuIcon(size=24, ignoreSize=True)
     listbtn.sr.owner = self
     listbtn.state = uiconst.UI_NORMAL
     listbtn.align = uiconst.NOALIGN
     listbtn.left = 2
     listbtn.top = 10
     listbtn.hint = localization.GetByLabel('UI/Neocom/ListItemsInSystem')
     listbtn.GetMenu = self.GetShipMenu
     self.listbtn = listbtn
     self.sr.title = uicls.EveCaptionMedium(text='',
                                            parent=rightSide,
                                            align=uiconst.TOTOP,
                                            padding=(17, 4, 17, 0),
                                            state=uiconst.UI_NORMAL)
     self.sr.title.GetMenu = self.GetShipMenu
     self.sr.title.expandOnLeft = 1
     self.sr.subtitle = uicls.EveHeaderSmall(text='',
                                             parent=rightSide,
                                             align=uiconst.TOTOP,
                                             padding=(19, 0, 17, 0),
                                             state=uiconst.UI_DISABLED)
     self.textCont = uicls.Container(parent=self.sr.rightSide,
                                     align=uiconst.TOBOTTOM,
                                     pos=(0, 0, 0, 150))
     self.desc = uicls.EditPlainText(parent=self.textCont,
                                     readonly=1,
                                     padding=6,
                                     fontsize=12)
     self.desc.HideBackground()
     self.desc.RemoveActiveFrame()
     sc = form.SceneContainer(parent=self.sr.main,
                              align=uiconst.TOALL,
                              state=uiconst.UI_DISABLED,
                              padding=6)
     sc.Startup()
     self.sr.sceneContainer = sc
     nav = form.SceneContainerBaseNavigation(parent=self.sr.main,
                                             state=uiconst.UI_NORMAL,
                                             padding=6)
     nav.Startup(sc)
     nav.OnClick = self.OnClickNav
     self.sr.navigation = nav
     self.mannequin = None
     self.loadingCharacterThread = None
     self.previewingWhat = ''
     self.previewType = attributes.previewType
     self.previewCharacterInfo = None
     if attributes.previewCharacter:
         dna = attributes.dna
         if dna:
             self.previewCharacterInfo = (attributes.previewCharacter, dna)
Example #27
0
 def SetupStuff(self, fleetInfo=None):
     fleetName = localization.GetByLabel('UI/Fleet/DefaultFleetName',
                                         char=session.charid)
     inviteScope = INVITE_CORP
     description = ''
     needsApproval = False
     localMinStanding = None
     localMinSecurity = None
     publicMinStanding = None
     publicMinSecurity = None
     hideInfo = False
     myCorp = False
     myAlliance = False
     myMilitia = False
     isPublic = False
     publicIsGood = False
     publicIsHigh = False
     localIsGood = False
     localIsHigh = False
     if fleetInfo is not None:
         fleetName = fleetInfo.fleetName
         description = fleetInfo.description
         needsApproval = fleetInfo.joinNeedsApproval
         hideInfo = fleetInfo.hideInfo
         localMinStanding = fleetInfo.local_minStanding
         localMinSecurity = fleetInfo.local_minSecurity
         publicMinStanding = fleetInfo.public_minStanding
         publicMinSecurity = fleetInfo.public_minSecurity
         myCorp = IsOpenToCorp(fleetInfo)
         myAlliance = IsOpenToAlliance(fleetInfo)
         myMilitia = IsOpenToMilitia(fleetInfo)
         isPublic = IsOpenToPublic(fleetInfo)
         if publicMinStanding == const.contactGoodStanding:
             publicIsGood = True
         elif publicMinStanding == const.contactHighStanding:
             publicIsHigh = True
         if localMinStanding == const.contactGoodStanding:
             localIsGood = True
         elif localMinStanding == const.contactHighStanding:
             localIsHigh = True
     self.sr.main.Flush()
     self.sr.main.padding = 6
     uicls.EveLabelSmall(
         text=localization.GetByLabel('UI/Fleet/NameOfFleet'),
         parent=self.sr.main,
         padTop=6,
         align=uiconst.TOTOP)
     self.sr.fleetName = uicls.SinglelineEdit(name='fleetName',
                                              parent=self.sr.main,
                                              align=uiconst.TOTOP,
                                              maxLength=FLEETNAME_MAXLENGTH,
                                              setvalue=fleetName)
     uicls.EveLabelSmall(
         text=localization.GetByLabel('UI/Fleet/Description'),
         parent=self.sr.main,
         padTop=6,
         align=uiconst.TOTOP)
     self.sr.description = uicls.EditPlainText(
         setvalue=description,
         parent=self.sr.main,
         align=uiconst.TOTOP,
         height=64,
         maxLength=FLEETDESC_MAXLENGTH)
     openFleetText = uicls.EveLabelSmall(
         text=localization.GetByLabel('UI/Fleet/FleetRegistry/OpenFleetTo'),
         parent=self.sr.main,
         align=uiconst.TOTOP,
         state=uiconst.UI_NORMAL,
         padTop=6)
     self.sr.myCorpButton = uicls.Checkbox(
         text=localization.GetByLabel(
             'UI/Fleet/FleetRegistry/MyCorporation'),
         parent=self.sr.main,
         configName='corp',
         retval='1',
         checked=myCorp,
         hint=localization.GetByLabel(
             'UI/Fleet/FleetRegistry/CorpOnlyHint'))
     if session.allianceid is not None:
         self.sr.myAllianceButton = uicls.Checkbox(
             text=localization.GetByLabel(
                 'UI/Fleet/FleetRegistry/MyAlliance'),
             parent=self.sr.main,
             configName='alliance',
             retval='1',
             checked=myAlliance,
             hint=localization.GetByLabel(
                 'UI/Fleet/FleetRegistry/AllianceOnlyHint'),
             align=uiconst.TOTOP)
     if session.warfactionid is not None:
         self.sr.myMilitiaButton = uicls.Checkbox(
             text=localization.GetByLabel(
                 'UI/Fleet/FleetRegistry/MyMilitia'),
             parent=self.sr.main,
             configName='militia',
             retval='1',
             checked=myMilitia,
             hint=localization.GetByLabel(
                 'UI/Fleet/FleetRegistry/MyMilitiahint'),
             align=uiconst.TOTOP)
     self.sr.requireLocalStandingButton = uicls.Checkbox(
         text=localization.GetByLabel(
             'UI/Fleet/FleetRegistry/RequireStanding'),
         parent=self.sr.main,
         configName='requireLocalStanding',
         retval='1',
         checked=bool(localMinStanding),
         align=uiconst.TOTOP,
         hint=localization.GetByLabel(
             'UI/Fleet/FleetRegistry/RequireStandingHint'),
         padLeft=18)
     self.sr.localGoodStandingCB = uicls.Checkbox(
         text=localization.GetByLabel('UI/Standings/Good'),
         parent=self.sr.main,
         configName='localgood',
         reval=const.contactGoodStanding,
         checked=localIsGood,
         groupname='localStanding',
         align=uiconst.TOTOP,
         padLeft=36)
     self.sr.localHighStandingCB = uicls.Checkbox(
         text=localization.GetByLabel('UI/Standings/Excellent'),
         parent=self.sr.main,
         configName='localhigh',
         reval=const.contactHighStanding,
         checked=localIsHigh,
         groupname='localStanding',
         align=uiconst.TOTOP,
         padLeft=36)
     startVal = 0.5
     if localMinSecurity is not None:
         startVal = localMinSecurity / 20.0 + 0.5
     self.sr.requireLocalSecurityButton = uicls.Checkbox(
         text=localization.GetByLabel(
             'UI/Fleet/FleetRegistry/RequireSecurity',
             securityLevel=startVal),
         parent=self.sr.main,
         configName='requireLocalSecurity',
         retval='1',
         checked=localMinSecurity is not None,
         align=uiconst.TOTOP,
         padLeft=18,
         hint=localization.GetByLabel(
             'UI/Fleet/FleetRegistry/RequireSecurityHint'))
     self.sr.localSecuritySlider = self.AddSlider(self.sr.main,
                                                  'localSecurity',
                                                  -10,
                                                  10.0,
                                                  '',
                                                  startVal=startVal,
                                                  padLeft=18)
     self.sr.localSecuritySlider.SetValue(startVal)
     self.sr.publicButton = uicls.Checkbox(
         text=localization.GetByLabel(
             'UI/Fleet/FleetRegistry/BasedOnStandings'),
         parent=self.sr.main,
         configName='public',
         retval='1',
         checked=isPublic,
         align=uiconst.TOTOP,
         hint=localization.GetByLabel('UI/Fleet/FleetRegistry/AddPilots'))
     standingText = uicls.EveLabelSmall(text=localization.GetByLabel(
         'UI/Fleet/FleetRegistry/RequireStanding'),
                                        parent=self.sr.main,
                                        align=uiconst.TOTOP,
                                        state=uiconst.UI_NORMAL,
                                        padLeft=18)
     self.sr.publicGoodStandingCB = uicls.Checkbox(
         text=localization.GetByLabel('UI/Standings/Good'),
         parent=self.sr.main,
         configName='publicgood',
         reval=const.contactGoodStanding,
         checked=publicIsGood,
         groupname='publicStanding',
         align=uiconst.TOTOP,
         padLeft=18)
     self.sr.publicHighStandingCB = uicls.Checkbox(
         text=localization.GetByLabel('UI/Standings/Excellent'),
         parent=self.sr.main,
         configName='publichigh',
         reval=const.contactHighStanding,
         checked=publicIsHigh,
         groupname='publicStanding',
         align=uiconst.TOTOP,
         padLeft=18)
     startVal = 0.5
     if publicMinSecurity is not None:
         startVal = publicMinSecurity / 20.0 + 0.5
     self.sr.requirePublicSecurityButton = uicls.Checkbox(
         text=localization.GetByLabel(
             'UI/Fleet/FleetRegistry/RequireSecurity',
             securityLevel=startVal),
         parent=self.sr.main,
         configName='requirePublicSecurity',
         retval='1',
         checked=publicMinSecurity is not None,
         hint=localization.GetByLabel(
             'UI/Fleet/FleetRegistry/RequireSecurityHint'),
         padLeft=18)
     self.sr.publicSecuritySlider = self.AddSlider(self.sr.main,
                                                   'publicSecurity',
                                                   -10,
                                                   10.0,
                                                   '',
                                                   startVal=startVal,
                                                   padLeft=18)
     self.sr.publicSecuritySlider.SetValue(startVal)
     uicls.Line(parent=self.sr.main,
                align=uiconst.TOTOP,
                padLeft=-self.sr.main.padLeft,
                padRight=-self.sr.main.padRight,
                padTop=6,
                padBottom=3)
     self.sr.needsApprovalButton = uicls.Checkbox(
         text=localization.GetByLabel(
             'UI/Fleet/FleetRegistry/RequireApproval'),
         parent=self.sr.main,
         configName='needsApproval',
         retval='1',
         checked=needsApproval,
         hint=localization.GetByLabel(
             'UI/Fleet/FleetRegistry/RequireApprovalHint'))
     self.sr.hideInfoButton = uicls.Checkbox(
         text=localization.GetByLabel('UI/Fleet/FleetRegistry/HideInfo'),
         parent=self.sr.main,
         configName='hideInfo',
         retval='1',
         checked=hideInfo,
         hint=localization.GetByLabel(
             'UI/Fleet/FleetRegistry/HideInfoHint'),
         padBottom=6)
     self.sr.submitButtons = uicls.ButtonGroup(
         btns=[[
             localization.GetByLabel('UI/Common/Buttons/Submit'),
             self.Submit, ()
         ],
               [
                   localization.GetByLabel('UI/Common/Buttons/Cancel'),
                   self.CloseByUser, ()
               ]],
         parent=self.sr.main,
         idx=0,
         padLeft=-self.sr.main.padLeft,
         padRight=-self.sr.main.padRight)
     windowHeight = sum([
         each.height + each.padTop + each.padBottom
         for each in self.sr.main.children
     ]) + self.GetHeaderHeight(
     ) + self.sr.main.padTop + self.sr.main.padBottom
     self.SetMinSize([WINDOW_WIDTH, windowHeight], refresh=True)
Example #28
0
 def ApplyAttributes(self, attributes):
     uicontrols.Window.ApplyAttributes(self, attributes)
     self.ShowLoad()
     self.SetCaption(self.caption)
     self.DefineButtons(
         uiconst.OK,
         okLabel=localization.GetByLabel('UI/Generic/Submit'),
         okFunc=self.Submit)
     self.SetMinSize([320, 410], 1)
     self.SetWndIcon()
     self.SetTopparentHeight(0)
     self.MakeUnResizeable()
     self.pickingTicker = 0
     self.layerNumSelected = None
     self.sr.prefs = [None, None, None, None, None, None]
     self.sr.priorlogo = (None, None, None, None, None, None)
     self.sr.priordesc = self.description
     self.sr.priorurl = self.url
     self.sr.priortaxRate = self.taxRate
     par = uiprimitives.Container(name='logoControl',
                                  parent=self.sr.main,
                                  align=uiconst.TOTOP,
                                  height=100,
                                  width=310,
                                  padding=(5, 5, 5, 0))
     self.sr.logocontrol = uiprimitives.Container(name='controlpanel',
                                                  parent=par,
                                                  height=100,
                                                  width=160,
                                                  align=uiconst.CENTER)
     self.sr.inputcontrol = uiprimitives.Container(name='controlpanel',
                                                   parent=self.sr.main,
                                                   align=uiconst.TOALL,
                                                   pos=(0, 0, 0, 0),
                                                   padding=(5, 5, 5, 0))
     top = uix.GetTextHeight(
         localization.GetByLabel('UI/Corporations/CorpDetails/CorpName'))
     if boot.region == 'optic':
         defaultCorpName = localization.GetByLabel(
             'UI/Corporations/CorpDetails/DefaultCorpName')
     else:
         defaultCorpName = localization.GetByLabel(
             'UI/Corporations/CorpDetails/DefaultCorpName',
             localization.const.LOCALE_SHORT_ENGLISH)
     self.sr.corpNameEdit_container = uiprimitives.Container(
         name='corpNameEdit_container',
         parent=self.sr.inputcontrol,
         align=uiconst.TOTOP,
         height=56)
     self.sr.corpNameEdit = uicontrols.SinglelineEdit(
         name='nameEdit',
         parent=self.sr.corpNameEdit_container,
         setvalue=defaultCorpName,
         align=uiconst.TOTOP,
         maxLength=100,
         label=localization.GetByLabel(
             'UI/Corporations/CorpDetails/CorpName'),
         top=top)
     self.sr.corpNameEdit_container.height = self.sr.corpNameEdit.height + top + const.defaultPadding
     top = uix.GetTextHeight(
         localization.GetByLabel('UI/Corporations/CorpDetails/Ticker'))
     self.sr.corpTickerEdit_container = uiprimitives.Container(
         name='corpTickerEdit_container',
         parent=self.sr.inputcontrol,
         align=uiconst.TOTOP,
         height=56)
     btn = uicontrols.Button(parent=self.sr.corpTickerEdit_container,
                             label=localization.GetByLabel(
                                 'UI/Corporations/CorpDetails/Ticker'),
                             align=uiconst.BOTTOMRIGHT,
                             func=self.GetPickTicker,
                             idx=0)
     self.sr.corpTickerEdit = uicontrols.SinglelineEdit(
         name='corpTickerEdit',
         parent=self.sr.corpTickerEdit_container,
         setvalue='',
         align=uiconst.TOPLEFT,
         maxLength=5,
         label=localization.GetByLabel(
             'UI/Corporations/CorpDetails/Ticker'),
         top=top,
         width=min(300 - btn.width, 240))
     self.sr.corpTickerEdit_container.height = self.sr.corpTickerEdit.height + top + const.defaultPadding
     top = uix.GetTextHeight(
         localization.GetByLabel('UI/Corporations/CorpDetails/MemberLimit'))
     self.sr.memberLimit_container = uiprimitives.Container(
         name='memberLimit_container',
         parent=self.sr.inputcontrol,
         align=uiconst.TOTOP,
         height=24)
     btn = uicontrols.Button(
         parent=self.sr.memberLimit_container,
         label=localization.GetByLabel(
             'UI/Corporations/CorpDetails/UpdateWithMySkills'),
         align=uiconst.BOTTOMRIGHT,
         func=self.UpdateWithSkills,
         idx=0)
     uicontrols.EveLabelSmall(text=localization.GetByLabel(
         'UI/Corporations/CorpDetails/MemberLimit'),
                              parent=self.sr.memberLimit_container,
                              left=0,
                              top=0,
                              state=uiconst.UI_NORMAL)
     self.sr.memberLimit = uicontrols.EveLabelMedium(
         text='123',
         parent=self.sr.memberLimit_container,
         left=2,
         top=top,
         state=uiconst.UI_DISABLED,
         idx=0)
     self.sr.memberLimit_container.height = self.sr.memberLimit.height + top + const.defaultPadding
     top = uix.GetTextHeight(
         localization.GetByLabel('UI/Corporations/CorpDetails/TaxRate'))
     self.sr.taxRateEdit_container = uiprimitives.Container(
         name='taxRateEdit_container',
         parent=self.sr.inputcontrol,
         align=uiconst.TOTOP,
         height=24)
     self.sr.taxRateEdit = uicontrols.SinglelineEdit(
         name='taxRateEdit',
         parent=self.sr.taxRateEdit_container,
         floats=(0.0, 100.0, 1),
         setvalue=self.taxRate,
         align=uiconst.TOPLEFT,
         label=localization.GetByLabel(
             'UI/Corporations/CorpDetails/TaxRate'),
         top=top)
     self.sr.taxRateEdit_container.height = self.sr.taxRateEdit.height + top + const.defaultPadding
     top = uix.GetTextHeight('http://')
     self.sr.urlEdit_container = uiprimitives.Container(
         name='urlEdit_container',
         parent=self.sr.inputcontrol,
         align=uiconst.TOTOP)
     self.sr.urlEdit = uicontrols.SinglelineEdit(
         name='urlEdit',
         parent=self.sr.urlEdit_container,
         setvalue=self.url,
         maxLength=2048,
         align=uiconst.TOTOP,
         label=localization.GetByLabel(
             'UI/Corporations/CorpDetails/HomePage'),
         top=top)
     self.sr.urlEdit_container.height = self.sr.urlEdit.height + top + const.defaultPadding + 20
     top = uix.GetTextHeight(
         localization.GetByLabel('UI/Corporations/CorpDetails/Description'))
     self.sr.descEdit_container = uiprimitives.Container(
         name='descEdit_container',
         parent=self.sr.inputcontrol,
         align=uiconst.TOALL,
         pos=(0, 0, 0, 0))
     uicontrols.EveLabelSmall(text=localization.GetByLabel(
         'UI/Corporations/CorpDetails/Description'),
                              parent=self.sr.descEdit_container,
                              top=-16)
     self.sr.descEdit = uicls.EditPlainText(
         setvalue=self.description,
         parent=self.sr.descEdit_container,
         maxLength=4000)
     self.logopicker = uicls.CorpLogoPickerContainer(
         parent=self.sr.logocontrol,
         pos=(100, 0, 57, 90),
         align=uiconst.TOPLEFT)
 def SetupStuff(self):
     options = [
         (localization.GetByLabel(
             'UI/Fleet/FleetRegistry/MyAvailableFleets'), INVITE_ALL),
         (localization.GetByLabel('UI/Fleet/FleetRegistry/MyCorpFleets'),
          INVITE_CORP)
     ]
     selected = settings.user.ui.Get('fleetfinder_scopeFilter', None)
     if session.allianceid is not None:
         options.append((localization.GetByLabel(
             'UI/Fleet/FleetRegistry/MyAllianceFleets'), INVITE_ALLIANCE))
     elif selected == INVITE_ALLIANCE:
         selected = None
     if session.warfactionid is not None:
         options.append((localization.GetByLabel(
             'UI/Fleet/FleetRegistry/MyMilitiaFleets'), INVITE_MILITIA))
     elif selected == INVITE_MILITIA:
         selected = None
     options.append((
         localization.GetByLabel('UI/Fleet/FleetRegistry/BasedOnStandings'),
         INVITE_PUBLIC))
     l = 1
     combo = self.sr.scopeCombo = uicontrols.Combo(
         label=localization.GetByLabel('UI/Fleet/FleetRegistry/Scope'),
         parent=self.sr.filterCont,
         options=options,
         name='fleetfinder_scopeFilter',
         select=selected,
         pos=(l, 14, 0, 0),
         width=COMBO_SIZES[0])
     self.sr.scopeCombo.OnChange = self.OnComboChange
     l += combo.width + 3
     selected = settings.user.ui.Get('fleetfinder_rangeFilter', None)
     options = [
         (localization.GetByLabel('UI/Common/Any'), None),
         (localization.GetByLabel('UI/Fleet/FleetRegistry/NumberOfJumps',
                                  numJumps=5), 5),
         (localization.GetByLabel('UI/Fleet/FleetRegistry/NumberOfJumps',
                                  numJumps=10), 10),
         (localization.GetByLabel('UI/Common/LocationTypes/Region'), -1)
     ]
     combo = self.sr.rangeCombo = uicontrols.Combo(
         label=localization.GetByLabel('UI/Fleet/FleetRegistry/Range'),
         parent=self.sr.filterCont,
         options=options,
         name='fleetfinder_rangeFilter',
         select=selected,
         pos=(l, 14, 0, 0),
         width=COMBO_SIZES[1])
     self.sr.rangeCombo.OnChange = self.OnComboChange
     l += combo.width + 3
     selected = settings.user.ui.Get('fleetfinder_standingFilter', None)
     options = [(localization.GetByLabel('UI/Common/Any'), None),
                (localization.GetByLabel('UI/Standings/Good'),
                 const.contactGoodStanding),
                (localization.GetByLabel('UI/Standings/Excellent'),
                 const.contactHighStanding)]
     combo = self.sr.standingCombo = uicontrols.Combo(
         label=localization.GetByLabel(
             'UI/Fleet/FleetRegistry/RequireStanding'),
         parent=self.sr.filterCont,
         options=options,
         name='fleetfinder_standingFilter',
         select=selected,
         pos=(l, 14, 0, 0),
         width=COMBO_SIZES[2])
     self.sr.standingCombo.OnChange = self.OnComboChange
     l += combo.width + 3
     self.sr.getFleetsBtn = btn = uicontrols.Button(
         parent=self.sr.filterCont,
         label=localization.GetByLabel('UI/Fleet/FleetRegistry/FindFleets'),
         pos=(0, 14, 0, 0),
         func=self.GetFleetsClick,
         align=uiconst.TOPRIGHT)
     self.sr.scroll = uicontrols.Scroll(parent=self.sr.scrollCont)
     self.sr.scroll.sr.id = 'fleetfinderScroll'
     self.sr.scroll.multiSelect = 0
     self.sr.scroll.Load(contentList=[],
                         headers=[],
                         scrolltotop=0,
                         noContentHint=localization.GetByLabel(
                             'UI/Fleet/FleetRegistry/SearchHint'))
     self.sr.caption = uicontrols.EveLabelMediumBold(
         text='',
         parent=self.sr.topInfoCont,
         align=uiconst.RELATIVE,
         left=4,
         top=2,
         state=uiconst.UI_NORMAL)
     self.sr.detailsText = uicls.EditPlainText(name='detailsText',
                                               parent=self.sr.descrCont,
                                               padTop=2,
                                               padBottom=4,
                                               state=uiconst.UI_NORMAL,
                                               readonly=1)
     self.sr.detailsText.HideBackground()
     self.sr.detailsText.RemoveActiveFrame()
     FrameUnderlay(parent=self.sr.detailsText,
                   colorType=uiconst.COLORTYPE_UIHILIGHT)
     tabs = [110, 540]
     self.sr.infoText = uicontrols.EveLabelMedium(name='infoText',
                                                  text='',
                                                  parent=self.sr.descrCont,
                                                  top=const.defaultPadding,
                                                  idx=0,
                                                  tabs=tabs,
                                                  state=uiconst.UI_NORMAL)
     self.sr.joinBtn = btn = uicontrols.Button(
         parent=self.sr.topInfoCont,
         label=localization.GetByLabel('UI/Fleet/FleetRegistry/JoinFleet'),
         pos=(0, 1, 0, 0),
         func=self.JoinFleet,
         align=uiconst.CENTERRIGHT)
     self.sr.joinRequestBtn = btn = uicontrols.Button(
         parent=self.sr.topInfoCont,
         label=localization.GetByLabel(
             'UI/Fleet/FleetRegistry/RequestJoinFleet'),
         pos=(0, 1, 0, 0),
         func=self.JoinFleet,
         align=uiconst.CENTERRIGHT)
     self.sr.myAdvertMainCont = uiprimitives.Container(
         name='myAdvertMainCont',
         parent=self.sr.myAdvertCont,
         align=uiconst.TOALL,
         pos=(0, 0, 0, 0))
     self.myAdvertButtons = [
         (localization.GetByLabel('UI/Fleet/FleetWindow/EditAdvert'),
          sm.GetService('fleet').OpenRegisterFleetWindow, (), 84),
         (localization.GetByLabel('UI/Fleet/FleetWindow/RemoveAdvert'),
          sm.GetService('fleet').UnregisterFleet, (), 84)
     ]
     self.sr.myAdvertButtonWnd = uicontrols.ButtonGroup(
         btns=self.myAdvertButtons,
         parent=self.sr.myAdvertButtons,
         unisize=1)
     self.sr.myAdvertCaption = uicontrols.EveCaptionMedium(
         text='',
         parent=self.sr.myAdvertCont,
         align=uiconst.TOTOP,
         left=0,
         top=7,
         state=uiconst.UI_DISABLED)
     self.sr.myAdvertDescCont = uiprimitives.Container(
         name='myAdvertDescCont',
         parent=self.sr.myAdvertCont,
         align=uiconst.TOALL,
         pos=(0, 0, 0, 0))
     self.sr.myAdvertText = uicontrols.EveLabelMedium(
         text='',
         parent=self.sr.myAdvertCont,
         top=const.defaultPadding,
         tabs=tabs,
         align=uiconst.TOTOP,
         state=uiconst.UI_NORMAL)
     self.sr.myAdvertDesc = uicls.EditPlainText(
         parent=self.sr.myAdvertDescCont,
         padTop=2,
         state=uiconst.UI_NORMAL,
         readonly=1)
     self.myAdvertButtons_Register = [
         (localization.GetByLabel('UI/Fleet/FleetWindow/CreateAdvert'),
          sm.GetService('fleet').OpenRegisterFleetWindow, (), 84)
     ]
     self.sr.myAdvertButtonWnd_Register = uicontrols.ButtonGroup(
         btns=self.myAdvertButtons_Register,
         parent=self.sr.myAdvertButtons,
         unisize=1)
     self.sr.myAdvertButtonWnd_Register.state = uiconst.UI_HIDDEN
    def ConstructLayout(self):
        topCont = uiprimitives.Container(
            name='topCont',
            parent=self.sr.main,
            align=uiconst.TOTOP,
            pos=(0, 0, 0, 70),
            padding=(const.defaultPadding, const.defaultPadding,
                     const.defaultPadding, const.defaultPadding))
        imgCont = uiprimitives.Container(name='imgCont',
                                         parent=topCont,
                                         align=uiconst.TOLEFT,
                                         pos=(0, 0, 64, 0),
                                         padding=(0, 0, const.defaultPadding,
                                                  0))
        topRightCont = uiprimitives.Container(name='topRightCont',
                                              parent=topCont,
                                              align=uiconst.TOALL,
                                              pos=(0, 0, 0, 0),
                                              padding=(const.defaultPadding, 0,
                                                       0, 0))
        nameCont = uiprimitives.Container(name='nameCont',
                                          parent=topRightCont,
                                          align=uiconst.TOTOP,
                                          pos=(0, 0, 0, 20))
        uiprimitives.Line(parent=nameCont, align=uiconst.TOBOTTOM)
        levelCont = uiprimitives.Container(name='levelCont',
                                           parent=topRightCont,
                                           align=uiconst.TOTOP,
                                           height=42,
                                           padding=(0, const.defaultPadding, 0,
                                                    0))
        self.standingList = {
            const.contactHighStanding:
            localization.GetByLabel('UI/PeopleAndPlaces/ExcellentStanding'),
            const.contactGoodStanding:
            localization.GetByLabel('UI/PeopleAndPlaces/GoodStanding'),
            const.contactNeutralStanding:
            localization.GetByLabel('UI/PeopleAndPlaces/NeutralStanding'),
            const.contactBadStanding:
            localization.GetByLabel('UI/PeopleAndPlaces/BadStanding'),
            const.contactHorribleStanding:
            localization.GetByLabel('UI/PeopleAndPlaces/TerribleStanding')
        }
        levelList = self.standingList.keys()
        levelList.sort()
        levelText = self.standingList.get(self.level)
        self.levelText = uicontrols.EveLabelMedium(text=levelText,
                                                   parent=levelCont,
                                                   height=14,
                                                   align=uiconst.TOTOP,
                                                   state=uiconst.UI_DISABLED,
                                                   idx=0)
        self.levelSelector = uicls.StandingLevelSelector(name='levelCont',
                                                         parent=levelCont,
                                                         align=uiconst.TOTOP,
                                                         height=55,
                                                         padTop=4,
                                                         level=self.level)
        self.levelSelector.OnStandingLevelSelected = self.OnStandingLevelSelected
        charName = cfg.eveowners.Get(self.entityID).name
        uiutil.GetOwnerLogo(imgCont, self.entityID, size=64, noServerCall=True)
        label = uicontrols.EveLabelLargeBold(text=charName,
                                             parent=nameCont,
                                             left=0,
                                             align=uiconst.TOPLEFT,
                                             width=170,
                                             state=uiconst.UI_DISABLED,
                                             idx=0)
        nameCont.state = uiconst.UI_DISABLED
        nameCont.height = label.height + 2
        self.minHeight += nameCont.height
        topCont.height = max(topCont.height,
                             nameCont.height + levelCont.height)
        labels = sm.GetService('addressbook').GetContactLabels(
            'contact').values()
        if not self.isContact and len(labels):
            labelList = []
            labelCont = uiprimitives.Container(name='topCont',
                                               parent=self.sr.main,
                                               align=uiconst.TOTOP,
                                               pos=(0, 0, 0, 18),
                                               padding=(const.defaultPadding,
                                                        0, 0,
                                                        const.defaultPadding))
            for label in labels:
                labelList.append(
                    (label.name.lower(), (label.name, label.labelID)))

            labelList = uiutil.SortListOfTuples(labelList)
            assignLabelText = '-- %s --' % localization.GetByLabel(
                'UI/Mail/AssignLabel')
            labelList.insert(0, (assignLabelText, None))
            self.labelsCombo = uicontrols.Combo(label='',
                                                parent=labelCont,
                                                options=labelList,
                                                name='labelscombo',
                                                adjustWidth=True)
            self.minHeight += labelCont.height
            if self.labelID:
                self.labelsCombo.SetValue(self.labelID)
        if util.IsCharacter(self.entityID):
            splitter = uiprimitives.Container(name='splitter',
                                              parent=self.sr.main,
                                              align=uiconst.TOTOP,
                                              pos=(0, 0, 0, 1),
                                              padding=(0, 0, 0, 0))
            uiprimitives.Line(parent=splitter, align=uiconst.TOBOTTOM)
            bottomCont = uiprimitives.Container(name='bottomCont',
                                                parent=self.sr.main,
                                                align=uiconst.TOALL,
                                                pos=(0, 0, 0, 0),
                                                padding=const.defaultPadding)
            cbCont = uiprimitives.Container(name='cbCont',
                                            parent=bottomCont,
                                            align=uiconst.TOTOP,
                                            pos=(0, 0, 0, 16),
                                            state=uiconst.UI_HIDDEN)
            notifyCont = uiprimitives.Container(name='notifyCont',
                                                parent=bottomCont,
                                                align=uiconst.TOTOP,
                                                pos=(0, 0, 0, 95))
            cbCont.state = uiconst.UI_NORMAL
            self.inWatchlistCb = uicontrols.Checkbox(
                text=localization.GetByLabel(
                    'UI/PeopleAndPlaces/AddContactToWatchlist'),
                parent=cbCont,
                configName='inWatchlistCb',
                retval=0,
                checked=self.watchlist,
                align=uiconst.TOTOP)
            self.inWatchlistCb.hint = localization.GetByLabel(
                'UI/PeopleAndPlaces/BuddyListHint')
            self.sendNotificationCb = uicontrols.Checkbox(
                text=localization.GetByLabel(
                    'UI/PeopleAndPlaces/SendNotificationTo',
                    contactName=charName),
                parent=notifyCont,
                configName='sendNotificationCb',
                retval=0,
                checked=0,
                align=uiconst.TOTOP)
            self.message = uicls.EditPlainText(setvalue='',
                                               parent=notifyCont,
                                               align=uiconst.TOALL,
                                               maxLength=120,
                                               padBottom=const.defaultPadding)
            self.minHeight += 120
        btnText = localization.GetByLabel('UI/PeopleAndPlaces/AddContact')
        if self.isContact:
            btnText = localization.GetByLabel('UI/PeopleAndPlaces/EditContact')
        self.btnGroup = uicontrols.ButtonGroup(
            btns=[[btnText, self.Confirm, (), 81, 1, 1, 0],
                  [
                      localization.GetByLabel('UI/Common/Buttons/Cancel'),
                      self.Cancel, (), 81, 0, 0, 0
                  ]],
            parent=self.sr.main,
            idx=0)
        if self.level is None:
            self.levelText.text = localization.GetByLabel(
                'UI/PeopleAndPlaces/SelectStanding')
            btn = self.btnGroup.GetBtnByLabel(btnText)
            uicore.registry.SetFocus(btn)
        uthread.new(self.SetWindowSize)