Ejemplo n.º 1
0
	def __init__(self, session, parent = None):
		dict.__init__(self)
		self.skinName = self.__class__.__name__
		self.session = session
		self.parent = parent
		self.onClose = [ ]
		self.onFirstExecBegin = [ ]
		self.onExecBegin = [ ]
		self.onExecEnd = [ ]
		self.onShown = [ ]
		self.onShow = [ ]
		self.onHide = [ ]
		self.execing = False
		self.shown = True

		# already shown is false until the screen is really shown (after creation)
		self.already_shown = False
		self.renderer = [ ]

		# in order to support screens *without* a help,
		# we need the list in every screen. how ironic.
		self.helpList = [ ]
		self.close_on_next_exec = None

		# stand alone screens (for example web screens)
		# don't care about having or not having focus.
		self.stand_alone = False
		self.keyboardMode = None
		GUISkin.__init__(self)
Ejemplo n.º 2
0
	def doClose(self):
		self.hide()
		for x in self.onClose:
			x()
		
		# fixup circular references
		del self.helpList
		GUISkin.close(self)

		# first disconnect all render from their sources.
		# we might split this out into a "unskin"-call,
		# but currently we destroy the screen afterwards
		# anyway.
		for val in self.renderer:
			val.disconnectAll()  # disconnected converter/sources and probably destroy them. Sources will not be destroyed.

		del self.session

		# we can have multiple dict entries with different names but same Element
		# but we dont can call destroy multiple times
		for name in self.keys():
			val = self[name]
			del self[name] # remove from dict
			if val is not None: # is not a duplicate...
				val.destroy()
				for (n, v) in self.items():
					if v == val: # check if it is the same Element
						self[n] = None # mark as duplicate

		self.renderer = [ ]

		# really delete all elements now
		self.__dict__.clear()
Ejemplo n.º 3
0
	def doClose(self):
		self.hide()
		for x in self.onClose:
			x()

		# fixup circular references
		del self.helpList
		GUISkin.close(self)

		# first disconnect all render from their sources.
		# we might split this out into a "unskin"-call,
		# but currently we destroy the screen afterwards
		# anyway.
		for val in self.renderer:
			val.disconnectAll()  # disconnected converter/sources and probably destroy them. Sources will not be destroyed.

		del self.session
		for (name, val) in self.items():
			val.destroy()
			del self[name]

		self.renderer = [ ]

		# really delete all elements now
		self.__dict__.clear()
Ejemplo n.º 4
0
    def __init__(self, session, parent=None):
        dict.__init__(self)
        self.skinName = self.__class__.__name__
        self.session = session
        self.parent = parent
        self.onClose = []
        self.onFirstExecBegin = []
        self.onExecBegin = []
        self.onExecEnd = []
        self.onShown = []
        self.onShow = []
        self.onHide = []
        self.execing = False
        self.shown = True

        # already shown is false until the screen is really shown (after creation)
        self.already_shown = False
        self.renderer = []

        # in order to support screens *without* a help,
        # we need the list in every screen. how ironic.
        self.helpList = []
        self.close_on_next_exec = None

        # stand alone screens (for example web screens)
        # don't care about having or not having focus.
        self.stand_alone = False
        self.keyboardMode = None
        GUISkin.__init__(self)
Ejemplo n.º 5
0
    def doClose(self):
        self.hide()
        for x in self.onClose:
            x()

        # fixup circular references
        del self.helpList
        GUISkin.close(self)

        # first disconnect all render from their sources.
        # we might split this out into a "unskin"-call,
        # but currently we destroy the screen afterwards
        # anyway.
        for val in self.renderer:
            val.disconnectAll(
            )  # disconnected converter/sources and probably destroy them. Sources will not be destroyed.

        del self.session
        for (name, val) in self.items():
            val.destroy()
            del self[name]

        self.renderer = []

        # really delete all elements now
        self.__dict__.clear()
Ejemplo n.º 6
0
    def doClose(self):
        self.hide()
        for x in self.onClose:
            x()

        del self.helpList
        GUISkin.close(self)
        for val in self.renderer:
            val.disconnectAll()

        del self.session
        for name, val in self.items():
            val.destroy()
            del self[name]

        self.renderer = []
        self.__dict__.clear()
Ejemplo n.º 7
0
    def doClose(self):
        self.hide()
        for x in self.onClose:
            x()

        del self.helpList
        GUISkin.close(self)
        for val in self.renderer:
            val.disconnectAll()

        del self.session
        for name, val in self.items():
            val.destroy()
            del self[name]

        self.renderer = []
        self.__dict__.clear()
Ejemplo n.º 8
0
 def doClose(
     self
 ):  # Never call this directly - it will be called from the session!
     self.hide()
     for x in self.onClose:
         x()
     del self.helpList  # Fixup circular references.
     GUISkin.close(self)
     # First disconnect all render from their sources. We might split this out into
     # a "unskin"-call, but currently we destroy the screen afterwards anyway.
     for val in self.renderer:
         val.disconnectAll(
         )  # Disconnect converter/sources and probably destroy them. Sources will not be destroyed.
     del self.session
     for (name, val) in self.items():
         val.destroy()
         del self[name]
     self.renderer = []
     self.__dict__.clear()  # Really delete all elements now.
Ejemplo n.º 9
0
 def __init__(self, session, parent = None):
     dict.__init__(self)
     self.skinName = self.__class__.__name__
     self.session = session
     self.parent = parent
     GUISkin.__init__(self)
     self.onClose = []
     self.onFirstExecBegin = []
     self.onExecBegin = []
     self.onExecEnd = []
     self.onShown = []
     self.onShow = []
     self.onHide = []
     self.execing = False
     self.shown = True
     self.already_shown = False
     self.renderer = []
     self.helpList = []
     self.close_on_next_exec = None
     self.stand_alone = False
     self.keyboardMode = None
Ejemplo n.º 10
0
 def __init__(self, session, parent = None):
     dict.__init__(self)
     self.skinName = self.__class__.__name__
     self.session = session
     self.parent = parent
     GUISkin.__init__(self)
     self.onClose = []
     self.onFirstExecBegin = []
     self.onExecBegin = []
     self.onExecEnd = []
     self.onShown = []
     self.onShow = []
     self.onHide = []
     self.execing = False
     self.shown = True
     self.already_shown = False
     self.renderer = []
     self.helpList = []
     self.close_on_next_exec = None
     self.stand_alone = False
     self.keyboardMode = None
Ejemplo n.º 11
0
    def doCloseInternal(self):
        for x in self.onClose:
            x()
        # fixup circular references
        del self.helpList
        GUISkin.close(self)

        # first disconnect all render from their sources.
        # we might split this out into a "unskin"-call,
        # but currently we destroy the screen afterwards
        # anyway.
        for val in self.renderer:
            val.disconnectAll(
            )  # disconnected converter/sources and probably destroy them. Sources will not be destroyed.

        # we can have multiple dict entries with different names but same Element
        # but we dont can call destroy multiple times
        for name in list(self.keys()):
            val = self[name]
            del self[name]  # remove from dict
            if val is not None:  # is not a duplicate...
                val.destroy()
                for (n, v) in self.items():
                    if v == val:  # check if it is the same Element
                        self[n] = None  # mark as duplicate

        self.renderer = []
        #these are the members that have to survive the __clear__()
        session = self.session
        onHideFinished = self.onHideFinished
        persisted_members = (
            self.instance,
            self._hideAnimFinishedConn,
            self._hideAnimFinishedConnInternal,
        )
        # really delete all elements now
        self.__dict__.clear()
        self.session = session
        self.onHideFinished = onHideFinished
        self.persisted_members = persisted_members
Ejemplo n.º 12
0
 def __init__(self, session, parent=None, fademenu=False):
     global topSession
     dict.__init__(self)
     self.skinName = self.__class__.__name__
     self.session = session
     self.parent = parent
     self.fademenu = config.misc.fadeShowMenu.value or fademenu
     GUISkin.__init__(self)
     self.onClose = []
     self.onFirstExecBegin = []
     self.onExecBegin = []
     self.onExecEnd = []
     self.onShown = []
     self.onShow = []
     self.onHide = []
     self.active_components = []
     self.onShowCode = []
     self.onHideCode = []
     self.execing = False
     self.shown = True
     self.already_shown = False
     self.renderer = []
     self.helpList = []
     self.close_on_next_exec = None
     self.stand_alone = False
     self.keyboardMode = None
     self.aFadeInDimmed = 0
     self.aFadeInTimer = eTimer()
     if config.misc.fadeShowMenu.value:
         if self.skinName not in ('Mute', 'Volume', 'PictureInPicture', 'PictureInPictureZapping',
                                  'Dishpip', 'EGAMIMainNews', 'PiPSetup'):
             self.aFadeInTimer.callback.append(self.doaFadeIn)
     topSession = self.session
     if config.misc.enableAnimationMenuScreens.value:
         self.onShow.append(self.animateMenuOnShow)
     return