def ApplyAttributes(self, attributes):
     Container.ApplyAttributes(self, attributes=attributes)
     self.isDeveloperMode = attributes.get('developerMode', True)
     self.basePadLeft = 5
     self.dev_simpleHistoryDisplayEnabled = False
     self.dev_historySettingsEnabled = True
     self.dev_exportNotificationHistoryEnabled = False
     self.dev_clearNotificationHistoryEnabled = False
     self.dev_soundSettingsEnabled = True
     parentwidth = attributes.get('parentwidth')
     self.lastVerticalBarEnabledStatus = False
     self.entryCache = {}
     self.leftContainer = NotificationSettingList(
         name='LeftContainer',
         align=uiconst.TOLEFT,
         width=parentwidth / 2,
         padding=4,
         parent=self,
         developerMode=self.isDeveloperMode)
     self.rightContainer = Container(name='RightContainer',
                                     align=uiconst.TOALL,
                                     padding=(0, 4, 4, 4),
                                     parent=self)
     BumpedUnderlay(name='leftUnderlay', bgParent=self.leftContainer)
     BumpedUnderlay(name='rightUnderlay', bgParent=self.rightContainer)
     self.notificationSettingHandler = NotificationSettingHandler()
     self.notificationSettingData = self.notificationSettingHandler.LoadSettings(
     )
     self._SetupRightSide()
     self.leftContainer.PopulateScroll()
Esempio n. 2
0
 def _ConstructNotificationArea(self):
     self.windowunderlay = Container(parent=self.topContainer,
                                     name='windowUnderlay',
                                     align=uiconst.TOALL)
     self._ConstructResizeLine()
     self.historyHeader = Container(name='HistoryContainer',
                                    parent=self.windowunderlay,
                                    align=uiconst.TOTOP,
                                    height=13,
                                    padding=(0, 4, 0, 0),
                                    clipChildren=True,
                                    opacity=0.0)
     self.historyHeaderLabel = EveLabelSmall(
         name='history',
         parent=self.historyHeader,
         align=uiconst.CENTER,
         text=localization.GetByLabel(
             'Notifications/NotificationWidget/NotificationHistoryCaption'),
         bold=True)
     self.historyHeader.height = max(self.historyHeader.height,
                                     self.historyHeaderLabel.textheight + 2)
     self._ConstructControlContainer()
     if self.verticalAlignment == ExpandAlignmentConst.EXPAND_ALIGNMENT_VERTICAL_UP:
         padding = (5, 0, 5, 0)
     else:
         padding = (5, 0, 5, 5)
     self.scrollList = NotificationScrollContainer(
         name='myScrollCont',
         parent=self.windowunderlay,
         align=uiconst.TOALL,
         padding=padding)
     self.lastobservedValue = self.scrollList.verticalScrollBar.isDragging
     self.underlay = BumpedUnderlay(bgParent=self.scrollList)
 def ApplyAttributes(self, attributes):
     Container.ApplyAttributes(self, attributes)
     pushContent = attributes.pushContent or self.pushContent
     showUnderlay = attributes.Get('showUnderlay',
                                   self.default_showUnderlay)
     self.scrollbarsDisabled = False
     self.scrollToVerticalPending = None
     self.scrollToHorizontalPending = None
     self.noContentHint = None
     self.verticalScrollBar = ScrollBar(
         parent=self,
         align=uiconst.TORIGHT if pushContent else uiconst.TORIGHT_NOPUSH)
     self.verticalScrollBar.OnScrolled = self._OnVerticalScrollBar
     self.horizontalScrollBar = ScrollBar(
         parent=self,
         align=uiconst.TOBOTTOM if pushContent else uiconst.TOBOTTOM_NOPUSH)
     self.horizontalScrollBar.OnScrolled = self._OnHorizontalScrollBar
     self.clipCont = Container(name='clipCont',
                               parent=self,
                               clipChildren=True)
     self.mainCont = ContainerAutoSize(name='mainCont',
                                       parent=self.clipCont,
                                       state=uiconst.UI_NORMAL)
     self.mainCont._OnSizeChange_NoBlock = self._OnMainContSizeChange
     self.children.insert = self._InsertChild
     self.children.append = self._AppendChild
     self.children.remove = self._RemoveChild
     self._mouseHoverCookie = uicore.uilib.RegisterForTriuiEvents(
         uiconst.UI_MOUSEHOVER, self.OnGlobalMouseHover)
     if showUnderlay:
         self.underlay = BumpedUnderlay(bgParent=self)
     else:
         self.underlay = None
Esempio n. 4
0
 def ApplyAttributes(self, attributes):
     Window.ApplyAttributes(self, attributes)
     self.main = ContainerAutoSize(parent=self.sr.main,
                                   name='main',
                                   padding=3,
                                   state=uiconst.UI_PICKCHILDREN,
                                   align=uiconst.TOTOP,
                                   alignMode=uiconst.TOTOP)
     self.planetUISvc = sm.GetService('planetUI')
     self.planetSvc = sm.GetService('planetSvc')
     self.pin = attributes.Get('pin', None)
     self.uiEffects = uicls.UIEffects()
     self.showingActionContainer = False
     self.currentRoute = None
     self.showNext = None
     self.lastCalled = None
     self.commodityToRoute = None
     self.buttonTextValue = ''
     infoCont = Container(parent=self.main,
                          name='infoCont',
                          padding=5,
                          align=uiconst.TOTOP,
                          height=self.INFO_CONT_HEIGHT)
     self.infoContLeft = Container(name='leftCol',
                                   parent=infoCont,
                                   align=uiconst.TOLEFT_PROP,
                                   width=0.5)
     self.infoContRight = Container(name='rightCol',
                                    parent=infoCont,
                                    align=uiconst.TOLEFT_PROP,
                                    width=0.5)
     self._GetInfoCont()
     self._UpdateInfoCont()
     self.buttonCont = GridContainer(parent=self.main,
                                     name='buttonCont',
                                     height=40,
                                     align=uiconst.TOTOP,
                                     padding=(-1, 0, -1, 0))
     BumpedUnderlay(bgParent=self.buttonCont)
     self.buttonCont.lines = 1
     self.buttonCont.columns = 6
     self.buttonTextCont = self._DrawAlignTopCont(22, 'buttonTextCont')
     self.buttonText = EveLabelSmall(parent=self.buttonTextCont,
                                     align=uiconst.CENTER,
                                     color=(1.0, 1.0, 1.0, 1.0),
                                     state=uiconst.UI_NORMAL)
     self.buttonTextCont.height = max(22, self.buttonText.textheight)
     self.actionCont = Container(parent=self.sr.main,
                                 name='actionCont',
                                 padding=(6, 0, 6, 6),
                                 clipChildren=True)
     self.SetCaption(self._GetPinName())
     self.main.SetSizeAutomatically()
     self.height = self.GetBaseHeight()
     self.LoadActionButtons(self._GetActionButtons())
     uicore.animations.FadeTo(self, 0.0, 1.0, duration=0.3)
     self.updateInfoContTimer = base.AutoTimer(100, self._UpdateInfoCont)
     sm.GetService('audio').SendUIEvent(
         'wise:/msg_pi_pininteraction_open_play')
     self.ResizeActionCont(None)
Esempio n. 5
0
 def BuildNameCont(self):
     padding = 6
     BumpedUnderlay(bgParent=self.nameCont)
     profileCont = Container(parent=self.nameCont,
                             align=uiconst.TORIGHT,
                             left=padding)
     self.profileCombo = Combo(
         label=GetByLabel('UI/Structures/Deployment/ProfileComboLabel'),
         parent=profileCont,
         options=self._GetProfileOptions(),
         name='profileCombo',
         width=100,
         align=uiconst.BOTTOMRIGHT,
         top=padding)
     profileCont.width = self.profileCombo.width
     nameText = GetByLabel('UI/Structures/Deployment/StructureName')
     self.ssPrefix = '%s - ' % CleanImportantMarkup(
         cfg.evelocations.Get(session.solarsystemid).locationName)
     self.nameEdit = PrefixedSingleLineEdit(
         name='nameEdit',
         parent=self.nameCont,
         maxLength=32 + len(self.ssPrefix),
         align=uiconst.TOBOTTOM,
         padLeft=padding,
         padRight=30,
         top=padding,
         label=nameText,
         prefix=self.ssPrefix,
         OnChange=self.nameChangedCallback)
     profileHeight = self.profileCombo.height - self.profileCombo.sr.label.top
     nameHeight = self.nameEdit.height - self.nameEdit.sr.label.top
     newHeight = max(profileHeight, nameHeight) + 2 * padding
     self.nameCont.height = newHeight
Esempio n. 6
0
 def AddColumn(self, columnWidth, name='column'):
     column = uiprimitives.Container(name=name,
                                     align=uiconst.TOLEFT,
                                     width=columnWidth,
                                     padLeft=8,
                                     parent=self.parent)
     column.isTabOrderGroup = 1
     BumpedUnderlay(isInFocus=True, parent=column)
     return column
Esempio n. 7
0
 def Prepare_(self):
     self.sr.text = Label(name='edittext',
                          parent=self._textClipper,
                          left=self.TEXTLEFTMARGIN,
                          state=uiconst.UI_DISABLED,
                          maxLines=1,
                          align=uiconst.CENTERLEFT,
                          fontsize=self.fontsize)
     self.sr.hinttext = Label(parent=self._textClipper,
                              name='hinttext',
                              align=uiconst.CENTERLEFT,
                              state=uiconst.UI_DISABLED,
                              maxLines=1,
                              left=self.TEXTLEFTMARGIN,
                              fontsize=self.fontsize)
     self.sr.background = BumpedUnderlay(bgParent=self, showFill=True)
Esempio n. 8
0
    def ApplyAttributes(self, attributes):
        Container.ApplyAttributes(self, attributes)
        self.barWidth = attributes.get('barWidth', self.default_barWidth)
        self.duration = attributes.get('duration', self.default_duration)
        self.pauseTime = attributes.get('pauseTime', self.default_pauseTime)
        w, _ = self.GetAbsoluteSize()
        self.bars = []
        for i in xrange(w / self.barWidth + 1):
            bar = Bar(align=uiconst.TOLEFT,
                      parent=self,
                      opacity=0.75,
                      width=self.barWidth,
                      padLeft=0)
            self.bars.append(bar)

        uthread.new(self.Animate)
        BumpedUnderlay(bgParent=self, padding=(-2, -2, -1, -1))
Esempio n. 9
0
 def Prepare_OptionMenu_(self):
     ClearMenuLayer()
     menu = uiprimitives.Container(parent=uicore.layer.menu,
                                   pos=(0, 0, 200, 200),
                                   align=uiconst.RELATIVE)
     menu.sr.scroll = Scroll(parent=menu)
     menu.sr.scroll.OnKillFocus = self.OnScrollFocusLost
     menu.sr.scroll.OnSelectionChange = self.OnScrollSelectionChange
     menu.sr.scroll.Confirm = self.Confirm
     menu.sr.scroll.OnUp = self.OnUp
     menu.sr.scroll.OnDown = self.OnDown
     menu.sr.scroll.OnRight = self.Confirm
     menu.sr.scroll.OnLeft = self.Confirm
     menu.sr.scroll.sr.underlay.opacity = 0.0
     BumpedUnderlay(bgParent=menu,
                    opacity=1.0,
                    isInFocus=True,
                    isWindowActive=True)
     FillThemeColored(bgParent=menu,
                      colorType=uiconst.COLORTYPE_UIBASECONTRAST,
                      opacity=1.0)
     return (menu, menu.sr.scroll)
Esempio n. 10
0
 def LoadSupport(self, panel, *args):
     if self.supportLoaded:
         return
     subpar = uiprimitives.Container(name='subpar',
                                     parent=panel,
                                     align=uiconst.TOALL)
     sumHeight = 0
     sumHeight += self._LoadSupportHelpChannel(subpar)
     LineThemeColored(parent=subpar, align=uiconst.TOTOP)
     sumHeight += self._LoadSupportPetitions(subpar) + 1
     LineThemeColored(parent=subpar, align=uiconst.TOTOP)
     sumHeight += self._LoadSupportCareer(subpar) + 1
     if int(
             sm.GetService('machoNet').GetGlobalConfig().get(
                 'bugReporting_ShowButton', 0)) > 0:
         LineThemeColored(parent=subpar, align=uiconst.TOTOP)
         sumHeight += self._LoadSupportBugReport(subpar) + 1
     self.SetMinSize([
         self.minsize[0], self.sr.topParent.height +
         self.sr.headerParent.height + sumHeight + 32
     ])
     BumpedUnderlay(bgParent=panel)
     self.supportLoaded = True
Esempio n. 11
0
    def LoadSupport(self, panel, *args):
        if self.supportLoaded:
            return
        subpar = uiprimitives.Container(name='subpar',
                                        parent=panel,
                                        align=uiconst.TOALL)
        helpchannelpar = uiprimitives.Container(name='helpchannelpar',
                                                parent=subpar,
                                                align=uiconst.TOTOP)
        helpchannelpar.padTop = 4
        helpbtnparent = uiprimitives.Container(name='helpbtnparent',
                                               parent=subpar,
                                               align=uiconst.TOTOP,
                                               height=32)
        helpchannelbtn = uicontrols.Button(
            parent=helpbtnparent,
            label=localization.GetByLabel('UI/Help/JoinChannel'),
            func=self.JoinHelpChannel,
            btn_default=0,
            align=uiconst.TOPRIGHT)
        helpchannelbtn.left = 6
        helptext = uicontrols.EveLabelMedium(
            name='label',
            text=localization.GetByLabel('UI/Help/JoinChannelHint'),
            parent=helpchannelpar,
            align=uiconst.TOPLEFT,
            pos=(8, 4, 280, 0),
            state=uiconst.UI_NORMAL)
        helpchannelpar.height = helptext.textheight
        helpbtnparent.height = helpchannelbtn.height + 4
        LineUnderlay(parent=subpar, align=uiconst.TOTOP)
        petpar = uiprimitives.Container(name='petitionpar',
                                        parent=subpar,
                                        align=uiconst.TOTOP,
                                        height=60)
        petpar.padTop = 4
        petbtnparent = uiprimitives.Container(name='petbtnparent',
                                              parent=subpar,
                                              align=uiconst.TOTOP,
                                              height=32)
        petbtn = uicontrols.Button(
            parent=petbtnparent,
            label=localization.GetByLabel('UI/Help/FilePetition'),
            func=self.FilePetition,
            btn_default=0,
            align=uiconst.TOPRIGHT)
        petbtn.left = 6
        petbtnparent.height = petbtn.height + 4
        try:
            if sm.RemoteSvc('petitioner').IsZenDeskEnabled(
            ) and eve.session.languageID.lower() == 'en':
                hdbtn = uicontrols.Button(
                    parent=petbtnparent,
                    label=localization.GetByLabel('UI/Help/OpenHelpCenter'),
                    func=self.OpenHelpCenter,
                    btn_default=0,
                    align=uiconst.TOPRIGHT)
                hdbtn.left = 6
                petbtnparent.height += hdbtn.height + 4
                hdbtn.top = petbtn.height + 4
        except Exception:
            pass

        pettext = uicontrols.EveLabelMedium(
            name='label',
            text=localization.GetByLabel('UI/Help/OpenPetitions'),
            parent=petpar,
            align=uiconst.TOPLEFT,
            pos=(8, 4, 280, 0),
            state=uiconst.UI_NORMAL)
        petpar.height = pettext.textheight
        LineUnderlay(parent=subpar, align=uiconst.TOTOP)
        kbpar = uiprimitives.Container(name='kbpar',
                                       parent=subpar,
                                       align=uiconst.TOTOP,
                                       height=60)
        kbpar.padTop = 4
        kbbtnparent = uiprimitives.Container(name='kbbtnparent',
                                             parent=subpar,
                                             align=uiconst.TOTOP,
                                             width=96)
        kbt = localization.GetByLabel('UI/Help/EvelopediaHintText')
        kbtext = uicontrols.EveLabelMedium(name='label',
                                           text=kbt,
                                           parent=kbpar,
                                           align=uiconst.TOPLEFT,
                                           pos=(8, 4, 280, 0),
                                           state=uiconst.UI_NORMAL)
        kbbtn = uicontrols.Button(
            parent=kbbtnparent,
            label=localization.GetByLabel('UI/Help/SearchEvelopedia'),
            func=self.SearchKB,
            pos=(6, 0, 0, 0),
            align=uiconst.TOPRIGHT,
            btn_default=1)
        self.sr.kbsearch = uicontrols.SinglelineEdit(name='kbsearch',
                                                     parent=kbbtnparent,
                                                     pos=(kbbtn.width + 14, 0,
                                                          195, 0),
                                                     align=uiconst.TOPRIGHT)
        kbpar.height = kbtext.textheight
        kbbtnparent.height = max(kbbtn.height, self.sr.kbsearch.height) + 8
        LineUnderlay(parent=subpar, align=uiconst.TOTOP)
        funnelpar = uiprimitives.Container(name='funnelpar',
                                           parent=subpar,
                                           align=uiconst.TOTOP,
                                           height=60)
        funnelpar.padTop = 4
        funnelbtnparent = uiprimitives.Container(name='funnelbtnparent',
                                                 parent=subpar,
                                                 align=uiconst.TOTOP,
                                                 width=96,
                                                 height=32)
        funnelbt = localization.GetByLabel('UI/Help/CareerAdvancementFull')
        funneltext = uicontrols.EveLabelMedium(name='label',
                                               text=funnelbt,
                                               parent=funnelpar,
                                               align=uiconst.TOPLEFT,
                                               pos=(8, 4, 280, 0),
                                               state=uiconst.UI_NORMAL)
        uicontrols.Button(
            parent=funnelbtnparent,
            label=localization.GetByLabel('UI/Help/ShowCareerAgents'),
            func=self.ShowTutorialAgents,
            args=('support', ),
            pos=(6, 0, 0, 0),
            align=uiconst.TOPRIGHT)
        helpchannelpar.height = helptext.textheight + helptext.top * 2 + 6
        petpar.height = pettext.textheight + pettext.top * 2 + 6
        kbpar.height = kbtext.textheight + kbtext.top * 2 + 6
        funnelpar.height = funneltext.textheight + funneltext.top * 2 + 6
        if int(
                sm.GetService('machoNet').GetGlobalConfig().get(
                    'bugReporting_ShowButton', 0)) > 0:
            LineUnderlay(parent=subpar, align=uiconst.TOTOP)
            bugreportpar = uiprimitives.Container(name='bugreportpar',
                                                  parent=subpar,
                                                  align=uiconst.TOTOP,
                                                  height=60)
            bugreportpar.padTop = 4
            bugreportbtnparent = uiprimitives.Container(
                name='bugreportbtnparent',
                parent=subpar,
                align=uiconst.TOTOP,
                width=96,
                height=32)
            bugreportbt = localization.GetByLabel('UI/Help/ReportBugFull')
            bugreporttext = uicontrols.EveLabelMedium(name='label',
                                                      text=bugreportbt,
                                                      parent=bugreportpar,
                                                      align=uiconst.TOPLEFT,
                                                      pos=(8, 4, 280, 0),
                                                      state=uiconst.UI_NORMAL)
            uicontrols.Button(
                parent=bugreportbtnparent,
                label=localization.GetByLabel('UI/Help/ReportBug'),
                func=self.CreateBugReport,
                pos=(6, -2, 0, 0),
                align=uiconst.TOPRIGHT)
            helpchannelpar.height = helptext.textheight + helptext.top * 2 + 6
            petpar.height = pettext.textheight + pettext.top * 2 + 6
            kbpar.height = kbtext.textheight + kbtext.top * 2 + 6
            bugreportpar.height = bugreporttext.textheight + bugreporttext.top * 2 + 6
        totalHeight = 0
        for container in subpar.children:
            if container.align == uiconst.TOTOP:
                totalHeight += container.height

        need = self.sr.topParent.height + self.sr.headerParent.height + totalHeight + 40
        self.SetMinSize([self.minsize[0], need])
        BumpedUnderlay(bgParent=panel)
        uicore.registry.SetFocus(self.sr.kbsearch)
        self.supportLoaded = True
Esempio n. 12
0
 def Prepare_Underlay_(self):
     self.sr.underlay = BumpedUnderlay(parent=self, name='background')