Ejemplo n.º 1
0
 def Expand(self, checkchain=1, *args):
     WindowCore.Expand(self, checkchain, args)
     if self.sr.topParent:
         self.sr.topParent.state = uiconst.UI_PICKCHILDREN
     if self.sr.bottom:
         self.sr.bottom.state = uiconst.UI_PICKCHILDREN
     if self.sr.main:
         self.sr.main.state = uiconst.UI_PICKCHILDREN
Ejemplo n.º 2
0
 def CloseByUser(self, *args):
     """
     Calling this method to close a window registers the _open attribute as False, so
     the window will not open up automatically on session change.
     """
     if not self.IsKillable():
         return
     WindowCore.CloseByUser(self)
Ejemplo n.º 3
0
 def InitializeStatesAndPosition(self, *args, **kwds):
     self.startingup = 1
     pinned = self.GetRegisteredState('pinned')
     if pinned:
         self.Pin(delegate=False)
     else:
         self.Unpin(delegate=False)
     WindowCore.InitializeStatesAndPosition(self, *args, **kwds)
     self.startingup = 0
Ejemplo n.º 4
0
 def Collapse(self, forceCollapse=False, checkchain=1, *args):
     if not self._collapseable or not forceCollapse and self.IsCollapsed():
         return
     if self.sr.topParent:
         self.sr.topParent.state = uiconst.UI_HIDDEN
     if self.sr.bottom:
         self.sr.bottom.state = uiconst.UI_HIDDEN
     if self.sr.main:
         self.sr.main.state = uiconst.UI_HIDDEN
     WindowCore.Collapse(self, forceCollapse, checkchain, args)
Ejemplo n.º 5
0
 def ApplyAttributes(self, attributes):
     self.default_parent = uicore.layer.main
     self._pinned = False
     self._pinable = self.default_isPinable
     self.showforward = False
     self.showback = False
     self.isBlinking = False
     self.iconNum = attributes.get('iconNum', self.GetDefaultWndIcon())
     self.scope = attributes.get('scope', self.default_scope)
     self.topParentHeight = attributes.get('topParentHeight',
                                           self.default_topParentHeight)
     WindowCore.ApplyAttributes(self, attributes)
Ejemplo n.º 6
0
 def Prepare_LoadingIndicator_(self):
     WindowCore.Prepare_LoadingIndicator_(self)
     self.sr.loadingIndicator.icons = [
         'ui_38_16_%s' % (210 + i) for i in xrange(8)
     ]
Ejemplo n.º 7
0
 def ShowDialog(self, modal=False, state=uiconst.UI_NORMAL):
     if modal:
         self.NoSeeThrough()
     return WindowCore.ShowDialog(self, modal, state)
Ejemplo n.º 8
0
 def GetRegisteredState(self, stateName):
     if stateName == 'locked':
         if self.GetRegisteredState('pinned') and settings.char.windows.Get(
                 'lockwhenpinned', False):
             return True
     return WindowCore.GetRegisteredState(self, stateName)
Ejemplo n.º 9
0
 def CloseByUser(self, *args):
     if not self.IsKillable():
         return
     WindowCore.CloseByUser(self)