def ApplyAttributes(self, attributes): uicls.Window.ApplyAttributes(self, attributes) self.SetWndIcon('ui_61_128_3', hidden=True) self.factionalWarStatus = None self.topCont = uicls.Container(name='topCont', parent=self.sr.main, align=uiconst.TOTOP, height=140, clipChildren=True, padRight=4) self.tabgroup = uicls.TabGroup(parent=self.sr.main, align=uiconst.TOTOP) self.bottomCont = uicls.Container(name='buttonParent', align=uiconst.TOBOTTOM, height=28, parent=self.sr.main) uicls.GradientSprite(bgParent=self.bottomCont, rotation=-pi / 2, rgbData=[(0, (0.3, 0.3, 0.3))], alphaData=[(0, 0.3), (0.9, 0.0)]) self.warzonePanel = uicls.Container(name='warzonePanel', parent=self.sr.main, padding=const.defaultPadding, state=uiconst.UI_HIDDEN) self.statisticsPanel = uicls.Container(name='statisticsPanel', parent=self.sr.main, padding=const.defaultPadding, state=uiconst.UI_HIDDEN) self.rulesPanel = uicls.Container(name='rulesPanel', parent=self.sr.main, padding=const.defaultPadding, state=uiconst.UI_HIDDEN) uthread.new(self.LoadTabPanels)
def ApplyAttributes(self, attributes): uicls.Window.ApplyAttributes(self, attributes) self.tabs = uicls.TabGroup(parent=self.sr.maincontainer) import uiEventListener self.windowsEventPanel = uiEventListener.WindowsEventPanel( parent=self.sr.maincontainer) self.uiEventPanel = uiEventListener.UIEventPanel( parent=self.sr.maincontainer) self.uiGlobalEventPanel = uiEventListener.UIGlobalEventPanel( parent=self.sr.maincontainer) self.shortcutPanel = uiEventListener.UIShortcutPanel( parent=self.sr.maincontainer) self.helpPanel = uiEventListener.HelpPanel( parent=self.sr.maincontainer) tabs = (util.KeyVal(name='windowsEvents', label='Windows events', panel=self.windowsEventPanel), util.KeyVal(name='uiEvents', label='UI events', panel=self.uiEventPanel), util.KeyVal(name='uiGlobalEvents', label='UI global events', panel=self.uiGlobalEventPanel), util.KeyVal(name='shortcuts', label='Shortcuts', panel=self.shortcutPanel), util.KeyVal(name='help', label='Help', panel=self.helpPanel)) self.tabs.LoadTabs(tabs)
def ReloadTabs(self, selectTab = None): if not self.tabs or len(self.tabs) < 1: return tabs = [] for tab in self.tabs: tabData = uiutil.Bunch() tabData.label = tab.title tabData.hint = tab.title tabData.code = self tabData.args = tab tabData.panel = None tabs.append(tabData) if getattr(self, 'tabGroup', None): tabGroup = self.tabGroup else: tabGroup = uicls.TabGroup(name='tabparent', parent=self.tabBar, minTabsize=50, maxTabsize=200, leftMargin=self.delTabBtn.width + const.defaultPadding * 2, rightMargin=self.addTabBtn.width + const.defaultPadding * 2, tabMenuMargin=8, align=uiconst.TOBOTTOM) self.tabGroup = tabGroup tabGroup.LoadTabs(tabs, autoselecttab=0) if self.currentTab is None: self.currentTab = self.tabs[0] else: self.currentTab.SetBrowserSurface(None, None) if selectTab is not None: self.currentTab = self.tabs[selectTab] tabGroup.ShowPanelByName(self.currentTab.title)
def CreateWindow(self): self.sr.inited = 1 self.sr.rejectedContainer = uicls.Container(name='rejectedContainer', align=uiconst.TOTOP, parent=self, pos=(0, 0, 0, 18)) showRejectedLabel = localization.GetByLabel( 'UI/Corporations/CorporationWindow/Alliances/Applications/ShowRejected' ) self.sr.viewRejected = uicls.Checkbox(text=showRejectedLabel, parent=self.sr.rejectedContainer, configName='viewRejected', retval=1, checked=0, groupname=None, callback=self.CheckBoxChecked, align=uiconst.TOPLEFT, pos=(const.defaultPadding, const.defaultPadding, 150, 0)) self.sr.scroll = uicls.Scroll( name='applications', parent=self, padding=(const.defaultPadding, const.defaultPadding, const.defaultPadding, const.defaultPadding)) self.sr.tabs = uicls.TabGroup(name='tabparent', parent=self, idx=0) allianceLabel = localization.GetByLabel( 'UI/Corporations/CorporationWindow/Alliances/Alliance') myApplicationsLabel = localization.GetByLabel( 'UI/Corporations/CorporationWindow/Alliances/Applications/MyApplications' ) self.sr.tabs.Startup( [[allianceLabel, self, self, 'alliance'], [myApplicationsLabel, self, self, 'myApplications']], 'allianceApplications')
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)
def ApplyAttributes(self, attributes): uicls.Window.ApplyAttributes(self, attributes) self.scope = 'station_inflight' self.soldict = {} self.sr.main = uiutil.GetChild(self, 'main') self.SetWndIcon('ui_53_64_11', mainTop=-8) self.SetMinSize([350, 200]) self.SetCaption( localization.GetByLabel( 'UI/CapitalNavigation/CapitalNavigationWindow/CapitalNavigationLabel' )) uicls.WndCaptionLabel( text=localization.GetByLabel( 'UI/CapitalNavigation/CapitalNavigationWindow/CapitalNavigationLabel' ), subcaption=localization.GetByLabel( 'UI/CapitalNavigation/CapitalNavigationWindow/OnlinedStarbaseMessage' ), parent=self.sr.topParent, align=uiconst.RELATIVE) self.sr.scroll = uicls.Scroll( name='scroll', parent=self.sr.main, padding=(const.defaultPadding, const.defaultPadding, const.defaultPadding, const.defaultPadding)) self.sr.settingsParent = uicls.Container( name='settingsParent', parent=self.sr.main, align=uiconst.TOALL, state=uiconst.UI_HIDDEN, idx=1, pos=(const.defaultPadding, const.defaultPadding, const.defaultPadding, const.defaultPadding), clipChildren=1) maintabs = [ [ localization.GetByLabel( 'UI/CapitalNavigation/CapitalNavigationWindow/JumpTo'), self.sr.scroll, self, 'jumpto', self.sr.scroll ], [ localization.GetByLabel( 'UI/CapitalNavigation/CapitalNavigationWindow/WithinRange' ), self.sr.scroll, self, 'inrange', self.sr.scroll ] ] shipID = util.GetActiveShip() if shipID and sm.GetService('clientDogmaIM').GetDogmaLocation( ).GetItem(shipID).groupID == const.groupTitan: maintabs.insert(1, [ localization.GetByLabel( 'UI/CapitalNavigation/CapitalNavigationWindow/BridgeTo'), self.sr.scroll, self, 'bridgeto', self.sr.scroll ]) self.sr.maintabs = uicls.TabGroup(name='tabparent', parent=self.sr.main, idx=0, tabs=maintabs, groupID='capitaljumprangepanel')
def Check(self, updatewnd=0, autoselecttab=1, checknone=0): if self is None or self.destroyed: return myWindows = self.GetWindows() if checknone and len(myWindows) == 0: self.Close() return self.SetMinWH() tabs = [] label = '' allPinned = True allCompact = True for wnd in myWindows: if wnd is None or wnd.destroyed: continue tabs.append([wnd.GetCaption(), wnd, self, wnd]) wnd.HideHeader() wnd.HideBackground() if not wnd.IsPinned(): allPinned = False if not wnd.IsCompact(): allCompact = False wnd.state = uiconst.UI_PICKCHILDREN label = label + wnd.GetCaption() + '-' self._SetPinned(allPinned) if allCompact: self.Compact() else: self.UnCompact() if len(tabs): if len(label): label = label[:-1] self.sr.tabs.Flush() maintabs = uicls.TabGroup(parent=self.sr.tabs, name='tabparent', groupID=self.name, tabs=tabs, autoselecttab=autoselecttab) maintabs.rightMargin = 80 alltabs = maintabs.GetTabs() if alltabs: for i in xrange(len(alltabs)): tab = alltabs[i] wnd = myWindows[i] tab.GetMenu = wnd.GetMenu tab.SetIcon(wnd.headerIconNo, 14, getattr(wnd.sr.headerIcon, 'hint', ''), getattr(wnd.sr.headerIcon, 'GetMenu', None)) utilMenuFunc = wnd.GetUtilMenuFunc() if utilMenuFunc is not None: tab.SetUtilMenu(utilMenuFunc) if wnd.isBlinking: tab.Blink() self.SetCaption(label)
def Load(self, args): if not self.sr.Get('inited', False): self.sr.inited = 1 btns = None self.toolbarContainer = uicls.Container(name='toolbarContainer', align=uiconst.TOBOTTOM, parent=self) if btns is not None: self.toolbarContainer.height = btns.height else: self.toolbarContainer.state = uiconst.UI_HIDDEN self.sr.contacts = form.ContactsForm(name='corpcontactsform', parent=self, pos=(0, 0, 0, 0)) self.sr.contacts.Setup('corpcontact') self.sr.scroll = uicls.Scroll( name='standings', parent=self, padding=(const.defaultPadding, const.defaultPadding, const.defaultPadding, const.defaultPadding)) self.sr.tabs = uicls.TabGroup(name='tabparent', parent=self, idx=0) self.sr.tabs.Startup([ [ localization.GetByLabel( 'UI/Corporations/CorporationWindow/Standings/CorpContacts' ), self.sr.contacts, self, 'corpcontact' ], [ localization.GetByLabel( 'UI/Corporations/CorporationWindow/Standings/LikedBy'), self.sr.scroll, self, 'mystandings_to_positive' ], [ localization.GetByLabel( 'UI/Corporations/CorporationWindow/Standings/DislikedBy' ), self.sr.scroll, self, 'mystandings_to_negative' ] ], 'corporationstandings', autoselecttab=1) return sm.GetService('corpui').LoadTop( 'ui_7_64_6', localization.GetByLabel( 'UI/Corporations/CorporationWindow/Standings/CorpStandings')) self.SetHint() if type(args) == types.StringType and args.startswith('mystandings_'): self.sr.standingtype = args if args == 'mystandings_to_positive': positive = True else: positive = False self.ShowStandings(positive) else: self.sr.contacts.LoadContactsForm('corpcontact')
def ApplyAttributes(self, attributes): uicls.Window.ApplyAttributes(self, attributes) self.homeStation = None self.potentialHomeStations = None self.cloneTypeID = None sm.RegisterNotify(self) self.SetWndIcon('ui_18_128_3', mainTop=-8) self.SetMinSize([350, 270]) self.SetCaption(localization.GetByLabel('UI/Medical/Medical')) currentSkillPoints = sm.GetService('skills').GetSkillPoints() uicls.WndCaptionLabel( text=localization.GetByLabel('UI/Medical/Cloning'), subcaption=localization.GetByLabel( 'UI/Medical/Clone/CurrentSkillPoints', skillPoints=util.FmtAmt(currentSkillPoints)), parent=self.sr.topParent, align=uiconst.RELATIVE) self.scope = 'station' cloneButtons = [ ('medicalServicesChangeStationBtn', localization.GetByLabel('UI/Medical/Clone/ChangeStation'), self.PickNewHomeStation, None, 81), ('medicalServicesUpgradeCloneBtn', localization.GetByLabel('UI/Medical/Clone/UpgradeClone'), self.PickNewCloneType, None, 81) ] btns = uicls.ButtonGroup(btns=cloneButtons, line=1, forcedButtonNames=True) self.sr.main.children.append(btns) self.sr.cloneBtns = btns btns = uicls.ButtonGroup(btns=[ (localization.GetByLabel('UI/Medical/JumpClone/Install'), self.InstallClone, (), 84), (localization.GetByLabel('UI/Medical/JumpClone/Destroy'), self.DestroyClone, (), 84) ], line=1) self.sr.main.children.append(btns) self.sr.jumpcloneBtns = btns tabs = ([ localization.GetByLabel('UI/Medical/Clone'), self.sr.main, self, 'podclone', self.sr.cloneBtns ], [ localization.GetByLabel('UI/Medical/JumpClone'), self.sr.main, self, 'jumpclone', self.sr.jumpcloneBtns ]) self.maintabs = uicls.TabGroup(name='tabparent', parent=self.sr.main, idx=1) self.maintabs.Startup(tabs, 'clonespanel') self.sr.scroll = uicls.Scroll( parent=self.sr.main, padding=(const.defaultPadding, const.defaultPadding, const.defaultPadding, const.defaultPadding))
def ApplyAttributes(self, attributes): uicls.Window.ApplyAttributes(self, attributes) tabIdx = attributes.tabIdx self.isFlat = settings.user.ui.Get('flatFleetView', False) self.scope = 'all' self.broadcastMenuItems = [] self.SetCaption(localization.GetByLabel('UI/Fleet/Fleet')) self.SetTopparentHeight(0) self.SetWndIcon('94_9') self.SetHeaderIcon() hicon = self.sr.headerIcon hicon.GetMenu = self.GetFleetMenuTop hicon.expandOnLeft = 1 hicon.hint = localization.GetByLabel('UI/Fleet/FleetWindow/FleetMenuHint') currentryActiveColumn = settings.user.ui.Get('activeSortColumns', {}) self.sr.main = uiutil.GetChild(self, 'main') self.InitBroadcastBottom() myFleetParent = uicls.Container(name='myfleet', parent=self.sr.main, align=uiconst.TOALL, pos=(0, 0, 0, 0)) uicls.Container(name='push', parent=myFleetParent, width=const.defaultPadding, align=uiconst.TOLEFT) uicls.Container(name='push', parent=myFleetParent, width=const.defaultPadding, align=uiconst.TORIGHT) self.sr.myFleetContent = form.FleetView(parent=myFleetParent, name='fleetfinderpar', pos=(0, 0, 0, 0)) broadcastsParent = uicls.Container(name='broadcasts', parent=self.sr.main, align=uiconst.TOALL, pos=(0, 0, 0, 0)) self.broadcastsContent = form.FleetBroadcastView(parent=broadcastsParent, name='fleetfinderpar', pos=(0, 0, 0, 0)) fleetFinderParent = uicls.Container(name='fleetfinder', parent=self.sr.main, align=uiconst.TOALL, pos=(0, 0, 0, 0)) self.fleetFinderContent = form.FleetFinderWindow(parent=fleetFinderParent, name='fleetfinderpar', pos=(0, 0, 0, 0)) settingsParent = uicls.Container(name='settings', parent=self.sr.main, align=uiconst.TOALL, pos=(0, 0, 0, 0)) self.startPage = uicls.Container(name='startpage', parent=self.sr.main, align=uiconst.TOALL, state=uiconst.UI_HIDDEN) myFleetParent.children.append(self.startPage) self.sr.tabs = uicls.TabGroup(name='fleettabs', parent=self.sr.main, idx=0) tabs = [] inFleetTabs = [[localization.GetByLabel('UI/Fleet/FleetWindow/MyFleet'), myFleetParent, self, 'myfleet'], [localization.GetByLabel('UI/Fleet/FleetWindow/FleetHistory'), broadcastsParent, self, 'broadcasts']] fleetFinderTabs = [[localization.GetByLabel('UI/Fleet/FleetWindow/FleetFinder'), fleetFinderParent, self, 'fleetfinder']] if session.fleetid is not None: tabs.extend(inFleetTabs) tabs.extend(fleetFinderTabs) self.sr.tabs.Startup(tabs, 'fleettabs', autoselecttab=1) if session.fleetid is not None: myFleetTab = self.sr.tabs.GetTabs()[0] myFleetTab.OnTabDropData = self.OnDropInMyFleet if session.fleetid: tabToOpen = localization.GetByLabel('UI/Fleet/FleetWindow/MyFleet') else: tabToOpen = localization.GetByLabel('UI/Fleet/FleetWindow/FleetFinder') uthread.new(self.sr.tabs.ShowPanelByName, tabToOpen) if settings.user.ui.Get('fleetFinderBroadcastsVisible', False) and session.fleetid: self.ToggleBroadcasts()
def Load(self, key): alliancesLabel = localization.GetByLabel( 'UI/Corporations/CorporationWindow/Alliances/Alliances') sm.GetService('corpui').LoadTop('ui_7_64_6', alliancesLabel) if not self.sr.Get('inited', 0): self.sr.inited = 1 self.sr.wndViewParent = uicls.Container(name='wndViewParent', align=uiconst.TOALL, pos=(0, 0, 0, 0), parent=self) if session.allianceid: self.sr.contacts = form.ContactsForm( name='alliancecontactsform', parent=self, pos=(0, 0, 0, 0), startupParams=()) self.sr.contacts.Setup('alliancecontact') else: self.sr.contacts = uicls.Scroll( name='alliancecontactsform', parent=self, padding=(const.defaultPadding, const.defaultPadding, const.defaultPadding, const.defaultPadding)) homeLabel = localization.GetByLabel( 'UI/Corporations/CorporationWindow/Alliances/Home') rnksLabel = localization.GetByLabel( 'UI/Corporations/CorporationWindow/Alliances/Rankings') apliLabel = localization.GetByLabel( 'UI/Corporations/CorporationWindow/Alliances/Applications') mbrsLabel = localization.GetByLabel( 'UI/Corporations/CorporationWindow/Alliances/Members') cntcLabel = localization.GetByLabel( 'UI/Corporations/CorporationWindow/Alliances/AllianceContacts') tabs = [ [homeLabel, self.sr.wndViewParent, self, 'alliances_home'], [rnksLabel, self.sr.wndViewParent, self, 'alliances_rankings'], [ apliLabel, self.sr.wndViewParent, self, 'alliances_applications' ], [mbrsLabel, self.sr.wndViewParent, self, 'alliances_members'], [cntcLabel, self.sr.contacts, self, 'alliancecontact'] ] if session.allianceid is not None: bulletinsLabel = localization.GetByLabel( 'UI/Corporations/CorporationWindow/Alliances/Bulletins') tabs.insert(0, [ bulletinsLabel, self.sr.wndViewParent, self, 'alliances_bulletins' ]) self.sr.tabs = uicls.TabGroup(name='tabparent', parent=self, idx=0) self.sr.tabs.Startup(tabs, 'corpaccounts') return self.LoadViewClass(key)
def ApplyAttributes(self, attributes): uicls.Window.ApplyAttributes(self, attributes) self.isChangingOrder = False self.loadedTab = None self.waypointBtns = uicls.ButtonGroup( parent=self.sr.main, btns=[[ localization.GetByLabel('UI/Map/MapPallet/btnOptimizeRoute'), sm.GetService('autoPilot').OptimizeRoute, (), 66 ]]) self.sr.waypointopt = uicls.Container(name='waypointopt', parent=self.sr.main, align=uiconst.TOBOTTOM, clipChildren=True, padding=(const.defaultPadding, 0, const.defaultPadding, 0)) self.sr.scroll2 = uicls.Scroll(parent=self.sr.main, padding=const.defaultPadding) self.sr.scroll2.sr.id = 'autopilotSettings' self.sr.scroll2.sr.content.OnDropData = self.MoveWaypoints uicls.EveLabelMedium(text=localization.GetByLabel( 'UI/Map/MapPallet/lblChangeWaypointPriority'), parent=self.sr.waypointopt, pos=(3, 2, 0, 0)) checkbox = uicls.Checkbox( text=localization.GetByLabel('UI/Map/MapPallet/cbExpandWaypoints'), parent=self.sr.waypointopt, configName='expandwaypoints', retval=None, checked=settings.user.ui.Get('expandwaypoints', 1), callback=self.OnCheckboxWaypoints, align=uiconst.TOPLEFT, pos=(1, 18, 140, 0)) checkbox.data = {'key': 'expandwaypoints', 'retval': None} self.sr.waypointopt.height = checkbox.height + 22 autopilottabs = uicls.TabGroup(name='tabparent', parent=self.sr.main, idx=0) autopilottabs.Startup( [[ localization.GetByLabel('UI/Map/MapPallet/tabWaypoints'), self.sr.scroll2, self, 'waypointconf', self.sr.waypointopt ], [ localization.GetByLabel('UI/Map/MapPallet/tabMapAdvoidance'), self.sr.scroll2, self, 'avoidconf', None ]], 'autopilottabs', autoselecttab=1) self.sr.autopilottabs = autopilottabs
def CreateWindow(self): self.LogInfo('CreateWindow') self.wndTabs = uicls.TabGroup(name='tabparent', parent=self, idx=0) self.wndTabs.Startup([ [ localization.GetByLabel( 'UI/Corporations/CorporationWindow/Members/FindMemberInRole/Actions' ), self, self, 'actions' ], [ localization.GetByLabel( 'UI/Corporations/CorporationWindow/Members/FindMemberInRole/Targets' ), self, self, 'targets' ] ], 'taskManagement') self.Load('actions')
def Refresh(self, *args): self.station_inited = 0 self.search_inited = 0 self.filt_inited = 0 try: self.scrollPosition[self.key] = self.sr.scroll.GetScrollProportion() except: self.scrollPosition[self.key] = 0.0 uix.Flush(self.sr.main) self.sr.scroll = uicls.Scroll(parent=self.sr.main, padding=(const.defaultPadding, const.defaultPadding, const.defaultPadding, const.defaultPadding)) self.sr.scroll.sr.id = 'assets' self.sr.scroll.sr.minColumnWidth = {localization.GetByLabel('UI/Common/Name'): 44} self.sr.scroll.allowFilterColumns = 1 self.sr.scroll.OnNewHeaders = self.ReloadTabs self.sr.scroll.sortGroups = True self.sr.scroll.SetColumnsHiddenByDefault(uix.GetInvItemDefaultHiddenHeaders()) tabs = [[localization.GetByLabel('UI/Inventory/AssetsWindow/AllItems'), self.sr.scroll, self, 'allitems'], [localization.GetByLabel('UI/Common/LocationTypes/Region'), self.sr.scroll, self, 'regitems'], [localization.GetByLabel('UI/Common/LocationTypes/Constellation'), self.sr.scroll, self, 'conitems'], [localization.GetByLabel('UI/Common/LocationTypes/SolarSystem'), self.sr.scroll, self, 'sysitems'], [localization.GetByLabel('UI/Common/Buttons/Search'), self.sr.scroll, self, 'search']] if eve.session.stationid: tabs.insert(4, [localization.GetByLabel('UI/Common/LocationTypes/Station'), self.sr.scroll, self, 'station']) self.sr.maintabs = uicls.TabGroup(name='tabparent', parent=self.sr.main, idx=0, tabs=tabs, groupID='assetspanel', silently=True)
def Load(self, args): self.voteTypes = {const.voteCEO: localization.GetByLabel('UI/Corporations/CorpSanctionableActions/NewCEO'), const.voteWar: localization.GetByLabel('UI/Corporations/CorpSanctionableActions/DeclarationOfWar'), const.voteShares: localization.GetByLabel('UI/Corporations/CorpSanctionableActions/CreationOfShares'), const.voteKickMember: localization.GetByLabel('UI/Corporations/CorpSanctionableActions/Expulsion'), const.voteGeneral: localization.GetByLabel('UI/Corporations/CorpSanctionableActions/GeneralVote'), const.voteItemUnlock: localization.GetByLabel('UI/Corporations/CorpSanctionableActions/UnlockBlueprint'), const.voteItemLockdown: localization.GetByLabel('UI/Corporations/CorpSanctionableActions/LockBlueprint')} self.headers = [localization.GetByLabel('UI/Corporations/CorpSanctionableActions/Type'), localization.GetByLabel('UI/Corporations/CorpSanctionableActions/Title'), localization.GetByLabel('UI/Corporations/CorpSanctionableActions/Description'), localization.GetByLabel('UI/Corporations/CorpSanctionableActions/Expires'), localization.GetByLabel('UI/Corporations/CorpSanctionableActions/ActedUpon'), localization.GetByLabel('UI/Corporations/CorpSanctionableActions/InEffect'), localization.GetByLabel('UI/Corporations/CorpSanctionableActions/Rescinded')] if not self.sr.Get('inited', 0): self.sr.inited = 1 self.toolbarContainer = uicls.Container(name='toolbarContainer', align=uiconst.TOBOTTOM, parent=self) buttonOptions = [[localization.GetByLabel('UI/Corporations/CorpSanctionableActions/ShowAll'), self.ShowSanctionableActionsNotInEffect, True, 81]] btns = uicls.ButtonGroup(btns=buttonOptions, parent=self.toolbarContainer) self.toolbarContainer.height = btns.height self.sr.mainBtns = btns self.sr.scroll = uicls.Scroll(name='sanctionableactions', parent=self, padding=(const.defaultPadding, const.defaultPadding, const.defaultPadding, const.defaultPadding)) self.sr.tabs = uicls.TabGroup(name='tabparent', parent=self, idx=0) self.sr.tabs.Startup([[localization.GetByLabel('UI/Corporations/CorpSanctionableActions/InEffect'), self, self, 'ineffect'], [localization.GetByLabel('UI/Corporations/CorpSanctionableActions/NotInEffect'), self, self, 'notineffect']], 'corpsanctionableact') sm.GetService('corpui').LoadTop('ui_7_64_5', localization.GetByLabel('UI/Corporations/CorpSanctionableActions/SanctionableActions')) if args == 'ineffect': self.ShowSanctionableActionsInEffect() elif args == 'notineffect': self.ShowSanctionableActionsNotInEffect()
def ApplyAttributes(self, attributes): uicls.Window.ApplyAttributes(self, attributes) self.SetScope('station_inflight') self.SetCaption(localization.GetByLabel('UI/Help/EveHelp')) self.SetWndIcon('74_14') self.SetMinSize([300, 458], 1) self.LockWidth(300) self.SetTopparentHeight(64) self.MakeUnpinable() self.MouseDown = self.OnWndMouseDown self.supportLoaded = False self.tutorialsLoaded = False supportPar = uicls.Container(name='supportPar', parent=self.sr.main, left=const.defaultPadding, top=const.defaultPadding, width=const.defaultPadding, height=const.defaultPadding) tutorialsPar = uicls.Container(name='tutorialPar', parent=self.sr.main, pos=(0, 0, 0, 0)) t = [[ localization.GetByLabel('UI/Help/Support'), supportPar, self, ('support', ) ], [ localization.GetByLabel('UI/Help/Tutorials'), tutorialsPar, self, ('tutorials', ) ]] tabs = uicls.TabGroup(name='tabparent', parent=self.sr.main, idx=0, tabs=t, autoselecttab=0) tabs.ShowPanelByName(attributes.showPanel or localization.GetByLabel('UI/Help/Support')) self.sr.mainTabs = tabs uicls.CaptionLabel(text=localization.GetByLabel('UI/Help/EveHelp'), parent=self.sr.topParent, align=uiconst.CENTERLEFT, left=70)
def Load(self, key): sm.GetService('corpui').LoadTop('ui_7_64_13', localization.GetByLabel('UI/Corporations/Assets/CorpAssets'), localization.GetByLabel('UI/Corporations/Common/UpdateDelay')) if not self.sr.Get('inited', 0): self.sr.inited = 1 self.sr.scroll = uicls.Scroll(parent=self, padding=(const.defaultPadding, const.defaultPadding, const.defaultPadding, const.defaultPadding)) self.sr.scroll.adjustableColumns = 1 self.sr.scroll.sr.id = 'CorporationAssets' self.sr.scroll.sr.minColumnWidth = {localization.GetByLabel('UI/Common/Name'): 44} self.sr.scroll.SetColumnsHiddenByDefault(uix.GetInvItemDefaultHiddenHeaders()) self.sr.tabs = uicls.TabGroup(name='tabparent', parent=self, idx=0) self.sr.tabs.Startup([[localization.GetByLabel('UI/Corporations/Common/Offices'), self.sr.scroll, self, 'offices'], [localization.GetByLabel('UI/Corporations/Assets/Impounded'), self.sr.scroll, self, 'impounded'], [localization.GetByLabel('UI/Corporations/Assets/InSpace'), self.sr.scroll, self, 'property'], [localization.GetByLabel('UI/Corporations/Assets/Deliveries'), self.sr.scroll, self, 'deliveries'], [localization.GetByLabel('UI/Corporations/Assets/Lockdown'), self.sr.scroll, self, 'lockdown'], [localization.GetByLabel('UI/Common/Search'), self.sr.scroll, self, 'search']], 'corpassetstab', autoselecttab=0) self.sr.scroll.Load(contentList=[], headers=uix.GetInvItemDefaultHeaders()) self.sr.scroll.OnNewHeaders = self.OnNewHeadersSet self.sr.scroll.allowFilterColumns = 0 if self.sr.Get('search_cont', None): self.sr.search_cont.state = uiconst.UI_HIDDEN if key == 'accounts': key = 'offices' self.sr.tabs.AutoSelect() return if key != 'search': if not getattr(self, 'filt_inited', False): sortKey = settings.char.ui.Get('corpAssetsSortKey', None) self.sr.filt_cont = uicls.Container(align=uiconst.TOTOP, height=37, parent=self, top=2, idx=1) sortoptions = [(localization.GetByLabel('UI/Common/Name'), 0), (localization.GetByLabel('UI/Common/NumberOfJumps'), 1)] self.sr.sortcombo = uicls.Combo(label=localization.GetByLabel('UI/Common/SortBy'), parent=self.sr.filt_cont, options=sortoptions, name='sortcombo', select=sortKey, callback=self.Filter, width=100, pos=(5, 16, 0, 0)) l = self.sr.sortcombo.width + self.sr.sortcombo.left + const.defaultPadding self.sr.filtcombo = uicls.Combo(label=localization.GetByLabel('UI/Common/View'), parent=self.sr.filt_cont, options=[], name='filtcombo', select=None, callback=self.Filter, width=100, pos=(l, 16, 0, 0)) self.sr.filt_cont.height = self.sr.filtcombo.top + self.sr.filtcombo.height self.filt_inited = 1 self.sr.filt_cont.state = uiconst.UI_PICKCHILDREN elif self.sr.Get('filt_cont', None): self.sr.filt_cont.state = uiconst.UI_HIDDEN if key in 'lockdown': uthread.new(self.ShowLockdown, None, None) elif key == 'search': self.sr.scroll.OnNewHeaders = self.Search uthread.new(self.ShowSearch) else: uthread.new(self.ShowAssets, key, None, None)
def ApplyAttributes(self, attributes): uicls.Window.ApplyAttributes(self, attributes) self._cfgTopHeaderTmpl = None self._cfgTopDivTmpl = None self._cfgTopPushTmpl = None self._cfgCheckBoxTmpl = None self._cfgBottomHeaderTmpl = None self._cfgButtonTmpl = None self.starColorGroups = [] self.starColorByID = None self.scope = 'station_inflight' self.SetWndIcon('ui_7_64_4', mainTop=-14) self.SetMinSize([400, 200]) self.SetTopparentHeight(36) self.SetCaption(localization.GetByLabel('UI/Map/MapPallet/CaptionMapPallet')) self.MakeUnKillable() self.loadedTab = None if self.destroyed: return self.sr.scroll = uicls.Scroll(parent=self.sr.main, padding=(const.defaultPadding, const.defaultPadding, const.defaultPadding, const.defaultPadding)) self.sr.scroll.sr.id = 'mapspalletescroll_withsort' self.sr.scroll2 = uicls.Scroll(parent=self.sr.main, padding=(const.defaultPadding, const.defaultPadding, const.defaultPadding, const.defaultPadding)) self.sr.scroll2.sr.id = 'mapspalletescroll_withhoutsort' self.sr.scroll2.OnSelectionChange = self.OnSelectionChange flattened = settings.user.ui.Get('mapFlattened', 1) toggleFlatLabel = localization.GetByLabel('UI/Map/MapPallet/btnFlattenMap') if flattened: toggleFlatLabel = localization.GetByLabel('UI/Map/MapPallet/btnUnflattenMap') if sm.GetService('viewState').IsViewActive('starmap'): toggleMapLabel = localization.GetByLabel('UI/Map/MapPallet/btnSolarsystemMap') else: toggleMapLabel = localization.GetByLabel('UI/Map/MapPallet/btnStarMap') btns = uicls.ButtonGroup(btns=[['mapCloseBtn', localization.GetByLabel('UI/Map/MapPallet/btnCloseMap'), sm.GetService('viewState').CloseSecondaryView, (), 80], ['mapToggleMapBtn', toggleMapLabel, self.ToggleMapMode, (), 130], ['mapUnflattenFlattenBtn', toggleFlatLabel, self.ClickToggleFlatten, 'self', 80]], parent=self.sr.topParent, align=uiconst.CENTER, left=15, line=0, idx=0, forcedButtonNames=True, fixedWidth=True, unisize=False) self.sr.flattenBtns = btns searchpar = uicls.Container(name='searchpar', parent=self.sr.main, align=uiconst.TOTOP, pos=(0, 0, 0, 40), idx=0) searchpar.OnTabSelect = self.GiveInputFocus inpt = uicls.SinglelineEdit(name='', parent=searchpar, pos=(5, 22, 98, 0), maxLength=64) inpt.OnReturn = self.OnReturnSearch self.sr.searchinput = inpt uicls.EveLabelSmall(text=localization.GetByLabel('UI/Map/MapPallet/lblSearchForLocation'), parent=inpt, left=0, top=-14, state=uiconst.UI_DISABLED) uicls.Button(parent=inpt.parent, label=localization.GetByLabel('UI/Map/MapPallet/btnSearchForLocation'), func=self.Search, args=1, pos=(inpt.left + inpt.width + 4, inpt.top, 0, 0), btn_default=1) starviewstabs = uicls.TabGroup(name='tabparent', parent=self.sr.main, idx=0) starviewstabs.Startup([[localization.GetByLabel('UI/Map/MapPallet/tabStars'), self.sr.scroll2, self, 'starview_color'], [localization.GetByLabel('UI/Map/MapPallet/tabLabels'), self.sr.scroll2, self, 'mapsettings_labels'], [localization.GetByLabel('UI/Map/MapPallet/tabMapLines'), self.sr.scroll2, self, 'mapsettings_lines'], [localization.GetByLabel('UI/Map/MapPallet/tabTiles'), self.sr.scroll2, self, 'mapsettings_tiles'], [localization.GetByLabel('UI/Map/MapPallet/tabLegend'), self.sr.scroll2, self, 'mapsettings_legend'], [localization.GetByLabel('UI/Map/MapPallet/tabMapAnimation'), self.sr.scroll2, self, 'mapsettings_other']], 'starviewssub', autoselecttab=0) self.sr.starviewstabs = starviewstabs self.sr.maintabs = uicls.TabGroup(name='tabparent', parent=self.sr.main, idx=0) self.sr.maintabs.Startup([[localization.GetByLabel('UI/Map/MapPallet/tabSearch'), self.sr.scroll, self, 'mapsearchpanel', searchpar], [localization.GetByLabel('UI/Map/MapPallet/tabStarMap'), self.sr.scroll2, self, 'mapsettings', starviewstabs], [localization.GetByLabel('UI/Map/MapPallet/tabSolarSystemMap'), self.sr.scroll2, self, 'mapsettings_solarsystem', None]], 'mapspalette', autoselecttab=1)
def _GetForm(self, format, parent, retfields=[], reqresult=[], errorcheck=None, tabpanels=[], tabgroup=[], refresh=[], wipe=1): if not uiutil.IsUnder(parent, uicore.desktop): log.LogTraceback( 'Form parent MUST be hooked on the desktop; it is impossible to know the real dimensions of stuff within otherwise.' ) self.retfields = retfields self.reqresult = reqresult self.errorcheck = errorcheck self.tabpanels = tabpanels self.tabgroup = tabgroup self.refresh = refresh if not isinstance(parent, xtriui.FormWnd): log.LogTraceback( 'Incompatible formparent, please change it to xtriui.FormWnd') self.parent = parent self.parent.sr.panels = {} self.parent.sr.focus = None if wipe: self.retfields = [] self.reqresult = [] self.tabpanels = [] self.tabgroup = [] self.refresh = [] for each in format: self.type = each typeName = self.type['type'] self.leftPush = self.type.get('labelwidth', 0) or 80 self.code = None if typeName == 'errorcheck': self.AddErrorcheck() continue elif typeName == 'data': self.AddData() continue elif typeName == 'tab': self.AddTab() continue elif typeName in ('btline', 'bbline'): self.AddLine() continue elif typeName == 'push': self.AddPush() elif typeName == 'header': self.AddHeader() elif typeName == 'labeltext': self.AddLabeltext() elif typeName == 'text': self.AddText() elif typeName == 'edit': self.AddEdit() elif typeName == 'textedit': self.AddTextedit() elif typeName == 'checkbox': self.AddCheckbox() elif typeName == 'combo': self.AddCombo() elif typeName == 'btnonly': self.AddBtnonly() else: log.LogWarn('Unknown fieldtype in form generator') continue if self.type.has_key('key'): if self.code: self.retfields.append([self.code, self.type]) self.parent.sr.Set(self.type['key'], self.code) else: self.parent.sr.Set(self.type['key'], self.new) if self.type.get('required', 0) == 1: self.reqresult.append([self.code, self.type]) if self.type.get('selectall', 0) == 1 and getattr( self.code, 'SelectAll', None): self.code.SelectAll() if self.type.get('setfocus', 0) == 1: self.parent.sr.focus = self.code if self.type.has_key('stopconfirm') and hasattr( self.code, 'stopconfirm'): self.code.stopconfirm = self.type['stopconfirm'] if self.type.get('frame', 0) == 1: idx = 0 for child in self.new.children: if child.name.startswith('Line'): idx += 1 uicls.Container(name='leftpush', parent=self.new, align=uiconst.TOLEFT, width=6, idx=idx) uicls.Container(name='rightpush', parent=self.new, align=uiconst.TORIGHT, width=6, idx=idx) uicls.Line(parent=self.new, align=uiconst.TOLEFT, idx=idx) uicls.Line(parent=self.new, align=uiconst.TORIGHT, idx=idx) if wipe and len(self.tabgroup): tabs = uicls.TabGroup(name='tabparent', parent=self.parent, idx=0) tabs.Startup(self.tabgroup, 'hybrid') maxheight = 0 for panel in self.tabpanels: maxheight = max(maxheight, panel.height) self.parent.height = maxheight + tabs.height else: if len(self.tabpanels): for each in self.tabpanels: each.state = uiconst.UI_HIDDEN self.tabpanels[0].state = uiconst.UI_PICKCHILDREN uix.RefreshHeight(self.parent) uicore.registry.SetFocus(self) return (self.parent, self.retfields, self.reqresult, self.tabpanels, self.errorcheck, self.refresh)
def Layout(self, reloading = 0, pushBtnArgs = None, setUsername = None, setPassword = None): if not reloading: self.sceneLoadedEvent = locks.Event('loginScene') uthread.new(self.LoadScene) self.eulaInited = 0 self.Flush() borderHeight = uicore.desktop.height / 6 par = uicls.Container(name='underlayContainer', parent=self, align=uiconst.TOTOP, height=borderHeight) self.sr.underlay2 = uicls.WindowUnderlay(parent=par) self.sr.underlay2.padding = (-16, -16, -16, 0) bottomPar = uicls.Container(name='underlayContainer_Bottom', parent=self, align=uiconst.TOBOTTOM, height=borderHeight + 6) bottomUnderlay = uicls.WindowUnderlay(parent=bottomPar) bottomUnderlay.padding = (-16, 6, -16, -16) self.fadeCont = uicls.Container(name='fadeCont', parent=self, align=uiconst.TOPLEFT, state=uiconst.UI_DISABLED, width=uicore.desktop.width, height=uicore.desktop.height, idx=-1) if trinity.app.fullscreen: closex = uicls.Icon(icon='ui_73_16_49', parent=self, pos=(0, 1, 0, 0), align=uiconst.TOPRIGHT, idx=0, state=uiconst.UI_NORMAL, hint=localization.GetByLabel('UI/Login/QuitGame')) closex.OnClick = self.ClickExit closex.sr.hintAbRight = uicore.desktop.width - 16 closex.sr.hintAbTop = 16 self.mainBrowserParent = uicls.Container(name='mainBrowserParent', parent=self, align=uiconst.CENTER, state=uiconst.UI_HIDDEN, width=800, height=440, idx=0) self.mainBrowser = uicls.Edit(parent=self.mainBrowserParent, padding=(8, 18, 8, 8), readonly=1) mainclosex = uicls.Icon(icon='ui_38_16_220', parent=self.mainBrowserParent, pos=(2, 1, 0, 0), align=uiconst.TOPRIGHT, idx=0, state=uiconst.UI_NORMAL) mainclosex.OnClick = self.CloseMenu wndUnderlay = uicls.WindowUnderlay(parent=self.mainBrowserParent) self.eulaParent = uicls.Container(name='eulaParent', parent=self, align=uiconst.CENTER, state=uiconst.UI_HIDDEN, width=800, height=440, idx=0) eulaCont = uicls.Container(name='eulaCont', parent=self.eulaParent, align=uiconst.TOALL, padding=(0, 18, 0, 0)) browser = uicls.Edit(parent=eulaCont, padding=(6, 6, 6, 6), readonly=1) browser.sr.scrollcontrols.state = uiconst.UI_NORMAL browser.viewing = 'eula_ccp' self.eulaBrowser = browser self.sr.eulaUnderlay = uicls.WindowUnderlay(parent=self.eulaParent) self.maintabs = uicls.TabGroup(name='maintabs', parent=eulaCont, idx=0, tabs=[[localization.GetByLabel('UI/Login/EULA/EveEULAHeader'), browser, self, 'eula_ccp'], [localization.GetByLabel('UI/Login/EULA/ThirdPartyEULAHeader'), browser, self, 'eula_others']], groupID='eula', autoselecttab=0) self.eulaclosex = uicls.Icon(icon='ui_38_16_220', parent=self.eulaParent, pos=(2, 1, 0, 0), align=uiconst.TOPRIGHT, idx=0, state=uiconst.UI_NORMAL) self.eulaclosex.OnClick = self.CloseMenu bottomArea = uicls.Container(name='bottomArea', parent=bottomPar, idx=0, pos=(0, 0, 0, 0)) bottomSub = uicls.Container(name='bottomSub', parent=bottomArea, align=uiconst.CENTER, idx=0, height=bottomPar.height, width=800) knownUserNames = settings.public.ui.Get('usernames', []) editswidth = 120 if borderHeight <= 100: editstop = 30 else: editstop = 40 editsleft = (bottomSub.width - editswidth) / 2 edit = uicls.SinglelineEdit(name='username', parent=bottomSub, pos=(editsleft, editstop, editswidth, 0), maxLength=64) edit.SetHistoryVisibility(0) t1 = uicls.EveLabelSmall(text=localization.GetByLabel('UI/Login/Username'), parent=edit, top=3, state=uiconst.UI_DISABLED, color=(1.0, 1.0, 1.0, 0.75)) if knownUserNames: ops = [ (name, name) for name in knownUserNames ] edit.LoadCombo('usernamecombo', ops, self.OnComboChange, comboIsTabStop=0) edit.SetValue(setUsername or settings.public.ui.Get('username', '')) edit.OnReturn = self.Confirm self.usernameEditCtrl = edit edit = uicls.SinglelineEdit(name='password', parent=bottomSub, pos=(editsleft, edit.top + edit.height + 6, editswidth, 0), maxLength=64) t2 = uicls.EveLabelSmall(text=localization.GetByLabel('UI/Login/Password'), parent=edit, top=3, state=uiconst.UI_DISABLED, color=(1.0, 1.0, 1.0, 0.75)) edit.SetPasswordChar(u'\u2022') edit.SetValue(setPassword or '') edit.OnReturn = self.Confirm self.passwordEditCtrl = edit if sm.GetService('gameui').UsingSingleSignOn(): self.usernameEditCtrl.state = self.passwordEditCtrl.state = uiconst.UI_HIDDEN editswidth = 0 tw = max(t1.textwidth, t2.textwidth) t1.left = t2.left = -tw - 6 connectBtn = uicls.Button(parent=bottomSub, label=localization.GetByLabel('UI/Login/Connect'), func=self.Connect, pos=(editsleft, edit.top + edit.height + 4, 0, 0), fixedwidth=120, btn_default=1) statusContainer = uicls.Container(parent=bottomSub, left=editsleft + editswidth + 6, top=editstop) self.serverNameTextControl = uicls.EveLabelSmall(text=localization.GetByLabel('UI/Login/CheckingStatus'), parent=statusContainer, align=uiconst.TOTOP, state=uiconst.UI_DISABLED) self.serverStatusTextControl = uicls.EveLabelSmall(parent=statusContainer, align=uiconst.TOTOP, state=uiconst.UI_DISABLED) self.serverPlayerCountTextControl = uicls.EveLabelSmall(parent=statusContainer, align=uiconst.TOTOP, state=uiconst.UI_DISABLED) self.serverVersionTextControl = uicls.EveLabelSmall(parent=statusContainer, align=uiconst.TOTOP, state=uiconst.UI_DISABLED) self.motdParent = uicls.Container(name='motdParent', parent=self, align=uiconst.CENTERBOTTOM, top=borderHeight + 16, width=400, height=64, state=uiconst.UI_HIDDEN) motdLabel = uicls.EveLabelMedium(parent=self.motdParent, align=uiconst.CENTER, width=360, state=uiconst.UI_NORMAL) self.motdLabel = motdLabel uicls.BumpedUnderlay(parent=self.motdParent, name='background') versionstr = localization.GetByLabel('UI/Login/Version', versionNumber=GetVersion()) vers = uicls.EveLabelSmall(text=versionstr, parent=self, left=6, top=6, idx=0, state=uiconst.UI_NORMAL) tabs = [[localization.GetByLabel('UI/Login/Settings'), None, self, None, ('settings',)], [localization.GetByLabel('UI/Login/EULA/EULAHeader'), self.eulaParent, self, None, ('eula',)]] self.pushButtons = uicls.PushButtonGroup(parent=bottomPar, align=uiconst.CENTERTOP, idx=0, top=-4) self.pushButtons.Startup(tabs) self.pushButtons.OnNoneSelected = self.OnPushButtonNoneSelected if boot.region == 'optic': self.eulaCRC = zlib.adler32(str(boot.version)) else: self.eulaCRC = zlib.adler32(buffer(self.GetEulaCCP())) eulaAgreed = bool(settings.public.generic.Get('eulaCRC', None) == self.eulaCRC) if not eulaAgreed: self.GetEulaConfirmation() else: if pushBtnArgs: self.pushButtons.SelectPanelByArgs(pushBtnArgs) uthread.pool('Login::Fetching ads', self.CheckAds, bool(pushBtnArgs)) uthread.new(self.LoadMotd, bool(pushBtnArgs)) if trinity.app.IsActive(): if settings.public.ui.Get('username', ''): uicore.registry.SetFocus(self.passwordEditCtrl) else: uicore.registry.SetFocus(self.usernameEditCtrl) if boot.region != 'optic': esrbNoticeHeight = 70 esrbNoticeWidth = 200 allowedSizes = [1.0, 0.9, 0.8] desktopWidth = uicore.desktop.width useHeight = int(esrbNoticeHeight * 0.7) useWidth = int(esrbNoticeWidth * 0.7) for multiplier in allowedSizes: tempWidth = esrbNoticeWidth * multiplier if tempWidth <= desktopWidth * 0.11: useWidth = int(tempWidth) useHeight = int(esrbNoticeHeight * multiplier) break cont = uicls.Container(name='esrbParent', parent=bottomArea, align=uiconst.TOPLEFT, top=editstop, width=useWidth, height=useHeight, state=uiconst.UI_NORMAL, idx=0, left=20) sprite = uicls.Sprite(name='ESRB', parent=cont, align=uiconst.TOALL, state=uiconst.UI_DISABLED, color=(1.0, 1.0, 1.0, 1.0), lockAspect=1, texturePath='res:/UI/Texture/ESRBnotice.dds') sprite.rectWidth = esrbNoticeWidth sprite.rectHeight = esrbNoticeHeight uthread.new(uix.FadeCont, cont, 0, after=6000, fadeTime=500.0)
def Initialize(self, wnd, panelName=None): while eve.session.mutating: blue.pyos.BeNice() wnd.ShowLoad() uix.Flush(wnd.sr.main) self.toparea = uicls.Container(parent=wnd.sr.main, name='corptop', pos=(0, 0, 0, 54), align=uiconst.TOTOP, state=uiconst.UI_NORMAL) uicls.Icon(parent=self.toparea, name='simplepic', pos=(4, 0, 64, 64), icon='ui_7_64_5') self.panelHome = None self.members = None self.recruitment = None self.wars = None self.standings = None self.votes = None self.sanctionable = None self.accounts = None self.auditing = None self.membertracking = None self.findmember = None self.titles = None self.alliances = None tabpanels = [] homeHint = localization.GetByLabel( 'UI/Corporations/BaseCorporationUI/AboutThisCorp') warsHint = localization.GetByLabel( 'UI/Corporations/BaseCorporationUI/CorpWarsHint') standingsHint = localization.GetByLabel( 'UI/Corporations/BaseCorporationUI/CorpStandingsHint') votesHint = localization.GetByLabel( 'UI/Corporations/BaseCorporationUI/CorpVotesHint') sanctionableActionsHint = localization.GetByLabel( 'UI/Corporations/BaseCorporationUI/CorpSanctionableActionsHint') accountsHint = localization.GetByLabel( 'UI/Corporations/BaseCorporationUI/CorpAccountsHint') alliancesHint = localization.GetByLabel( 'UI/Corporations/BaseCorporationUI/AlliancesHint') self.panelHome = form.CorpUIHome(name='corp_home', parent=wnd.sr.main, state=uiconst.UI_PICKCHILDREN) tabpanels.append([ localization.GetByLabel('UI/Corporations/BaseCorporationUI/Home'), self.panelHome, self, 'home', None, homeHint ]) self.panels['home'] = [self.panelHome] self.recruitment = form.CorpRecruitment(name='recruitmentpar', pos=(0, 0, 0, 0)) wnd.sr.main.children.append(self.recruitment) tabpanels.append([ uiutil.FixedTabName( 'UI/Corporations/BaseCorporationUI/Recruitment'), self.recruitment, self, 'recruitment', None, None ]) self.panels['recruitment'] = [self.recruitment] membersTabEntries = [] self.panels['members'] = [] if not util.IsNPC(eve.session.corpid): self.membertracking = form.CorpMemberTracking( name='membertrackingpar', pos=(0, 0, 0, 0)) wnd.sr.main.children.append(self.membertracking) membersTabEntries.append([ localization.GetByLabel( 'UI/Corporations/BaseCorporationUI/MemberList'), self.membertracking, self.membertracking, 'main' ]) self.panels['members'].append(self.membertracking) grantableRoles, grantableRolesAtHQ, grantableRolesAtBase, grantableRolesAtOther = self.corp.GetMyGrantableRoles( ) if session.corprole & const.corpRolePersonnelManager | grantableRoles: self.findmember = form.CorpFindMembersInRole( name='findmember', parent=wnd.sr.main, left=const.defaultPadding, width=const.defaultPadding) membersTabEntries.append([ localization.GetByLabel( 'UI/Corporations/BaseCorporationUI/FindMemberInRole'), self.findmember, self.findmember, 'findmember' ]) self.panels['members'].append(self.findmember) self.members = form.CorpMembers(name='members', pos=(0, 0, 0, 0)) wnd.sr.main.children.append(self.members) membersTabEntries.append([ localization.GetByLabel( 'UI/Corporations/BaseCorporationUI/RoleManagement'), self.members, self.members, 'roles' ]) self.panels['members'].append(self.members) if const.corpRoleDirector & eve.session.corprole == const.corpRoleDirector: self.titles = form.CorpTitles(name='titles', pos=(0, 0, 0, 0)) wnd.sr.main.children.append(self.titles) membersTabEntries.append([ localization.GetByLabel( 'UI/Corporations/BaseCorporationUI/TitleManagement'), self.titles, self.titles, 'titles' ]) self.panels['members'].append(self.titles) if eve.session.corprole & const.corpRoleAuditor == const.corpRoleAuditor: self.auditing = form.CorpAuditing(name='auditingpar', pos=(0, 0, 0, 0)) wnd.sr.main.children.append(self.auditing) membersTabEntries.append([ localization.GetByLabel( 'UI/Corporations/BaseCorporationUI/Auditing'), self.auditing, self.auditing, 'main' ]) self.panels['members'].append(self.auditing) self.decorations = form.CorpDecorations(name='decorations', pos=(0, 0, 0, 0)) wnd.sr.main.children.append(self.decorations) membersTabEntries.append([ localization.GetByLabel( 'UI/Corporations/BaseCorporationUI/Decorations'), self.decorations, self.decorations, 'decorations' ]) self.panels['members'].append(self.decorations) wnd.sr.membersTabs = uicls.TabGroup(name='tabparent', parent=wnd.sr.main, idx=0) wnd.sr.membersTabs.Startup(membersTabEntries, 'corpmembersstab', autoselecttab=0) tabpanels.append([ localization.GetByLabel( 'UI/Corporations/BaseCorporationUI/Members'), None, self, 'members', wnd.sr.membersTabs ]) if not util.IsNPC(session.corpid): self.standings = form.CorpStandings(name='standingspar', pos=(0, 0, 0, 0)) wnd.sr.main.children.append(self.standings) tabpanels.append([ localization.GetByLabel( 'UI/Corporations/BaseCorporationUI/Standings'), self.standings, self, 'standings', None, standingsHint ]) self.panels['standings'] = [self.standings] politicsTabEntries = [] self.panels['politics'] = [] if self.corp.CanViewVotes(eve.session.corpid): self.votes = form.CorpVotes(name='votespar', pos=(0, 0, 0, 0)) wnd.sr.main.children.append(self.votes) politicsTabEntries.append([ localization.GetByLabel( 'UI/Corporations/BaseCorporationUI/Votes'), self.votes, self.votes, 'votes', None, votesHint ]) self.panels['politics'].append(self.votes) self.sanctionable = form.CorpSanctionableActions( name='sanctionablepar', pos=(0, 0, 0, 0)) wnd.sr.main.children.append(self.sanctionable) politicsTabEntries.append([ localization.GetByLabel( 'UI/Corporations/BaseCorporationUI/SanctionableActions'), self.sanctionable, self.sanctionable, 'sanctionable', None, sanctionableActionsHint ]) self.panels['politics'].append(self.sanctionable) self.wars = form.CorpWars(name='warspar', pos=(0, 0, 0, 0)) wnd.sr.main.children.append(self.wars) tabpanels.append([ localization.GetByLabel('UI/Corporations/BaseCorporationUI/Wars'), self.wars, self, 'wars', None, warsHint ]) self.panels['wars'] = [self.wars] if len(self.panels['politics']): wnd.sr.politicsTabs = uicls.TabGroup(name='tabparent', parent=wnd.sr.main, idx=0) wnd.sr.politicsTabs.Startup(politicsTabEntries, 'corppoliticsstab', autoselecttab=0) tabpanels.append([ localization.GetByLabel( 'UI/Corporations/BaseCorporationUI/Politics'), None, self, 'politics', wnd.sr.politicsTabs ]) if const.corpRoleAccountant & eve.session.corprole != 0 or self.corp.UserIsCEO( ): self.accounts = form.CorpAccounts(name='accountspar', pos=(0, 0, 0, 0)) wnd.sr.main.children.append(self.accounts) tabpanels.append([ localization.GetByLabel( 'UI/Corporations/BaseCorporationUI/Assets'), self.accounts, self, 'accounts', None, accountsHint ]) self.panels['accounts'] = [self.accounts] self.alliances = form.Alliances(name='alliances', pos=(0, 0, 0, 0)) wnd.sr.main.children.append(self.alliances) tabpanels.append([ localization.GetByLabel( 'UI/Corporations/BaseCorporationUI/Alliances'), self.alliances, self, 'alliances', None, alliancesHint ]) self.panels['alliances'] = [self.alliances] wnd.sr.maintabs = uicls.TabGroup(name='tabparent', parent=wnd.sr.main) wnd.sr.maintabs.Startup(tabpanels, 'corporationpanel', UIIDPrefix='corporationTab', autoselecttab=False) if panelName: wnd.sr.maintabs.ShowPanelByName(panelName) else: wnd.sr.maintabs.AutoSelect() if wnd is None or wnd.destroyed: self.Reset(1, 0, 0) return uiutil.SetOrder(wnd.sr.maintabs, 0) wnd.HideLoad() wnd.state = uiconst.UI_NORMAL uthread.new(sm.StartService('wallet').AskSetWalletDivision)
def GetWnd(self, new=0): wnd = uicls.MonitorWnd.GetIfOpen() if wnd is None and new: wnd = uicls.MonitorWnd.Open() wnd.OnClose = self.CloseWnd wnd._OnResize = self._OnResize main = wnd.sr.maincontainer topcontainer = uicls.Container(name='push', parent=main, align=uiconst.TOTOP, height=46, clipChildren=1) w = wnd.sr.telemetryButton = uicls.Button(parent=topcontainer, label='Telemetry', align=uiconst.TOPRIGHT, func=self.RunTelemetry) w = wnd.sr.fpsText = uicls.Label(text='', parent=topcontainer, align=uiconst.TOPLEFT, top=0, left=8) w = wnd.sr.vmText = uicls.Label(text='', parent=topcontainer, align=uiconst.TOPLEFT, top=14, left=8) w = wnd.sr.cacheText = uicls.Label(text='', parent=topcontainer, align=uiconst.TOPLEFT, top=28, left=8) self.tabs = maintabs = uicls.TabGroup(parent=main) wnd.sr.scroll = uicls.Scroll( parent=main, padding=(const.defaultPadding, const.defaultPadding, const.defaultPadding, const.defaultPadding)) wnd.sr.scroll.sr.id = 'monitorscroll' textonly = uicls.Container(name='textonly', parent=main, clipChildren=1, padding=8) graph = wnd.sr.graph = uicls.Container(name='graph', parent=main, clipChildren=1, padding=8) statusHeader = ' ' for tme in self.intvals: statusHeader += '<t><right>%s' % util.FmtDate( long(tme * 10000), 'ss') statusHeader += '<t><right>total' wnd.statusLabels = [] txt = uicls.Label(text=statusHeader, parent=textonly, align=uiconst.TOPLEFT, tabs=[80, 130, 180, 230, 280, 330, 380], state=uiconst.UI_DISABLED) for i in xrange(7): statusLabel = uicls.Label( text='', parent=textonly, top=(i + 1) * txt.height + 1, align=uiconst.TOPLEFT, tabs=[80, 130, 180, 230, 280, 330, 380], state=uiconst.UI_DISABLED) wnd.statusLabels.append(statusLabel) wnd.sr.settings = uicls.Container(name='settings', parent=main, clipChildren=1, padding=8) w = wnd.sr.queueText = uicls.Label(text='', parent=wnd.sr.settings, align=uiconst.TOTOP) wnd.sr.settingsInner = uicls.Container(name='settingsInner', parent=wnd.sr.settings, align=uiconst.TOALL) tabs = [('Main', wnd.sr.settings, self, 'settings'), ('Network', textonly, self, 'network'), ('Rot', wnd.sr.scroll, self, 'rot'), ('Timers', wnd.sr.scroll, self, 'timers'), ('Objects', wnd.sr.scroll, self, 'objects'), ('Memory', graph, self, 'memory'), ('Performance', graph, self, 'performance'), ('Outstanding', wnd.sr.scroll, self, 'outstanding'), ('Logs', wnd.sr.scroll, self, 'logs')] if prefs.GetValue('heapinfo', 0): tabs.append(['Heap', graph, self, 'heap']) if session.role & service.ROLE_GML: tabs.append( ['Method Calls', wnd.sr.scroll, self, 'methodcalls']) tabData = [] for label, panel, code, args in tabs: tabData.append( uiutil.Bunch(label=label, panel=panel, code=code, args=args, LoadTabCallback=self.Load)) self.tabs.LoadTabs(tabData, 1, settingsID='monitortabs') wnd.sr.bottomCont = bottomCont = uicls.Container( parent=main, align=uiconst.TOBOTTOM, height=48, idx=0) wnd.sr.resetWnd = uicls.Container(name='resetwnd', parent=bottomCont, align=uiconst.TOTOP, height=24, idx=0) wnd.sr.logWnd = uicls.Container(name='logwnd', parent=bottomCont, align=uiconst.TOTOP, height=24, idx=0) wnd.sr.logWnd2 = uicls.Container(name='logwnd2', parent=bottomCont, align=uiconst.TOTOP, height=24, idx=0) btns = uicls.ButtonGroup( parent=wnd.sr.logWnd, line=False, btns=[['Start', self.StartLogInMemory, (), 51], ['Stop', self.StopLogInMemory, (), 51], ['Clear', self.ClearLogInMemory, (), 51], ['Copy', self.ExportLogInMemory, (), 51], ['Attach', self.AttachToLogServer, (), 51], ['Save', self.SaveLogsToFile, (), 51]]) uicls.Label(parent=wnd.sr.logWnd2, text='<b>Threshold:</b>', align=uiconst.TOLEFT, padLeft=10, padTop=1) options = (('Info', 0), ('Notice', 1), ('Warning', 2), ('Error', 3)) for text, value in options: isChecked = blue.logInMemory.threshold == value uicls.Checkbox(parent=wnd.sr.logWnd2, text=text, groupname='threshold', align=uiconst.TOLEFT, width=100, top=5, checked=isChecked, callback=self.OnLogThresholdRadioButtons, retval=value) edit = uicls.SinglelineEdit(parent=wnd.sr.logWnd2, name='capacityEdit', align=uiconst.TORIGHT, ints=(1, MAX_LOG_CAPACITY), padRight=5, padBottom=5, setvalue=blue.logInMemory.capacity, OnChange=self.OnLogCapacityEdit) uicls.Label(parent=wnd.sr.logWnd2, text='<b>Capacity:</b>', align=uiconst.TORIGHT, padLeft=10, padTop=1) wnd.sr.methodcallWnd = uicls.Container(name='methodcallwnd', parent=bottomCont, align=uiconst.TOTOP, height=24, idx=0) btns = uicls.ButtonGroup( btns=[['Copy', self.ExportMethodCalls, (), 51]]) wnd.sr.methodcallWnd.children.insert(0, btns) uicls.Line(parent=wnd.sr.resetWnd, align=uiconst.TOTOP) uicls.Button(parent=wnd.sr.resetWnd, label='Reset', align=uiconst.CENTER, func=self.Reset) wnd.SetMinSize([400, 300]) wnd.Maximize(1) wnd.SetParent(uicore.layer.abovemain) return wnd
def SetupContainers(self): findFleetsParent = uicls.Container(name='findfleets', parent=self, align=uiconst.TOALL, pos=(0, 0, 0, 0)) myAdvertParent = uicls.Container(name='myadvert', parent=self, align=uiconst.TOALL, pos=(0, 0, 0, 0), clipChildren=1) self.sr.myAdvertButtons = uicls.Container(name='myAdvertButtons', parent=myAdvertParent, align=uiconst.TOBOTTOM, height=35) self.sr.tabs = uicls.TabGroup(name='fleetfindertabs', parent=self, idx=0) tabs = [[ localization.GetByLabel('UI/Fleet/FleetRegistry/FindFleets'), findFleetsParent, self, 'findfleets' ], [ localization.GetByLabel('UI/Fleet/FleetRegistry/MyAdvert'), myAdvertParent, self, 'myadvert' ]] self.sr.tabs.Startup(tabs, 'fleetfindertabs', 0) uthread.new( self.sr.tabs.ShowPanelByName, localization.GetByLabel('UI/Fleet/FleetRegistry/FindFleets')) uicls.Container(name='push', parent=findFleetsParent, width=const.defaultPadding, align=uiconst.TOLEFT) uicls.Container(name='push', parent=findFleetsParent, width=const.defaultPadding, align=uiconst.TORIGHT) self.sr.filterCont = uicls.Container(name='filterCont', parent=findFleetsParent, align=uiconst.TOTOP, height=35) self.sr.infoCont = uicls.Container(name='infoCont', parent=findFleetsParent, align=uiconst.TOBOTTOM, height=155, state=uiconst.UI_HIDDEN) uicls.Container(name='push', parent=findFleetsParent, height=const.defaultPadding, align=uiconst.TOBOTTOM) self.sr.topInfoCont = uicls.Container(name='topInfoCont', parent=self.sr.infoCont, align=uiconst.TOTOP, height=20) self.sr.descrCont = uicls.Container(name='descrCont', parent=self.sr.infoCont, align=uiconst.TOALL, pos=(0, 0, 0, 0)) self.sr.scrollCont = uicls.Container(name='scrollCont', parent=findFleetsParent, align=uiconst.TOALL, pos=(0, 0, 0, 0)) uicls.Container(name='push', parent=myAdvertParent, width=const.defaultPadding, align=uiconst.TOLEFT) uicls.Container(name='push', parent=myAdvertParent, width=const.defaultPadding, align=uiconst.TORIGHT) self.sr.myAdvertCont = uicls.Container(name='myAdvertCont', parent=myAdvertParent, align=uiconst.TOALL, pos=(10, 0, 10, 0))
def _Load(self, key, reloadStationID = None): self.loading = 1 self.pending = None if key != self.key: self.scrollPosition[self.key] = self.sr.scroll.GetScrollProportion() self.key = key if key[:7] == 'station': if not self.station_inited: idx = self.sr.main.children.index(self.sr.maintabs) self.sr.station_tabs = uicls.TabGroup(name='tabparent2', parent=self.sr.main, idx=idx + 1) tabs = [[localization.GetByLabel('UI/Common/ItemTypes/Ships'), self.sr.scroll, self, '%sships' % key], [localization.GetByLabel('UI/Common/ItemTypes/Modules'), self.sr.scroll, self, '%smodules' % key], [localization.GetByLabel('UI/Common/ItemTypes/Charges'), self.sr.scroll, self, '%scharges' % key], [localization.GetByLabel('UI/Common/ItemTypes/Minerals'), self.sr.scroll, self, '%sminerals' % key], [localization.GetByLabel('UI/Common/Other'), self.sr.scroll, self, '%sother' % key]] self.station_inited = 1 self.sr.station_tabs.Startup(tabs, 'assetsatstation', silently=True) if self.sr.Get('filt_cont', None): self.sr.filt_cont.state = uiconst.UI_HIDDEN self.sr.station_tabs.state = uiconst.UI_NORMAL if self.sr.Get('search_cont', None): self.sr.search_cont.state = uiconst.UI_HIDDEN if key != 'station': self.ShowStationItems(key[7:]) else: self.sr.station_tabs.AutoSelect(1) elif key in ('allitems', 'regitems', 'conitems', 'sysitems'): if not getattr(self, 'filt_inited', False): self.sr.filt_cont = uicls.Container(align=uiconst.TOTOP, height=67, parent=self.sr.main, top=2, idx=1) self.sr.sortcombo = uicls.Combo(label=localization.GetByLabel('UI/Common/SortBy'), parent=self.sr.filt_cont, options=self.sortOptions, name='sortcombo', select=None, callback=self.Filter, width=115, pos=(5, 16, 0, 0)) l = self.sr.sortcombo.width + self.sr.sortcombo.left + const.defaultPadding self.sr.filtcombo = uicls.Combo(label=localization.GetByLabel('UI/Common/View'), parent=self.sr.filt_cont, options=[], name='filtcombo', select=None, callback=self.Filter, width=115, pos=(l, 16, 0, 0)) self.sr.filt_cont.height = self.sr.filtcombo.top + self.sr.filtcombo.height self.filt_inited = 1 self.sr.filt_cont.state = uiconst.UI_PICKCHILDREN if key in ('regitems', 'conitems', 'sysitems'): self.sr.filtcombo.state = uiconst.UI_NORMAL else: self.sr.filtcombo.state = uiconst.UI_HIDDEN if self.sr.Get('station_tabs', None): self.sr.station_tabs.state = uiconst.UI_HIDDEN if self.sr.Get('search_cont', None): self.sr.search_cont.state = uiconst.UI_HIDDEN self.ShowAll(key, None, None) elif key == 'search': if self.sr.Get('station_tabs', None): self.sr.station_tabs.state = uiconst.UI_HIDDEN if not self.search_inited: self.sr.search_cont = uicls.Container(align=uiconst.TOTOP, height=37, parent=self.sr.main, idx=1) uicls.Container(name='comboCont', align=uiconst.TOLEFT, parent=self.sr.search_cont, width=100 + const.defaultPadding) top = const.defaultPadding + 14 self.sr.sortcombosearch = uicls.Combo(label=localization.GetByLabel('UI/Common/SortBy'), parent=self.sr.search_cont, options=self.sortOptions, name='sortcombosearch', select=None, callback=self.Search, width=100, pos=(const.defaultPadding, top, 0, 0)) buttonCont = uicls.Container(name='bottonCont', align=uiconst.TORIGHT, parent=self.sr.search_cont) button = uicls.Button(parent=buttonCont, label=localization.GetByLabel('UI/Common/Buttons/Search'), left=const.defaultPadding, top=top, func=self.Search) buttonCont.width = button.width + const.defaultPadding * 2 self.sr.searchtype = assets.SearchBox(name='assetssearchtype', parent=self.sr.search_cont, left=const.defaultPadding, padBottom=1, width=0, top=top, label=localization.GetByLabel('UI/Common/SearchText'), maxLength=100, OnReturn=self.Search, align=uiconst.TOALL, keywords=self.searchKeywords, isTypeField=True) self.search_inited = 1 if self.sr.Get('filt_cont', None): self.sr.filt_cont.state = uiconst.UI_HIDDEN self.sr.search_cont.state = uiconst.UI_PICKCHILDREN sortKeySearch = settings.char.ui.Get('assetsSearchSortKey', None) self.ShowSearch(sortKeySearch) self.loading = 0 if self.pending: self.Load(*self.pending)
def Load(self, args): if not self.sr.Get('inited', 0): self.ourWarsScroll = None self.allWarsScroll = None self.killReportsScroll = None self.sr.inited = 1 self.maxWarID = const.maxInt self.warbatches = [] self.ourWarsCont = uicls.Container(name='ourWarsCont', parent=self, align=uiconst.TOALL) toolbarContainer = uicls.Container(name='toolbarContainer', align=uiconst.TOBOTTOM, parent=self.ourWarsCont, height=22) declareButton = uicls.ButtonGroup(btns=[[ localization.GetByLabel( 'UI/Corporations/CorporationWindow/Alliances/Rankings/DeclareWar' ), self.DeclareWar, None, None ]], parent=toolbarContainer) self.ourWarsScroll = uicls.Scroll(parent=self.ourWarsCont, padding=const.defaultPadding) self.allWarsCont = uicls.Container(name='allWarsCont', parent=self, align=uiconst.TOALL) allWarsSettingsCont = uicls.Container(name='allWarsSettingsCont', parent=self.allWarsCont, align=uiconst.TOTOP, height=18, top=2) browseCont = uicls.Container(name='browseCont', parent=self.allWarsCont, align=uiconst.TOBOTTOM, height=22, padding=(const.defaultPadding, 0, const.defaultPadding, 0), state=uiconst.UI_NORMAL) self.prevBtn = uicls.BrowseButton(parent=browseCont, prev=True, state=uiconst.UI_NORMAL, func=self.BrowseAllWars) self.nextBtn = uicls.BrowseButton(parent=browseCont, prev=False, state=uiconst.UI_NORMAL, align=uiconst.TOPRIGHT, func=self.BrowseAllWars) self.showCryForHelpCb = uicls.Checkbox( parent=allWarsSettingsCont, align=uiconst.TOPLEFT, left=const.defaultPadding, height=14, width=300, configName='allwars_showcryforhelp', text=localization.GetByLabel( 'UI/Corporations/Wars/ShowCryForHelp'), checked=settings.user.ui.Get('allwars_showcryforhelp', 0), callback=self.CheckBoxChange) self.showCryForHelpCb.hint = localization.GetByLabel( 'UI/Corporations/Wars/NotFilterWhenSearching') self.searchButton = uicls.Button( parent=allWarsSettingsCont, label=localization.GetByLabel( 'UI/Corporations/CorporationWindow/Standings/Search'), align=uiconst.TOPRIGHT, pos=(const.defaultPadding, 2, 0, 0), func=self.Search, btn_default=1) self.searchEdit = uicls.SinglelineEdit( name='edit', parent=allWarsSettingsCont, left=self.searchButton.width + const.defaultPadding * 2, width=150, align=uiconst.TOPRIGHT, maxLength=32) self.searchEdit.OnReturn = self.Search self.allWarsScroll = uicls.Scroll(parent=self.allWarsCont, padding=const.defaultPadding) self.killReportsCont = uicls.Container(name='killReportsCont', parent=self, align=uiconst.TOALL) killSettingsContainer = uicls.Container( name='killSettingsContainer', parent=self.killReportsCont, align=uiconst.TOTOP, height=20) combatValues = ((localization.GetByLabel( 'UI/Corporations/Wars/Killmails/ShowKills'), 0), (localization.GetByLabel( 'UI/Corporations/Wars/Killmails/ShowLosses'), 1)) selectedCombatType = settings.user.ui.Get('CorpCombatLogCombo', 0) self.combatCombo = uicls.Combo(parent=killSettingsContainer, name='combo', select=selectedCombatType, align=uiconst.TOPLEFT, callback=self.OnCombatChange, options=combatValues, idx=0, adjustWidth=True, top=const.defaultPadding, left=const.defaultPadding) self.killReportsScroll = uicls.Scroll(parent=self.killReportsCont, padding=const.defaultPadding) warTabs = [ [ localization.GetByLabel( 'UI/Corporations/CorporationWindow/Wars/OurWars'), self.ourWarsCont, self, 'our' ], [ localization.GetByLabel('UI/Corporations/Wars/AllWars'), self.allWarsCont, self, 'all' ], [ localization.GetByLabel( 'UI/Corporations/Wars/Killmails/KillReports'), self.killReportsCont, self, 'killreports' ] ] btnContainer = uicls.Container(name='pageBtnContainer', parent=self, align=uiconst.TOBOTTOM, idx=0, padBottom=const.defaultPadding) btn = uix.GetBigButton(size=22, where=btnContainer, left=4, top=0, align=uiconst.TORIGHT) btn.hint = localization.GetByLabel('UI/Common/ViewMore') btn.state = uiconst.UI_HIDDEN btn.sr.icon.LoadIcon('ui_23_64_2') btn = uix.GetBigButton(size=22, where=btnContainer, left=4, top=0, align=uiconst.TOLEFT) btn.hint = localization.GetByLabel('UI/Common/Previous') btn.state = uiconst.UI_HIDDEN btn.sr.icon.LoadIcon('ui_23_64_1') btnContainer.height = max( [c.height for c in btnContainer.children]) self.btnContainer = btnContainer btnContainer.state = uiconst.UI_HIDDEN tabs = uicls.TabGroup(name='tabparent', parent=self, idx=0) tabs.Startup(warTabs, 'corporationwars') self.tabs = tabs self.killentries = 25 sm.GetService('corpui').LoadTop( 'ui_7_64_7', localization.GetByLabel( 'UI/Corporations/CorporationWindow/Wars/WarsTitle')) self.myWars = 1 if not hasattr(self, 'viewingOwnerID'): self.viewingOwnerID = eve.session.allianceid or eve.session.corpid if not hasattr(self, 'searchOwnerID'): self.searchOwnerID = None extrahint = '' self._HideNextPrevBtns() if args == 'all': self.ourWarsCont.display = False self.allWarsCont.display = True self.killReportsCont.display = False self.ShowAllWars() elif args == 'our': self.ourWarsCont.display = True self.allWarsCont.display = False self.killReportsCont.display = False self.ShowWars() elif args == 'killreports': self.ourWarsCont.display = False self.allWarsCont.display = False self.killReportsCont.display = True self.prevIDs = [] selectedCombatType = settings.user.ui.Get('CorpCombatLogCombo', 0) if selectedCombatType == 0: self.ShowCombatKills() else: self.ShowCombatLosses() extrahint = localization.GetByLabel( 'UI/Corporations/CorporationWindow/Wars/DelayedKillboardDetails' ) sm.GetService('corpui').LoadTop( 'ui_7_64_7', localization.GetByLabel( 'UI/Corporations/CorporationWindow/Wars/WarsTitle'), extrahint)
def ApplyAttributes(self, attributes): uicls.Window.ApplyAttributes(self, attributes) actionBtns = attributes.actionBtns or [] caption = attributes.caption or '' inpt = attributes.input or '' showContactList = attributes.get('showContactList', False) extraIconHintFlag = attributes.extraIconHintFlag or None configname = attributes.configname or '' self.contactsLoaded = 0 self.selecting = 0 self.result = None self.SetWndIcon() self.SetTopparentHeight(0) self.MakeUnMinimizable() self.SetMinSize([200, 240]) self.width = 200 self.height = 240 self.SetCaption(caption) self.showContactList = showContactList self.extraIconHintFlag = extraIconHintFlag self.configname = configname self.sr.hintCont = uicls.Container(name='hintCont', parent=self.sr.main, align=uiconst.TOTOP, pos=(0, 0, 0, 16), state=uiconst.UI_HIDDEN) searchParent = self.sr.main if showContactList: self.sr.searchCont = uicls.Container(name='searchCont', parent=self.sr.main, align=uiconst.TOALL, pos=(0, 0, 0, 0)) self.sr.scroll = uicls.Scroll( name='searchScroll', parent=self.sr.searchCont, padding=(const.defaultPadding, const.defaultPadding, const.defaultPadding, const.defaultPadding)) self.sr.scroll.OnSelectionChange = self.RefreshSelection self.sr.contactsScroll = uicls.Scroll( name='contactsScroll', parent=self.sr.main, padding=(const.defaultPadding, const.defaultPadding, const.defaultPadding, const.defaultPadding)) self.sr.contactsScroll.OnSelectionChange = self.RefreshSelection self.sr.tabs = uicls.TabGroup( name='tabs', parent=self.sr.main, tabs=[[ localization.GetByLabel('UI/Mail/Search'), self.sr.searchCont, self, 'search' ], [ localization.GetByLabel('UI/Mail/AllContacts'), self.sr.contactsScroll, self, 'contacts' ]], groupID='calenderEvent_tabs', autoselecttab=1, idx=0) searchParent = self.sr.searchCont else: self.sr.scroll = uicls.Scroll( parent=self.sr.main, padding=(const.defaultPadding, const.defaultPadding, const.defaultPadding, const.defaultPadding)) self.sr.scroll.OnSelectionChange = self.RefreshSelection self.currentScroll = self.sr.scroll searchCont = uicls.Container(name='searchCont', parent=searchParent, align=uiconst.TOTOP, pos=(0, 0, 0, 28), idx=0) searchByCont = uicls.Container(name='searchByCont', parent=searchParent, align=uiconst.TOTOP, pos=(0, 0, 0, 25), idx=0) searchBtnCont = uicls.Container(name='searchBtnCont', parent=searchCont, align=uiconst.TORIGHT, pos=(0, 0, 40, 0)) inputCont = uicls.Container(name='inputCont', parent=searchCont, align=uiconst.TOALL, padLeft=5) searchByChoices = [ [ localization.GetByLabel( 'UI/Search/UniversalSearch/PartialTerms'), const.searchByPartialTerms ], [ localization.GetByLabel( 'UI/Search/UniversalSearch/ExactTerms'), const.searchByExactTerms ], [ localization.GetByLabel( 'UI/Search/UniversalSearch/ExactPhrase'), const.searchByExactPhrase ], [ localization.GetByLabel( 'UI/Search/UniversalSearch/OnlyExactPhrase'), const.searchByOnlyExactPhrase ] ] self.sr.searchBy = uicls.Combo( label=localization.GetByLabel('UI/Common/SearchBy'), parent=searchByCont, options=searchByChoices, name='ownerSearchSearchBy', select=settings.user.ui.Get('ownersSearchBy', const.searchByPartialTerms), width=170, left=10, top=5, labelleft=65, callback=self.ChangeSearchBy) self.sr.inpt = inpt = uicls.SinglelineEdit(name='input', parent=inputCont, maxLength=50, pos=(10, 5, 86, 0), label='', setvalue=inpt, align=uiconst.TOTOP) self.sr.searchBtn = uicls.Button( parent=searchBtnCont, label=localization.GetByLabel('UI/Mail/Search'), pos=(4, inpt.top, 0, 0), func=self.Search, btn_default=1) searchBtnCont.width = self.sr.searchBtn.width + 8 btns = [] self.dblClickFunc = None for each in actionBtns: text, func, dblClickFunc = each btns.append( [text, func, lambda: self.GetSelectedInCurrentScroll(), None]) if dblClickFunc: self.dblClickFunc = func self.sr.btns = uicls.ButtonGroup(btns=btns, parent=self.sr.main, idx=0) self.sr.btns.state = uiconst.UI_HIDDEN self.sr.scroll.Load( contentList=[], headers=[], noContentHint=localization.GetByLabel('UI/Common/TypeInSearch'))
def ApplyAttributes(self, attributes): uicls.Window.ApplyAttributes(self, attributes) charID = attributes.charID self.charID = None self.corp = None self.standing2 = None self.charMgr = None self.memberinfo = None self.corporation = None self.roleGroupings = None self.myGrantableRoles = None self.myGrantableRolesAtHQ = None self.myGrantableRolesAtBase = None self.myGrantableRolesAtOther = None self.isCEOorEq = None self.userIsCEO = None self.member = None self.playerIsCEO = 0 self.playerIsDirector = 0 self.roles = 0 self.grantableRoles = 0 self.rolesAtHQ = 0 self.grantableRolesAtHQ = 0 self.rolesAtBase = 0 self.grantableRolesAtBase = 0 self.rolesAtOther = 0 self.grantableRolesAtOther = 0 self.baseID = None self.title = '' self.titleMask = 0 self.args = '' self.ddxFunction = None self.viewType = 0 self.viewRoleGroupingID = 1 self.bases = [('-', None)] self.LoadServices() self.LoadChar(charID) self.SetScope('all') if not self.member: self.Close() return self.SetTopparentHeight(70) self.SetCaption(localization.GetByLabel('UI/Corporations/EditMemberDialog/EditMemberCaption')) self.SetMinSize([310, 300]) self.sr.main = uiutil.GetChild(self, 'main') self.wndCombos = uicls.Container(name='options', parent=self.sr.main, align=uiconst.TOTOP, height=34) viewOptionsList1 = [[localization.GetByLabel('UI/Corporations/Common/Roles'), VIEW_ROLES], [localization.GetByLabel('UI/Corporations/Common/GrantableRoles'), VIEW_GRANTABLE_ROLES]] viewOptionsList2 = [] for roleGrouping in self.roleGroupings.itervalues(): viewOptionsList2.append([localization.GetByMessageID(roleGrouping.roleGroupNameID), roleGrouping.roleGroupID]) i = 0 for optlist, label, config, defval in [(viewOptionsList1, localization.GetByLabel('UI/Common/View'), 'viewtype', 1000), (viewOptionsList2, localization.GetByLabel('UI/Corporations/Common/GroupType'), 'rolegroup', None)]: combo = uicls.Combo(label=label, parent=self.wndCombos, options=optlist, name=config, callback=self.OnComboChange, width=146, pos=(const.defaultPadding + i * 152 + 1, const.defaultPadding + 12, 0, 0)) i += 1 self.sr.scroll = uicls.Scroll(parent=self.sr.main, padding=(const.defaultPadding, const.defaultPadding, const.defaultPadding, const.defaultPadding)) self.sr.standardBtns = uicls.ButtonGroup(btns=[[localization.GetByLabel('UI/Common/Buttons/OK'), self.OnOK, (), 81], [localization.GetByLabel('UI/Common/Buttons/Cancel'), self.OnCancel, (), 81], [localization.GetByLabel('UI/Corporations/EditMemberDialog/Apply'), self.OnApply, (), 81]]) self.sr.main.children.insert(0, self.sr.standardBtns) cap = uicls.CaptionLabel(text=cfg.eveowners.Get(self.charID).name, parent=self.sr.topParent, align=uiconst.RELATIVE, left=74, top=20) if self.member.title: uicls.EveHeaderLarge(text=self.member.title, parent=self.sr.topParent, align=uiconst.RELATIVE, left=cap.left, top=cap.top + cap.height, bold=True) if util.IsDustCharacter(charID): btns = [] else: btns = [[localization.GetByLabel('UI/Corporations/EditMemberDialog/GiveShares'), self.OnGiveShares, (), 81]] buttons = uicls.ButtonGroup(btns=btns) self.sr.main.children.insert(1, buttons) maintabs = uicls.TabGroup(name='tabparent', parent=self.sr.main, idx=0) maintabs.Startup([[localization.GetByLabel('UI/Generic/General'), self.sr.scroll, self, 'general', buttons], [localization.GetByLabel('UI/Corporations/Common/Roles'), self.sr.scroll, self, 'roles'], [localization.GetByLabel('UI/Corporations/Common/Titles'), self.sr.scroll, self, 'titles'], [localization.GetByLabel('UI/Corporations/EditMemberDialog/RolesSummary'), self.sr.scroll, self, 'roles_summary']], 'editmemberdialog') self.sr.maintabs = maintabs self.DisplayPhoto()
def Draw(self): self.sr.main.Flush() uicls.Container(name='push', parent=self.sr.main, align=uiconst.TOTOP, height=6) topParent = uicls.Container(parent=self.sr.main, 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.main, 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) self.sr.shipIcon = uicls.Icon(parent=topParent, state=uiconst.UI_HIDDEN, size=64, left=const.defaultPadding, typeID=self.fitting.shipTypeID, ignoreSize=True) self.sr.techicon = uicls.Sprite(name='techIcon', parent=topParent, align=uiconst.RELATIVE, left=const.defaultPadding, width=16, height=16, idx=0) uix.GetTechLevelIcon(self.sr.techicon, 0, self.fitting.shipTypeID) 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 self.sr.shipIcon.state = uiconst.UI_DISABLED 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, 160, 0), maxLength=40) self.sr.fittingName.SetText(self.fitting.name) if self.truncated: uicls.EveLabelMedium(text=localization.GetByLabel('UI/Fitting/FittingWindow/FittingManagement/Truncated'), parent=fittingNameContainer, left=self.sr.fittingName.width + 10, top=3, width=60, height=20, state=uiconst.UI_NORMAL) shipInfoContainer = uicls.Container(parent=topRightParent, align=uiconst.TOTOP, height=20) shipName = cfg.invtypes.Get(self.fitting.shipTypeID).typeName self.sr.shipName = uicls.EveLabelMedium(text=shipName, 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) self.sr.infoicon.OnClick = self.ShowInfo self.sr.infoicon.left = self.sr.shipName.textwidth + 6 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'), True, 'ownership'], ['fittingOwnerCorporation', session.corpid, localization.GetByLabel('UI/Fitting/FittingWindow/FittingManagement/Corporation'), False, '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(parent=bottomParent, align=uiconst.TOALL, maxLength=400) self.sr.fittingDescription.SetText(self.fitting.description) self.sr.fittingInfo = uicls.Scroll(name='fittingInfoScroll', parent=bottomParent) scrolllist = self.fittingSvc.GetFittingInfoScrollList(self.fitting) self.sr.fittingInfo.Load(contentList=scrolllist) 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.saveDeleteButtons = uicls.ButtonGroup(btns=[[localization.GetByLabel('UI/Common/Buttons/Save'), self.Save, ()], [localization.GetByLabel('UI/Common/Buttons/Cancel'), self.CloseByUser, ()]], parent=self.sr.main, idx=0)
def ApplyAttributes(self, attributes): uicls.Window.ApplyAttributes(self, attributes) self.shipid = util.GetActiveShip() self.shipItem = self.GetShipItem() self.SetCaption( localization.GetByLabel('UI/Ship/ShipConfig/ShipConfig')) self.SetTopparentHeight(72) self.SetWndIcon() self.SetMinSize([300, 200]) self.sr.top = uicls.Container(name='top', align=uiconst.TOTOP, parent=self.sr.topParent, pos=(const.defaultPadding, const.defaultPadding, const.defaultPadding, 64)) icon = uicls.Icon(parent=self.sr.top, align=uiconst.TOLEFT, left=const.defaultPadding, size=64, state=uiconst.UI_NORMAL, typeID=self.shipItem.typeID) icon.GetMenu = self.ShipMenu uicls.Container(name='push', align=uiconst.TOLEFT, pos=(5, 0, 5, 0), parent=self.sr.top) uicls.EveHeaderMedium(name='label', text=cfg.evelocations.Get( self.shipItem.itemID).name, parent=self.sr.top, align=uiconst.TOTOP, bold=True, state=uiconst.UI_NORMAL) uicls.EveLabelMedium(name='label', text=cfg.invtypes.Get(self.shipItem.typeID).name, parent=self.sr.top, align=uiconst.TOTOP, state=uiconst.UI_NORMAL) self.ship = moniker.GetShipAccess() self.conf = self.ship.GetShipConfiguration(self.shipid) modules = self.GetShipModules() for module in modules: self.sr.Set( '%sPanel' % module.lower(), uicls.Container(name=module, align=uiconst.TOALL, state=uiconst.UI_HIDDEN, parent=self.sr.main, pos=(0, 0, 0, 0))) tabs = [[ name, self.sr.Get('%sPanel' % module.lower(), None), self, module ] for module, name in modules.iteritems() if self.sr.Get('%sPanel' % module.lower())] if tabs: self.sr.maintabs = uicls.TabGroup(name='tabparent', align=uiconst.TOTOP, height=18, parent=self.sr.main, idx=0, tabs=tabs, groupID='pospanel') else: uicls.CaptionLabel( text=localization.GetByLabel('UI/Ship/ShipConfig/ShipConfig'), parent=self.sr.main, size=18, uppercase=0, left=const.defaultPadding, width=const.defaultPadding, top=const.defaultPadding)
def ApplyAttributes(self, attributes): uicls.Window.ApplyAttributes(self, attributes) uthread.new(sm.GetService('bookmarkSvc').UpdateFoldersToDB) uicore.registry.GetLockedGroup( 'agentgroups', 'all', localization.GetByLabel('UI/PeopleAndPlaces/AllAgents')) self.inited = 0 self.semaphore = uthread.Semaphore((self.windowID, 0)) self.SetCaption( localization.GetByLabel('UI/PeopleAndPlaces/PeopleAndPlaces')) self.SetTopparentHeight(52) self.SetWndIcon('ui_12_64_2', mainTop=-12) self.SetScope('station_inflight') self.sr.main = uiutil.GetChild(self, 'main') self.sr.scroll = uicls.Scroll( parent=self.sr.main, padding=(const.defaultPadding, const.defaultPadding, const.defaultPadding, const.defaultPadding)) self.sr.contacts = form.ContactsForm(name='contactsform', parent=self.sr.main, pos=(0, 0, 0, 0)) self.sr.bookmarkbtns = uicls.ButtonGroup(btns=[ [ localization.GetByLabel('UI/PeopleAndPlaces/AddBookmark'), self.BookmarkCurrentLocation, (), 81 ], [ localization.GetByLabel('UI/PeopleAndPlaces/CreateFolder'), self.CreateFolder, (), 81 ] ], parent=self.sr.main, idx=0) self.sr.agentbtns = uicls.ButtonGroup( btns=[[ localization.GetByLabel('UI/PeopleAndPlaces/CreateFolder'), self.AddGroup, 'agentgroups', 81 ], [ localization.GetByLabel('UI/AgentFinder/AgentFinder'), uicore.cmd.OpenAgentFinder, 'agentgroups', 81 ]], parent=self.sr.main, idx=0) self.sr.hint = None grplst = [ [localization.GetByLabel('UI/Common/Any'), -1], [ localization.GetByLabel( 'UI/Journal/JournalWindow/Agents/HeaderAgent'), const.searchResultAgent ], [ localization.GetByLabel('UI/Common/Character'), const.searchResultCharacter ], [ localization.GetByLabel('UI/Common/Corporation'), const.searchResultCorporation ], [ localization.GetByLabel('UI/Common/Alliance'), const.searchResultAlliance ], [ localization.GetByLabel('UI/Common/Faction'), const.searchResultFaction ], [ localization.GetByLabel('UI/Common/LocationTypes/Station'), const.searchResultStation ], [ localization.GetByLabel('UI/Common/LocationTypes/SolarSystem'), const.searchResultSolarSystem ], [ localization.GetByLabel( 'UI/Common/LocationTypes/Constellation'), const.searchResultConstellation ], [ localization.GetByLabel('UI/Common/LocationTypes/Region'), const.searchResultRegion ] ] self.sr.sgroup = group = uicls.Combo( label=localization.GetByLabel('UI/Common/SearchType'), parent=self.sr.topParent, options=grplst, name='addressBookComboSearchType', select=settings.user.ui.Get('ppSearchGroup', -1), width=86, left=74, top=20, callback=self.ChangeSearchGroup) self.sr.inpt = inpt = uicls.SinglelineEdit( name='search', parent=self.sr.topParent, maxLength=100, left=group.left + group.width + 6, top=group.top, width=86, label=localization.GetByLabel('UI/PeopleAndPlaces/SearchString')) btn = uicls.Button( parent=self.sr.topParent, label=localization.GetByLabel('UI/Common/Buttons/Search'), pos=(inpt.left + inpt.width + 2, inpt.top, 0, 0), func=self.Search, btn_default=1) searchByChoices = [ [ localization.GetByLabel( 'UI/Search/UniversalSearch/PartialTerms'), const.searchByPartialTerms ], [ localization.GetByLabel( 'UI/Search/UniversalSearch/ExactTerms'), const.searchByExactTerms ], [ localization.GetByLabel( 'UI/Search/UniversalSearch/ExactPhrase'), const.searchByExactPhrase ], [ localization.GetByLabel( 'UI/Search/UniversalSearch/OnlyExactPhrase'), const.searchByOnlyExactPhrase ] ] self.sr.searchBy = searchBy = uicls.Combo( label=localization.GetByLabel('UI/Common/SearchBy'), parent=self.sr.topParent, options=searchByChoices, name='addressBookComboSearchBy', select=settings.user.ui.Get('ppSearchBy', 1), width=233, left=75, top=inpt.top + inpt.height + 2, labelleft=group.left + group.width + 6 - 75, callback=self.ChangeSearchBy) self.SetTopparentHeight(max(52, searchBy.top + searchBy.height)) self.sr.scroll.sr.content.OnDropData = self.OnDropData idx = settings.user.tabgroups.Get('addressbookpanel', None) if idx is None: settings.user.tabgroups.Set('addressbookpanel', 4) tabs = [[ localization.GetByLabel('UI/PeopleAndPlaces/Contacts'), self.sr.contacts, self, 'contact', None ], [ localization.GetByLabel('UI/PeopleAndPlaces/Agents'), self.sr.scroll, self, 'agents', None ], [ localization.GetByLabel('UI/PeopleAndPlaces/Places'), self.sr.scroll, self, 'places', None ]] maintabs = uicls.TabGroup(name='tabparent', align=uiconst.TOTOP, height=18, parent=self.sr.main, idx=0, tabs=tabs, groupID='addressbookpanel', autoselecttab=True) maintabs.sr.Get( '%s_tab' % localization.GetByLabel('UI/PeopleAndPlaces/Agents'), None).OnTabDropData = self.DropInAgents maintabs.sr.Get( '%s_tab' % localization.GetByLabel('UI/PeopleAndPlaces/Contacts'), None).OnTabDropData = self.DropInPersonalContact self.placesHeaders = [ localization.GetByLabel('UI/PeopleAndPlaces/Label'), localization.GetByLabel('UI/Common/Type'), localization.GetByLabel('UI/PeopleAndPlaces/Jumps'), localization.GetByLabel('UI/PeopleAndPlaces/Sol'), localization.GetByLabel('UI/PeopleAndPlaces/Con'), localization.GetByLabel('UI/PeopleAndPlaces/Reg'), localization.GetByLabel('UI/Common/Date'), localization.GetByLabel('UI/PeopleAndPlaces/Creator') ] self.sr.maintabs = maintabs self.inited = 1