Esempio n. 1
0
    def ApplyAttributes(self, attributes):
        uicontrols.Window.ApplyAttributes(self, attributes)
        self.shipid = util.GetActiveShip()
        self.shipItem = self.GetShipItem()
        self.SetTopparentHeight(72)
        self.SetWndIcon()
        self.SetMinSize([300, 200])
        self.sr.top = uiprimitives.Container(name='top', align=uiconst.TOTOP, parent=self.sr.topParent, pos=(const.defaultPadding,
         const.defaultPadding,
         const.defaultPadding,
         64))
        icon = uicontrols.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
        uiprimitives.Container(name='push', align=uiconst.TOLEFT, pos=(5, 0, 5, 0), parent=self.sr.top)
        uicontrols.EveHeaderMedium(name='label', text=cfg.evelocations.Get(self.shipItem.itemID).name, parent=self.sr.top, align=uiconst.TOTOP, bold=True, state=uiconst.UI_NORMAL)
        uicontrols.EveLabelMedium(name='label', text=evetypes.GetName(self.shipItem.typeID), 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(), uiprimitives.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 = uicontrols.TabGroup(name='tabparent', align=uiconst.TOTOP, height=18, parent=self.sr.main, idx=0, tabs=tabs, groupID='pospanel')
        else:
            uicontrols.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)
Esempio n. 2
0
    def ReloadTabs(self, selectTab=None):
        if not self.tabs or len(self.tabs) < 1:
            return
        tabs = []
        for tab in self.tabs:
            tabData = 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:
            import uicontrols
            tabGroup = uicontrols.TabGroup(name='tabparent',
                                           parent=self.tabBar,
                                           minTabsize=50,
                                           maxTabsize=200,
                                           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)
Esempio n. 3
0
 def Load(self, key):
     alliancesLabel = localization.GetByLabel(
         'UI/Corporations/CorporationWindow/Alliances/Alliances')
     sm.GetService('corpui').LoadTop(
         'res:/ui/Texture/WindowIcons/alliances.png', alliancesLabel)
     if not self.sr.Get('inited', 0):
         self.sr.inited = 1
         self.sr.wndViewParent = uiprimitives.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 = uicontrols.Scroll(
                 name='alliancecontactsform',
                 parent=self,
                 padding=(const.defaultPadding, const.defaultPadding,
                          const.defaultPadding, const.defaultPadding))
         self.sr.tabs = uicontrols.TabGroup(name='tabparent',
                                            parent=self,
                                            idx=0)
         self.sr.tabs.Startup(self._GetTabs(), 'corpaccounts')
         return
     self.LoadViewClass(key)
Esempio n. 4
0
    def ApplyAttributes(self, attributes):
        uicontrols.Window.ApplyAttributes(self, attributes)
        self.SetTopparentHeight(64)
        self.SetWndIcon(self.default_iconNum)
        uicontrols.WndCaptionLabel(text='EVEModX Manager',
                                   parent=self.sr.topParent,
                                   align=uiconst.RELATIVE,
                                   subcaption='Version: ' + settings.VERSION)
        self.installedMods = Container(name='installedMods',
                                       parent=self.sr.main)
        self.modRepo = Container(name='modRepo', parent=self.sr.main)
        self.modScroll = ScrollContainer(name='modScroll',
                                         parent=self.installedMods,
                                         align=uiconst.TOALL,
                                         padding=const.defaultPadding,
                                         showUnderlay=True)
        self.tabs = uicontrols.TabGroup(name='tabs',
                                        parent=self.sr.main,
                                        tabs=[('Installed Mods',
                                               self.installedMods, self,
                                               'installedMods'),
                                              ('Mod Repository', self.modRepo,
                                               self, 'modRepo')],
                                        idx=0)

        for mod_name, mod_obj in sorted(
                sm.GetService('EVEModXSvc').mods.iteritems()):
            ModEntry(parent=self.modScroll, data=mod_obj)
Esempio n. 5
0
    def Refresh(self, *args):
        self.station_inited = 0
        self.search_inited = 0
        self.filt_inited = 0
        try:
            self.scrollPosition[
                self.key] = self.sr.scroll.GetScrollProportion()
        except:
            self.scrollPosition[self.key] = 0.0

        uix.Flush(self.sr.main)
        self.sr.scroll = uicontrols.Scroll(
            parent=self.sr.main,
            padding=(const.defaultPadding, const.defaultPadding,
                     const.defaultPadding, const.defaultPadding))
        self.sr.scroll.sr.id = 'assets'
        self.sr.scroll.sr.minColumnWidth = {
            localization.GetByLabel('UI/Common/Name'): 44
        }
        self.sr.scroll.allowFilterColumns = 1
        self.sr.scroll.OnNewHeaders = self.ReloadTabs
        self.sr.scroll.sortGroups = True
        self.sr.scroll.SetColumnsHiddenByDefault(
            uix.GetInvItemDefaultHiddenHeaders())
        tabs = [
            [
                localization.GetByLabel('UI/Inventory/AssetsWindow/AllItems'),
                self.sr.scroll, self, 'allitems'
            ],
            [
                localization.GetByLabel('UI/Common/LocationTypes/Region'),
                self.sr.scroll, self, 'regitems'
            ],
            [
                localization.GetByLabel(
                    'UI/Common/LocationTypes/Constellation'), self.sr.scroll,
                self, 'conitems'
            ],
            [
                localization.GetByLabel('UI/Common/LocationTypes/SolarSystem'),
                self.sr.scroll, self, 'sysitems'
            ],
            [
                localization.GetByLabel('UI/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 = uicontrols.TabGroup(name='tabparent',
                                               parent=self.sr.main,
                                               idx=0,
                                               tabs=tabs,
                                               groupID='assetspanel',
                                               silently=True)
 def Load(self, key):
     alliancesLabel = localization.GetByLabel(
         'UI/Corporations/CorporationWindow/Alliances/Alliances')
     sm.GetService('corpui').LoadTop(
         'res:/ui/Texture/WindowIcons/alliances.png', alliancesLabel)
     if not self.sr.Get('inited', 0):
         self.sr.inited = 1
         self.sr.wndViewParent = uiprimitives.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 = uicontrols.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 = uicontrols.TabGroup(name='tabparent',
                                            parent=self,
                                            idx=0)
         self.sr.tabs.Startup(tabs, 'corpaccounts')
         return
     self.LoadViewClass(key)
Esempio n. 7
0
 def Show(self):
     self.wnd = wnd = uicontrols.Window.GetIfOpen(windowID='typedb')
     if wnd:
         self.wnd.Maximize()
         return
     self.wnd = wnd = uicontrols.Window.Open(windowID='typedb')
     wnd.SetWndIcon(None)
     wnd.SetMinSize([350, 270])
     wnd.SetTopparentHeight(0)
     wnd.SetCaption('Type Browser')
     mainpar = uiutil.GetChild(wnd, 'main')
     wnd.sr.tabs = uicontrols.TabGroup(name='tabsparent', parent=mainpar)
     main = uiprimitives.Container(
         name='main',
         parent=mainpar,
         padding=(const.defaultPadding, const.defaultPadding,
                  const.defaultPadding, const.defaultPadding))
     body = uiprimitives.Container(name='body',
                                   parent=main,
                                   align=uiconst.TOALL,
                                   pos=(0, 0, 0, 0))
     wnd.sr.browser = uicontrols.Scroll(name='scroll',
                                        parent=body,
                                        pos=(0, 0, 0, 0))
     wnd.sr.browser.multiSelect = False
     wnd.sr.browser.Startup()
     searchParent = uiprimitives.Container(name='search',
                                           parent=body,
                                           align=uiconst.TOALL,
                                           pos=(0, 0, 0, 0))
     searchTop = uiprimitives.Container(name='search',
                                        parent=searchParent,
                                        height=25,
                                        align=uiconst.TOTOP)
     btn = uicontrols.Button(parent=searchTop,
                             label='Search',
                             func=self.Search,
                             align=uiconst.TORIGHT)
     wnd.sr.input = uicontrols.SinglelineEdit(name='Search',
                                              parent=searchTop,
                                              width=-1,
                                              left=1,
                                              align=uiconst.TOALL)
     uiprimitives.Container(name='div',
                            parent=searchParent,
                            height=5,
                            align=uiconst.TOTOP)
     wnd.sr.input.OnReturn = self.Search
     wnd.sr.scroll = uicontrols.Scroll(parent=searchParent)
     wnd.sr.scroll.multiSelect = False
     wnd.sr.tabs.Startup([['Browse', wnd.sr.browser, self, 0],
                          ['Search', searchParent, self, 1]],
                         'typebrowsertabs')
     self.Search()
     stuff = self.GetContent(None, False)
     wnd.sr.browser.Load(contentList=stuff, headers=['Name', 'typeID'])
     wnd.sr.browser.Sort('Name')
Esempio n. 8
0
 def Load(self, args):
     if not self.sr.Get('inited', False):
         self.sr.inited = 1
         btns = None
         self.toolbarContainer = uiprimitives.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 = uicontrols.Scroll(
             name='standings',
             parent=self,
             padding=(const.defaultPadding, const.defaultPadding,
                      const.defaultPadding, const.defaultPadding))
         self.sr.tabs = uicontrols.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(
         'res:/ui/Texture/WindowIcons/corporationstandings.png',
         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):
     uicontrols.Window.ApplyAttributes(self, attributes)
     self.scope = 'station_inflight'
     self.soldict = {}
     self.sr.main = uiutil.GetChild(self, 'main')
     self.SetWndIcon(self.iconNum, mainTop=-5)
     self.SetMinSize([350, 200])
     uicontrols.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 = uicontrols.Scroll(
         name='scroll',
         parent=self.sr.main,
         padding=(const.defaultPadding, const.defaultPadding,
                  const.defaultPadding, const.defaultPadding))
     self.sr.settingsParent = uiprimitives.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 = uicontrols.TabGroup(name='tabparent',
                                            parent=self.sr.main,
                                            idx=0,
                                            tabs=maintabs,
                                            groupID='capitaljumprangepanel')
Esempio n. 10
0
 def ApplyAttributes(self, attributes):
     uicontrols.Window.ApplyAttributes(self, attributes)
     self.factionalWarStatus = None
     self.topCont = uiprimitives.Container(name='topCont', parent=self.sr.main, align=uiconst.TOTOP, height=140, clipChildren=True, padRight=4)
     self.tabgroup = uicontrols.TabGroup(parent=self.sr.main, align=uiconst.TOTOP)
     self.bottomCont = uiprimitives.Container(name='buttonParent', align=uiconst.TOBOTTOM, height=28, parent=self.sr.main)
     GradientThemeColored(bgParent=self.bottomCont)
     self.warzonePanel = uiprimitives.Container(name='warzonePanel', parent=self.sr.main, padding=const.defaultPadding, state=uiconst.UI_HIDDEN)
     self.statisticsPanel = uiprimitives.Container(name='statisticsPanel', parent=self.sr.main, padding=const.defaultPadding, state=uiconst.UI_HIDDEN)
     self.rulesPanel = uiprimitives.Container(name='rulesPanel', parent=self.sr.main, padding=const.defaultPadding, state=uiconst.UI_HIDDEN)
     uthread.new(self.LoadTabPanels)
Esempio n. 11
0
 def ApplyAttributes(self, attributes):
     uicontrols.Window.ApplyAttributes(self, attributes)
     tabIdx = attributes.tabIdx
     self.isFlat = settings.user.ui.Get('flatFleetView', False)
     self.scope = 'all'
     self.broadcastMenuItems = []
     self.SetTopparentHeight(0)
     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 = uiprimitives.Container(name='myfleet', parent=self.sr.main, align=uiconst.TOALL, pos=(0, 0, 0, 0))
     uiprimitives.Container(name='push', parent=myFleetParent, width=const.defaultPadding, align=uiconst.TOLEFT)
     uiprimitives.Container(name='push', parent=myFleetParent, width=const.defaultPadding, align=uiconst.TORIGHT)
     self.sr.myFleetContent = FleetView(parent=myFleetParent, name='fleetfinderpar', pos=(0, 0, 0, 0))
     broadcastsParent = uiprimitives.Container(name='broadcasts', parent=self.sr.main, align=uiconst.TOALL, pos=(0, 0, 0, 0))
     self.broadcastsContent = FleetBroadcastView(parent=broadcastsParent, name='fleetfinderpar', pos=(0, 0, 0, 0))
     fleetFinderParent = uiprimitives.Container(name='fleetfinder', parent=self.sr.main, align=uiconst.TOALL, pos=(0, 0, 0, 0))
     self.fleetFinderContent = FleetFinderWindow(parent=fleetFinderParent, name='fleetfinderpar', pos=(0, 0, 0, 0))
     settingsParent = uiprimitives.Container(name='settings', parent=self.sr.main, align=uiconst.TOALL, pos=(0, 0, 0, 0))
     self.startPage = uiprimitives.Container(name='startpage', parent=self.sr.main, align=uiconst.TOALL, state=uiconst.UI_HIDDEN)
     myFleetParent.children.append(self.startPage)
     self.sr.tabs = uicontrols.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()
Esempio n. 12
0
 def ApplyAttributes(self, attributes):
     uicontrols.Window.ApplyAttributes(self, attributes)
     self.isChangingOrder = False
     self.loadedTab = None
     self.waypointBtns = uicontrols.ButtonGroup(
         parent=self.sr.main,
         btns=[[
             localization.GetByLabel('UI/Map/MapPallet/btnOptimizeRoute'),
             sm.GetService('autoPilot').OptimizeRoute, (), 66
         ]])
     self.sr.waypointopt = uiprimitives.Container(
         name='waypointopt',
         parent=self.sr.main,
         align=uiconst.TOBOTTOM,
         clipChildren=True,
         padding=(const.defaultPadding, 0, const.defaultPadding, 0))
     self.sr.scroll2 = uicontrols.Scroll(parent=self.sr.main,
                                         padding=const.defaultPadding)
     self.sr.scroll2.sr.id = 'autopilotSettings'
     self.sr.scroll2.sr.content.OnDropData = self.MoveWaypoints
     uicontrols.EveLabelMedium(text=localization.GetByLabel(
         'UI/Map/MapPallet/lblChangeWaypointPriority'),
                               parent=self.sr.waypointopt,
                               pos=(3, 2, 0, 0))
     checkbox = uicontrols.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 = uicontrols.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
Esempio n. 13
0
 def ApplyAttributes(self, attributes):
     uicontrols.Window.ApplyAttributes(self, attributes)
     self.tabs = uicontrols.TabGroup(parent=self.sr.maincontainer)
     self.windowsEventPanel = WindowsEventPanel(parent=self.sr.maincontainer)
     self.uiEventPanel = UIEventPanel(parent=self.sr.maincontainer)
     self.uiGlobalEventPanel = UIGlobalEventPanel(parent=self.sr.maincontainer)
     self.shortcutPanel = UIShortcutPanel(parent=self.sr.maincontainer)
     self.helpPanel = 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)
Esempio n. 14
0
 def ApplyAttributes(self, attributes):
     uicontrols.Window.ApplyAttributes(self, attributes)
     self.mailingListID = attributes.mailingListID
     self.mlsvc = sm.GetService('mailinglists')
     self.groupName = self.mlsvc.GetDisplayName(self.mailingListID)
     self.SetMinSize([350, 350])
     self.SetCaption(
         localization.GetByLabel('UI/EVEMail/MailingLists/Caption',
                                 mailinglistName=self.groupName))
     self.welcomeText = None
     self.sr.tabs = uicontrols.TabGroup(name='tabs', parent=self.sr.main)
     self.sr.membersPanel = uiprimitives.Container(name='membersPanel',
                                                   parent=self.sr.main,
                                                   align=uiconst.TOALL,
                                                   pos=(0, 0, 0, 0),
                                                   padding=(PAD, PAD, PAD,
                                                            PAD))
     self.sr.accessPanel = uiprimitives.Container(name='accessPanel',
                                                  parent=self.sr.main,
                                                  align=uiconst.TOALL,
                                                  pos=(0, 0, 0, 0),
                                                  padding=(PAD, PAD, PAD,
                                                           0))
     self.sr.welcomePanel = uiprimitives.Container(name='welcomePanel',
                                                   parent=self.sr.main,
                                                   align=uiconst.TOALL,
                                                   pos=(0, 0, 0, 0),
                                                   padding=(PAD, PAD, PAD,
                                                            0))
     tabs = [
         [
             localization.GetByLabel('UI/EVEMail/MailingLists/MembersTab'),
             self.sr.membersPanel, self, 'members'
         ],
         [
             localization.GetByLabel('UI/EVEMail/MailingLists/AccessTab'),
             self.sr.accessPanel, self, 'access'
         ],
         [
             localization.GetByLabel(
                 'UI/EVEMail/MailingLists/WelcomeMailTab'),
             self.sr.welcomePanel, self, 'welcome'
         ]
     ]
     self.StartupMembersPanel()
     self.StartupAccessPanel()
     self.StartupWelcomePanel()
     self.sr.tabs.Startup(tabs, 'mailinglistSetup_tabs', autoselecttab=1)
    def ReloadTabs(self, selectTab=None):
        """
            Reloads the tab list. This is necessary because the TabGroup object does not
            support dynamic addition/removal of tabs.
        
            If this is the first time that tabs are being created, it will autoselect
            the first tab in the tabgroup.
        
            ARGUMENTS:
                selectTab       An integer representing the index of the tab to be
                                selected in the self.tabs list.
                                Defaults to None. If None, it will not change the
                                tab selection.
            RETURNS:
                None
        """
        if not self.tabs or len(self.tabs) < 1:
            return
        tabs = []
        for tab in self.tabs:
            tabData = 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:
            import uicontrols
            tabGroup = uicontrols.TabGroup(name='tabparent',
                                           parent=self.tabBar,
                                           minTabsize=50,
                                           maxTabsize=200,
                                           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)
Esempio n. 16
0
 def CreateWindow(self):
     self.LogInfo('CreateWindow')
     self.wndTabs = uicontrols.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')
Esempio n. 17
0
 def ApplyAttributes(self, attributes):
     uicontrols.Window.ApplyAttributes(self, attributes)
     self.SetScope('station_inflight')
     self.SetWndIcon(self.default_iconNum)
     self.SetMinSize([300, 458], 1)
     self.LockWidth(300)
     self.SetTopparentHeight(64)
     self.MakeUnpinable()
     self.MouseDown = self.OnWndMouseDown
     self.supportLoaded = False
     self.tutorialsLoaded = False
     supportPar = uiprimitives.Container(name='supportPar',
                                         parent=self.sr.main,
                                         left=const.defaultPadding,
                                         top=const.defaultPadding,
                                         width=const.defaultPadding,
                                         height=const.defaultPadding)
     tutorialsPar = uiprimitives.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 = uicontrols.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
     uicontrols.CaptionLabel(
         text=localization.GetByLabel('UI/Help/EveHelp'),
         parent=self.sr.topParent,
         align=uiconst.CENTERLEFT,
         left=70)
Esempio n. 18
0
 def CreateWindow(self):
     self.sr.inited = 1
     self.sr.rejectedContainer = uiprimitives.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 = uicontrols.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 = uicontrols.Scroll(name='applications', parent=self, padding=(const.defaultPadding,
      const.defaultPadding,
      const.defaultPadding,
      const.defaultPadding))
     self.sr.tabs = uicontrols.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')
Esempio n. 19
0
    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, 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

                uiprimitives.Container(name='leftpush',
                                       parent=self.new,
                                       align=uiconst.TOLEFT,
                                       width=6,
                                       idx=idx)
                uiprimitives.Container(name='rightpush',
                                       parent=self.new,
                                       align=uiconst.TORIGHT,
                                       width=6,
                                       idx=idx)
                uiprimitives.Line(parent=self.new,
                                  align=uiconst.TOLEFT,
                                  idx=idx)
                uiprimitives.Line(parent=self.new,
                                  align=uiconst.TORIGHT,
                                  idx=idx)

        if wipe and len(self.tabgroup):
            tabs = uicontrols.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)
Esempio n. 20
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 = uicontrols.TabGroup(name='tabparent2',
                                                        parent=self.sr.main,
                                                        idx=idx + 1)
             tabs = [
                 [
                     localization.GetByLabel('UI/Common/ItemTypes/Ships'),
                     self.sr.scroll, self,
                     '%sships' % key
                 ],
                 [
                     localization.GetByLabel('UI/Common/ItemTypes/Modules'),
                     self.sr.scroll, self,
                     '%smodules' % key
                 ],
                 [
                     localization.GetByLabel('UI/Common/ItemTypes/Charges'),
                     self.sr.scroll, self,
                     '%scharges' % key
                 ],
                 [
                     localization.GetByLabel(
                         'UI/Common/ItemTypes/Minerals'), self.sr.scroll,
                     self,
                     '%sminerals' % key
                 ],
                 [
                     localization.GetByLabel('UI/Common/Other'),
                     self.sr.scroll, self,
                     '%sother' % key
                 ]
             ]
             self.station_inited = 1
             self.sr.station_tabs.Startup(tabs,
                                          'assetsatstation',
                                          silently=True)
         if self.sr.Get('filt_cont', None):
             self.sr.filt_cont.state = uiconst.UI_HIDDEN
         self.sr.station_tabs.state = uiconst.UI_NORMAL
         if self.sr.Get('search_cont', None):
             self.sr.search_cont.state = uiconst.UI_HIDDEN
         if key != 'station':
             self.ShowStationItems(key[7:])
         else:
             self.sr.station_tabs.AutoSelect(1)
     elif key in ('allitems', 'regitems', 'conitems', 'sysitems'):
         if not getattr(self, 'filt_inited', False):
             self.sr.filt_cont = uiprimitives.Container(align=uiconst.TOTOP,
                                                        height=67,
                                                        parent=self.sr.main,
                                                        top=2,
                                                        idx=1)
             self.sr.sortcombo = uicontrols.Combo(
                 label=localization.GetByLabel('UI/Common/SortBy'),
                 parent=self.sr.filt_cont,
                 options=self.sortOptions,
                 name='sortcombo',
                 select=None,
                 callback=self.Filter,
                 width=115,
                 pos=(5, 16, 0, 0))
             l = self.sr.sortcombo.width + self.sr.sortcombo.left + const.defaultPadding
             self.sr.filtcombo = uicontrols.Combo(
                 label=localization.GetByLabel('UI/Common/View'),
                 parent=self.sr.filt_cont,
                 options=[],
                 name='filtcombo',
                 select=None,
                 callback=self.Filter,
                 width=115,
                 pos=(l, 16, 0, 0))
             self.sr.filt_cont.height = self.sr.filtcombo.top + self.sr.filtcombo.height
             self.filt_inited = 1
         self.sr.filt_cont.state = uiconst.UI_PICKCHILDREN
         if key in ('regitems', 'conitems', 'sysitems'):
             self.sr.filtcombo.state = uiconst.UI_NORMAL
         else:
             self.sr.filtcombo.state = uiconst.UI_HIDDEN
         if self.sr.Get('station_tabs', None):
             self.sr.station_tabs.state = uiconst.UI_HIDDEN
         if self.sr.Get('search_cont', None):
             self.sr.search_cont.state = uiconst.UI_HIDDEN
         self.ShowAll(key, None, None)
     elif key == 'search':
         if self.sr.Get('station_tabs', None):
             self.sr.station_tabs.state = uiconst.UI_HIDDEN
         if not self.search_inited:
             self.sr.search_cont = uiprimitives.Container(
                 align=uiconst.TOTOP, height=37, parent=self.sr.main, idx=1)
             uiprimitives.Container(name='comboCont',
                                    align=uiconst.TOLEFT,
                                    parent=self.sr.search_cont,
                                    width=100 + const.defaultPadding)
             top = const.defaultPadding + 14
             self.sr.sortcombosearch = uicontrols.Combo(
                 label=localization.GetByLabel('UI/Common/SortBy'),
                 parent=self.sr.search_cont,
                 options=self.sortOptions,
                 name='sortcombosearch',
                 select=None,
                 callback=self.Search,
                 width=100,
                 pos=(const.defaultPadding, top, 0, 0))
             buttonCont = uiprimitives.Container(name='bottonCont',
                                                 align=uiconst.TORIGHT,
                                                 parent=self.sr.search_cont)
             sprite = uiprimitives.Sprite(
                 name='questionMarkSprite',
                 parent=buttonCont,
                 align=uiconst.TOPRIGHT,
                 pos=(const.defaultPadding, top, 20, 20),
                 state=uiconst.UI_NORMAL,
                 texturePath='res:/UI/Texture/Icons/105_32_32.png',
                 opacity=0.75)
             sprite.LoadTooltipPanel = self.LoadInfoTooltip
             button = uicontrols.Button(
                 parent=buttonCont,
                 label=localization.GetByLabel('UI/Common/Buttons/Search'),
                 left=sprite.left + sprite.width + const.defaultPadding,
                 top=top,
                 func=self.Search,
                 align=uiconst.TOPRIGHT)
             buttonCont.width = button.width + const.defaultPadding * 3 + sprite.width
             self.sr.searchtype = 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 = uiprimitives.Container(name='ourWarsCont',
                                                   parent=self,
                                                   align=uiconst.TOALL)
         toolbarContainer = uiprimitives.Container(name='toolbarContainer',
                                                   align=uiconst.TOBOTTOM,
                                                   parent=self.ourWarsCont,
                                                   height=22)
         declareButton = uicontrols.ButtonGroup(btns=[[
             localization.GetByLabel(
                 'UI/Corporations/CorporationWindow/Alliances/Rankings/DeclareWar'
             ), self.DeclareWar, None, None
         ]],
                                                parent=toolbarContainer)
         self.ourWarsScroll = uicontrols.Scroll(
             parent=self.ourWarsCont, padding=const.defaultPadding)
         self.allWarsCont = uiprimitives.Container(name='allWarsCont',
                                                   parent=self,
                                                   align=uiconst.TOALL)
         allWarsSettingsCont = uiprimitives.Container(
             name='allWarsSettingsCont',
             parent=self.allWarsCont,
             align=uiconst.TOTOP,
             height=18,
             top=2)
         browseCont = uiprimitives.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 = uicontrols.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 = uicontrols.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 = uicontrols.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 = uicontrols.Scroll(
             parent=self.allWarsCont, padding=const.defaultPadding)
         self.killReportsCont = uiprimitives.Container(
             name='killReportsCont', parent=self, align=uiconst.TOALL)
         killSettingsContainer = uiprimitives.Container(
             name='killSettingsContainer',
             parent=self.killReportsCont,
             align=uiconst.TOTOP,
             height=20)
         self.killReportQuickFilter = uicls.QuickFilterEdit(
             parent=killSettingsContainer,
             left=const.defaultPadding,
             align=uiconst.CENTERRIGHT,
             width=150)
         self.killReportQuickFilter.ReloadFunction = self.ReloadKillReports
         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 = uicontrols.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 = uicontrols.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 = uiprimitives.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 = uicontrols.TabGroup(name='tabparent', parent=self, idx=0)
         tabs.Startup(warTabs, 'corporationwars')
         self.tabs = tabs
         self.killentries = 25
     sm.GetService('corpui').LoadTop(
         'res:/ui/Texture/WindowIcons/wars.png',
         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 = ''
     if args != 'wars':
         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 = []
         self.combatPageNum = 0
         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(
         'res:/ui/Texture/WindowIcons/wars.png',
         localization.GetByLabel(
             'UI/Corporations/CorporationWindow/Wars/WarsTitle'), extrahint)
Esempio n. 22
0
 def OnInitializePanel(self):
     if not self or self.destroyed:
         return
     self.sr.inited = 1
     if not self.sr.Get('offices'):
         self.sr.offices = None
     self.topContainer = uiprimitives.Container(name='topContainer', align=uiconst.TOTOP, parent=self, height=54)
     self.mainContainer = uiprimitives.Container(name='mainContainer', align=uiconst.TOALL, pos=(0, 0, 0, 0), parent=self)
     self.logoContainer = uiprimitives.Container(name='logoContainer', align=uiconst.TOLEFT, parent=self.topContainer, width=60)
     self.captionContainer = uiprimitives.Container(name='captionContainer', align=uiconst.TOALL, pos=(10, 8, 10, 8), parent=self.topContainer)
     self.LoadLogo(eve.session.corpid)
     bulletinParent = uiprimitives.Container(name='bulletinParent', parent=self.mainContainer, align=uiconst.TOALL, pos=(0, 0, 0, 0))
     detailsParent = uiprimitives.Container(name='detailsParent', parent=self.mainContainer, align=uiconst.TOALL, pos=(0, 0, 0, 0))
     tabs = [[localization.GetByLabel('UI/Common/Details'),
       detailsParent,
       self,
       'details']]
     if not util.IsNPC(session.corpid):
         tabs.insert(0, [localization.GetByLabel('UI/Corporations/CorpUIHome/Bulletins'),
          bulletinParent,
          self,
          'bulletin'])
     self.sr.tabs = uicontrols.TabGroup(name='corphometabs', parent=self.mainContainer, idx=0)
     self.sr.tabs.Startup(tabs, 'corphometabs')
     btns = []
     if const.corpRoleChatManager & eve.session.corprole == const.corpRoleChatManager:
         btns.append([localization.GetByLabel('UI/Corporations/CorpUIHome/AddBulletin'),
          self.AddBulletin,
          None,
          None])
         uicontrols.ButtonGroup(btns=btns, parent=bulletinParent, line=0, unisize=1)
     if not util.IsNPC(session.corpid):
         self.messageArea = uicontrols.Scroll(parent=bulletinParent, padding=const.defaultPadding)
         self.LoadBulletins()
     btns = []
     if getattr(self, 'canEditCorp', False):
         btns.append([localization.GetByLabel('UI/Corporations/CorpUIHome/EditDetails'),
          self.EditDetails,
          None,
          None])
     if sm.GetService('corp').UserIsCEO():
         btns.append([localization.GetByLabel('UI/Corporations/CorpUIHome/Dividends'),
          self.PayoutDividendForm,
          None,
          None])
         btns.append([localization.GetByLabel('UI/Corporations/CorpUIHome/Divisions'),
          self.DivisionsForm,
          None,
          None])
     else:
         btns.append([localization.GetByLabel('UI/Corporations/CorpUIHome/CreateNewCorp'),
          self.CreateCorpForm,
          None,
          None])
         if not util.IsNPC(eve.session.corpid):
             corpSvc = sm.StartService('corp')
             canLeave, error, errorDetails = corpSvc.CanLeaveCurrentCorporation()
             if not canLeave and error == 'CrpCantQuitNotInStasis':
                 btns.append([localization.GetByLabel('UI/Corporations/CorpUIHome/PrepareQuitCorporation'),
                  self.RemoveAllRoles,
                  None,
                  None])
             else:
                 btns.append([localization.GetByLabel('UI/Corporations/CorpUIHome/QuitCorp'),
                  self.ResignFromCorp,
                  None,
                  None])
             if corpSvc.UserBlocksRoles():
                 btns.append([localization.GetByLabel('UI/Corporations/Common/AllowCorpRoles'),
                  self.AllowRoles,
                  None,
                  None])
     uicontrols.ButtonGroup(btns=btns, parent=detailsParent, line=0, unisize=1)
     self.sr.scroll = uicontrols.Scroll(name='detailsScroll', parent=detailsParent, padding=(const.defaultPadding,
      const.defaultPadding,
      const.defaultPadding,
      const.defaultPadding))
     self.LoadScroll()
Esempio n. 23
0
    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 = uiprimitives.Container(name='underlayContainer',
                                     parent=self,
                                     align=uiconst.TOTOP,
                                     height=borderHeight)
        self.sr.underlay2 = uicontrols.WindowUnderlay(parent=par)
        self.sr.underlay2.padding = (-16, -16, -16, 0)
        bottomPar = uiprimitives.Container(name='underlayContainer_Bottom',
                                           parent=self,
                                           align=uiconst.TOBOTTOM,
                                           height=borderHeight + 6)
        bottomUnderlay = uicontrols.WindowUnderlay(parent=bottomPar)
        bottomUnderlay.padding = (-16, 6, -16, -16)
        if trinity.app.fullscreen:
            closex = uicontrols.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 = uiprimitives.Container(
            name='mainBrowserParent',
            parent=self,
            align=uiconst.CENTER,
            state=uiconst.UI_HIDDEN,
            width=800,
            height=440,
            idx=0)
        self.mainBrowser = uicontrols.Edit(parent=self.mainBrowserParent,
                                           padding=(8, 18, 8, 8),
                                           readonly=1)
        mainclosex = uicontrols.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 = uicontrols.WindowUnderlay(parent=self.mainBrowserParent)
        self.eulaParent = uiprimitives.Container(name='eulaParent',
                                                 parent=self,
                                                 align=uiconst.CENTER,
                                                 state=uiconst.UI_HIDDEN,
                                                 width=800,
                                                 height=440,
                                                 idx=0)
        eulaCont = uiprimitives.Container(name='eulaCont',
                                          parent=self.eulaParent,
                                          align=uiconst.TOALL,
                                          padding=(0, 18, 0, 0))
        browser = uicontrols.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 = uicontrols.WindowUnderlay(
            parent=self.eulaParent)
        self.maintabs = uicontrols.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 = uicontrols.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 = uiprimitives.Container(name='bottomArea',
                                            parent=bottomPar,
                                            idx=0,
                                            pos=(0, 0, 0, 0))
        bottomSub = uiprimitives.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 = uicontrols.SinglelineEdit(name='username',
                                         parent=bottomSub,
                                         pos=(editsleft, editstop, editswidth,
                                              0),
                                         maxLength=64)
        edit.SetHistoryVisibility(0)
        t1 = uicontrols.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 = uicontrols.SinglelineEdit(name='password',
                                         parent=bottomSub,
                                         pos=(editsleft,
                                              edit.top + edit.height + 6,
                                              editswidth, 0),
                                         maxLength=64)
        t2 = uicontrols.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 = uicontrols.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 = uiprimitives.Container(parent=bottomSub,
                                                 left=editsleft + editswidth +
                                                 6,
                                                 top=editstop)
        self.serverNameTextControl = uicontrols.EveLabelSmall(
            text=localization.GetByLabel('UI/Login/CheckingStatus'),
            parent=statusContainer,
            align=uiconst.TOTOP,
            state=uiconst.UI_DISABLED)
        self.serverStatusTextControl = uicontrols.EveLabelSmall(
            parent=statusContainer,
            align=uiconst.TOTOP,
            state=uiconst.UI_DISABLED)
        self.serverPlayerCountTextControl = uicontrols.EveLabelSmall(
            parent=statusContainer,
            align=uiconst.TOTOP,
            state=uiconst.UI_DISABLED)
        self.serverVersionTextControl = uicontrols.EveLabelSmall(
            parent=statusContainer,
            align=uiconst.TOTOP,
            state=uiconst.UI_DISABLED)
        self.motdParent = uiprimitives.Container(name='motdParent',
                                                 parent=self,
                                                 align=uiconst.CENTERBOTTOM,
                                                 top=borderHeight + 16,
                                                 width=400,
                                                 height=64,
                                                 state=uiconst.UI_HIDDEN)
        motdLabel = uicontrols.EveLabelMedium(parent=self.motdParent,
                                              align=uiconst.CENTER,
                                              width=360,
                                              state=uiconst.UI_NORMAL)
        self.motdLabel = motdLabel
        uicontrols.BumpedUnderlay(parent=self.motdParent, name='background')
        versionstr = localization.GetByLabel('UI/Login/Version',
                                             versionNumber=GetVersion())
        uicontrols.EveLabelSmall(text=versionstr,
                                 parent=self,
                                 left=6,
                                 top=6,
                                 idx=0,
                                 state=uiconst.UI_NORMAL)
        self.pushButtons = uicls.ToggleButtonGroup(
            parent=bottomPar,
            align=uiconst.CENTERTOP,
            idx=0,
            top=12,
            width=120,
            callback=self.OnButtonSelected)
        for btnID, label, panel in (
            ('settings', localization.GetByLabel('UI/Login/Settings'), None),
            ('eula', localization.GetByLabel('UI/Login/EULA/EULAHeader'),
             self.eulaParent)):
            self.pushButtons.AddButton(btnID, label, panel)

        if boot.region == 'optic':
            self.eulaCRC = zlib.adler32(str(boot.version))
        else:
            self.eulaCRC = zlib.adler32(buffer(self.GetEulaCCP()))
        eulaAgreed = True
        if not eulaAgreed:
            self.GetEulaConfirmation()
        else:
            if pushBtnArgs:
                self.pushButtons.SelectByID(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 = uiprimitives.Container(name='esrbParent',
                                          parent=bottomArea,
                                          align=uiconst.TOPLEFT,
                                          top=editstop,
                                          width=useWidth,
                                          height=useHeight,
                                          state=uiconst.UI_NORMAL,
                                          idx=0,
                                          left=20)
            sprite = uiprimitives.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)
Esempio n. 24
0
 def Load(self, key):
     sm.GetService('corpui').LoadTop('res:/ui/Texture/WindowIcons/assetscorp.png', 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 = uicontrols.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 = uicontrols.TabGroup(name='tabparent', parent=self, idx=0)
         tabs = [[localization.GetByLabel('UI/Corporations/Common/Offices'),
           self.sr.scroll,
           self,
           FLAGNAME_OFFICES],
          [localization.GetByLabel('UI/Corporations/Assets/Impounded'),
           self.sr.scroll,
           self,
           FLAGNAME_IMPOUNDED],
          [localization.GetByLabel('UI/Corporations/Assets/InSpace'),
           self.sr.scroll,
           self,
           FLAGNAME_PROPERTY],
          [localization.GetByLabel('UI/Corporations/Assets/Deliveries'),
           self.sr.scroll,
           self,
           FLAGNAME_DELIVERIES],
          [localization.GetByLabel('UI/Corporations/Assets/Lockdown'),
           self.sr.scroll,
           self,
           KEYNAME_LOCKDOWN],
          [localization.GetByLabel('UI/Common/Search'),
           self.sr.scroll,
           self,
           KEYNAME_SEARCH]]
         if self.IsDirector():
             self.safetyParent = uiprimitives.Container(parent=self)
             safetyTabInfo = [localization.GetByLabel('UI/Inventory/AssetSafety/Safety'),
              self.safetyParent,
              self,
              KEYNAME_SAFETY]
             tabs.insert(-1, safetyTabInfo)
         self.sr.tabs.Startup(tabs, '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 = FLAGNAME_OFFICES
         self.sr.tabs.AutoSelect()
         return
     if key not in (KEYNAME_SEARCH, KEYNAME_SAFETY):
         if not getattr(self, 'filt_inited', False):
             self.InitAssetFilters()
         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 (KEYNAME_LOCKDOWN,):
         uthread.new(self.ShowLockdown, None, None)
     elif key == KEYNAME_SEARCH:
         self.sr.scroll.OnNewHeaders = self.Search
         uthread.new(self.ShowSearch)
     elif key == KEYNAME_SAFETY:
         if self.safetyCont is None or self.safetyCont.destroyed:
             self.safetyCont = AssetSafetyCont(parent=self.safetyParent, padding=4, controller=SafetyControllerCorp())
         self.safetyCont.display = True
         self.safetyCont.Load()
     else:
         uthread.new(self.ShowAssets, key, None, None)
Esempio n. 25
0
 def Load(self, args):
     self.voteTypes = {
         const.voteCEO:
         localization.GetByLabel(
             'UI/Corporations/CorpSanctionableActions/NewCEO'),
         const.voteWar:
         localization.GetByLabel(
             'UI/Corporations/CorpSanctionableActions/DeclarationOfWar'),
         const.voteShares:
         localization.GetByLabel(
             'UI/Corporations/CorpSanctionableActions/CreationOfShares'),
         const.voteKickMember:
         localization.GetByLabel(
             'UI/Corporations/CorpSanctionableActions/Expulsion'),
         const.voteGeneral:
         localization.GetByLabel(
             'UI/Corporations/CorpSanctionableActions/GeneralVote'),
         const.voteItemUnlock:
         localization.GetByLabel(
             'UI/Corporations/CorpSanctionableActions/UnlockBlueprint'),
         const.voteItemLockdown:
         localization.GetByLabel(
             'UI/Corporations/CorpSanctionableActions/LockBlueprint')
     }
     self.headers = [
         localization.GetByLabel(
             'UI/Corporations/CorpSanctionableActions/Type'),
         localization.GetByLabel(
             'UI/Corporations/CorpSanctionableActions/Title'),
         localization.GetByLabel(
             'UI/Corporations/CorpSanctionableActions/Description'),
         localization.GetByLabel(
             'UI/Corporations/CorpSanctionableActions/Expires'),
         localization.GetByLabel(
             'UI/Corporations/CorpSanctionableActions/ActedUpon'),
         localization.GetByLabel(
             'UI/Corporations/CorpSanctionableActions/InEffect'),
         localization.GetByLabel(
             'UI/Corporations/CorpSanctionableActions/Rescinded')
     ]
     if not self.sr.Get('inited', 0):
         self.sr.inited = 1
         self.toolbarContainer = uiprimitives.Container(
             name='toolbarContainer', align=uiconst.TOBOTTOM, parent=self)
         buttonOptions = [[
             localization.GetByLabel(
                 'UI/Corporations/CorpSanctionableActions/ShowAll'),
             self.ShowSanctionableActionsNotInEffect, True, 81
         ]]
         btns = uicontrols.ButtonGroup(btns=buttonOptions,
                                       parent=self.toolbarContainer)
         self.toolbarContainer.height = btns.height
         self.sr.mainBtns = btns
         self.sr.scroll = uicontrols.Scroll(
             name='sanctionableactions',
             parent=self,
             padding=(const.defaultPadding, const.defaultPadding,
                      const.defaultPadding, const.defaultPadding))
         self.sr.tabs = uicontrols.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(
         'res:/ui/Texture/WindowIcons/sanctionableactions.png',
         localization.GetByLabel(
             'UI/Corporations/CorpSanctionableActions/SanctionableActions'))
     if args == 'ineffect':
         self.ShowSanctionableActionsInEffect()
     elif args == 'notineffect':
         self.ShowSanctionableActionsNotInEffect()
Esempio n. 26
0
    def Initialize(self, wnd, panelName=None, subPanelName=None):
        self.subPanelName = subPanelName
        while eve.session.mutating:
            blue.pyos.BeNice()

        wnd.ShowLoad()
        uix.Flush(wnd.sr.main)
        self.toparea = uiprimitives.Container(parent=wnd.sr.main,
                                              name='corptop',
                                              pos=(0, 0, 0, 54),
                                              align=uiconst.TOTOP,
                                              state=uiconst.UI_NORMAL)
        GlowSprite(
            parent=self.toparea,
            name='simplepic',
            pos=(4, 0, 64, 64),
            texturePath='res:/ui/Texture/WindowIcons/sanctionableactions.png')
        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.autoKicks = 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(
            )
            hasGrantableRoles = grantableRoles | grantableRolesAtHQ | grantableRolesAtBase | grantableRolesAtOther
            if session.corprole & const.corpRolePersonnelManager | hasGrantableRoles:
                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)
                if self.IsOldRolesEnabled():
                    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 self.IsNewRolesEnabled():
                    self.newRoles = form.CorpRolesNew(
                        name='corpRolesNew',
                        pos=(0, 0, 0, 0),
                        corp=sm.GetService('corp').GetCorporation())
                    wnd.sr.main.children.append(self.newRoles)
                    membersTabEntries.append([
                        localization.GetByLabel(
                            'UI/Corporations/BaseCorporationUI/RoleManagement'
                        ), self.newRoles, self.newRoles, 'newRoles'
                    ])
                    self.panels['members'].append(self.newRoles)
            if const.corpRoleDirector & eve.session.corprole == const.corpRoleDirector:
                self.autoKicks = CorpAutoKicks(name='autoKicks',
                                               pos=(0, 0, 0, 0))
                wnd.sr.main.children.append(self.autoKicks)
                membersTabEntries.append([
                    localization.GetByLabel(
                        'UI/Corporations/BaseCorporationUI/AutoKickManagement'
                    ), self.autoKicks, self.autoKicks, 'autoKicks', None,
                    localization.GetByLabel(
                        'UI/Corporations/BaseCorporationUI/AutoKickDescription'
                    )
                ])
                self.panels['members'].append(self.autoKicks)
            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 = uicontrols.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 = uicontrols.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 = uicontrols.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.ResetWindow()
            return
        uiutil.SetOrder(wnd.sr.maintabs, 0)
        wnd.HideLoad()
        wnd.state = uiconst.UI_NORMAL
        uthread.new(sm.StartService('wallet').AskSetWalletDivision)
Esempio n. 27
0
 def ApplyAttributes(self, attributes):
     uicontrols.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(self.iconNum)
     self.SetMainIconSize(40)
     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 = uicontrols.Scroll(parent=self.sr.main, padding=(const.defaultPadding,
      const.defaultPadding,
      const.defaultPadding,
      const.defaultPadding))
     self.sr.scroll.sr.id = 'mapspalletescroll_withsort'
     self.sr.scroll2 = uicontrols.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 = ([localization.GetByLabel('UI/Map/MapPallet/btnCloseMap'),
       sm.GetService('viewState').CloseSecondaryView,
       (),
       80], [toggleMapLabel,
       self.ToggleMapMode,
       (),
       130], [toggleFlatLabel,
       self.ClickToggleFlatten,
       'self',
       80])
     self.sr.flattenBtns = uicontrols.ButtonGroup(btns=btns, parent=self.sr.topParent, align=uiconst.CENTER, line=0, idx=0, fixedWidth=True, unisize=False)
     searchpar = uiprimitives.Container(name='searchpar', parent=self.sr.main, align=uiconst.TOTOP, pos=(0, 0, 0, 40), idx=0)
     searchpar.OnTabSelect = self.GiveInputFocus
     inpt = uicontrols.SinglelineEdit(name='', parent=searchpar, pos=(5, 22, 98, 0), maxLength=64)
     inpt.OnReturn = self.OnReturnSearch
     self.sr.searchinput = inpt
     uicontrols.EveLabelSmall(text=localization.GetByLabel('UI/Map/MapPallet/lblSearchForLocation'), parent=inpt, left=0, top=-14, state=uiconst.UI_DISABLED)
     uicontrols.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 = uicontrols.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 = uicontrols.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 ApplyAttributes(self, attributes):
        uicontrols.Window.ApplyAttributes(self, attributes)
        self.corpStationMgr = None
        self.services = None
        self.servicesByID = None
        self.station = None
        self.solarsystem = None
        self.serviceAccessRulesByServiceID = None
        self.modifiedServiceAccessRulesByServiceID = None
        self.serviceCostModifiers = None
        self.modifiedServiceCostModifiers = None
        self.rentableItems = None
        self.modifiedRentableItems = None
        self.ddxFunction = None
        self.ddxArguments = {}
        sm.GetService('loading').ProgressWnd(localization.GetByLabel('UI/Station/StationManagment/StationDetails'), localization.GetByLabel('UI/Common/GettingData'), 1, 4)
        self.SetScope('station')
        self.SetCaption(localization.GetByLabel('UI/Station/StationManagment/StationManagment'))
        self.SetMinSize([400, 300])
        defaultPadding = (const.defaultPadding,
         const.defaultPadding,
         const.defaultPadding,
         const.defaultPadding)
        self.sr.scroll = uicontrols.Scroll(parent=self.sr.main, padding=defaultPadding)
        self.sr.scroll2 = uicontrols.Scroll(parent=self.sr.main, padding=defaultPadding)
        self.sr.scroll2.sr.id = 'station_management_scroll2'
        self.sr.standardBtns = uicontrols.ButtonGroup(btns=[[localization.GetByLabel('UI/Common/Buttons/OK'),
          self.OnOK,
          (),
          81], [localization.GetByLabel('UI/Common/Buttons/Cancel'),
          self.OnCancel,
          (),
          81]])
        self.sr.main.children.insert(0, self.sr.standardBtns)
        self.sr.hint = None
        cap = uicontrols.CaptionLabel(text=cfg.evelocations.Get(eve.session.stationid).name, parent=self.sr.topParent, align=uiconst.CENTERLEFT, left=74, width=320)
        self.SetTopparentHeight(max(70, cap.height))
        self.DisplayLogo()
        self.ShowLoad()
        sm.GetService('loading').ProgressWnd(localization.GetByLabel('UI/Station/StationServices'), localization.GetByLabel('UI/Common/GettingData'), 2, 4)
        self.LoadServices()
        self.LoadData()
        self.HideLoad()
        if not self or not self or self.destroyed:
            return

        def CreateTab(label, arg, useScroll2 = False):
            scroll = self.sr.scroll
            if useScroll2:
                scroll = self.sr.scroll2
            return [localization.GetByLabel(label),
             scroll,
             self,
             arg,
             scroll]

        maintabs = uicontrols.TabGroup(name='tabparent', parent=self.sr.main, idx=0, groupID='stationmanagementpanel')
        maintabs.Startup([CreateTab('UI/Station/StationManagment/StationDetails', 'station_details'), CreateTab('UI/Station/StationManagment/ServiceAccessControl', 'station_service_access_control')], groupID='stationmanagementpanel')
        tabs = [CreateTab('UI/Station/StationManagment/CostModifiers', 'cost_modifiers'), CreateTab('UI/Station/StationManagment/CloneContracts', 'clone_contracts')]
        serviceMask = self.GetStationServiceMask()
        if const.stationServiceOfficeRental == const.stationServiceOfficeRental & serviceMask:
            tabs.append(CreateTab('UI/Corporations/Common/Offices', 'offices', useScroll2=True))
        if self.ShouldDisplayImprovements():
            tabs.append(CreateTab('UI/Station/StationManagment/StationImprovements', 'improvements'))
        subtabs = uicontrols.TabGroup(name='tabparent', parent=self.sr.main, idx=1, groupID='stationmanagementpanel')
        subtabs.Startup(tabs, groupID='stationmanagementpanel', autoselecttab=0)
        self.sr.maintabs = maintabs
        self.sr.subtabs = subtabs
        self.sr.maintabs.AddRow(subtabs)
        self.sr.maintabs.AutoSelect()
        sm.GetService('loading').ProgressWnd(localization.GetByLabel('UI/Commands/ProgressDone'), localization.GetByLabel('UI/Common/GettingData'), 4, 4)
Esempio n. 29
0
 def SetupContainers(self):
     findFleetsParent = uiprimitives.Container(name='findfleets',
                                               parent=self,
                                               align=uiconst.TOALL,
                                               pos=(0, 0, 0, 0))
     myAdvertParent = uiprimitives.Container(name='myadvert',
                                             parent=self,
                                             align=uiconst.TOALL,
                                             pos=(0, 0, 0, 0),
                                             clipChildren=1)
     self.sr.myAdvertButtons = uiprimitives.Container(
         name='myAdvertButtons',
         parent=myAdvertParent,
         align=uiconst.TOBOTTOM,
         height=35)
     self.sr.tabs = uicontrols.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'))
     uiprimitives.Container(name='push',
                            parent=findFleetsParent,
                            width=const.defaultPadding,
                            align=uiconst.TOLEFT)
     uiprimitives.Container(name='push',
                            parent=findFleetsParent,
                            width=const.defaultPadding,
                            align=uiconst.TORIGHT)
     self.sr.filterCont = uiprimitives.Container(name='filterCont',
                                                 parent=findFleetsParent,
                                                 align=uiconst.TOTOP,
                                                 height=35)
     self.sr.infoCont = uiprimitives.Container(name='infoCont',
                                               parent=findFleetsParent,
                                               align=uiconst.TOBOTTOM,
                                               height=155,
                                               state=uiconst.UI_HIDDEN)
     uiprimitives.Container(name='push',
                            parent=findFleetsParent,
                            height=const.defaultPadding,
                            align=uiconst.TOBOTTOM)
     self.sr.topInfoCont = uiprimitives.Container(name='topInfoCont',
                                                  parent=self.sr.infoCont,
                                                  align=uiconst.TOTOP,
                                                  height=20)
     self.sr.descrCont = uiprimitives.Container(name='descrCont',
                                                parent=self.sr.infoCont,
                                                align=uiconst.TOALL,
                                                pos=(0, 0, 0, 0))
     self.sr.scrollCont = uiprimitives.Container(name='scrollCont',
                                                 parent=findFleetsParent,
                                                 align=uiconst.TOALL,
                                                 pos=(0, 0, 0, 0))
     uiprimitives.Container(name='push',
                            parent=myAdvertParent,
                            width=const.defaultPadding,
                            align=uiconst.TOLEFT)
     uiprimitives.Container(name='push',
                            parent=myAdvertParent,
                            width=const.defaultPadding,
                            align=uiconst.TORIGHT)
     self.sr.myAdvertCont = uiprimitives.Container(name='myAdvertCont',
                                                   parent=myAdvertParent,
                                                   align=uiconst.TOALL,
                                                   pos=(10, 0, 10, 0))
    def ApplyAttributes(self, attributes):
        uicontrols.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 = uiprimitives.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 = uicontrols.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.dynamicScroll = uicontrols.BasicDynamicScroll(
            parent=self.sr.main, padding=const.defaultPadding)
        self.sr.scroll = uicontrols.Scroll(parent=self.sr.main,
                                           padding=const.defaultPadding)
        self.sr.standardBtns = uicontrols.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 = uicontrols.CaptionLabel(text=cfg.eveowners.Get(self.charID).name,
                                      parent=self.sr.topParent,
                                      align=uiconst.RELATIVE,
                                      left=74,
                                      top=20)
        if self.member.title:
            uicontrols.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 = uicontrols.ButtonGroup(btns=btns)
        self.sr.main.children.insert(1, buttons)
        maintabs = uicontrols.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.dynamicScroll, self, 'roles'
             ],
             [
                 localization.GetByLabel('UI/Corporations/Common/Titles'),
                 self.sr.dynamicScroll, self, 'titles'
             ],
             [
                 localization.GetByLabel(
                     'UI/Corporations/EditMemberDialog/RolesSummary'),
                 self.sr.scroll, self, 'roles_summary'
             ]], 'editmemberdialog')
        self.sr.maintabs = maintabs
        self.DisplayPhoto()