git.cweiske.de
/
enigma2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
remove unneeded imports
[enigma2.git]
/
lib
/
python
/
Components
/
GUIComponent.py
diff --git
a/lib/python/Components/GUIComponent.py
b/lib/python/Components/GUIComponent.py
index 401a004da350b9f5bd1fc1988b2cb827d2573850..a3b1b9e198dea2830af46ebb46259344e90b202a 100644
(file)
--- a/
lib/python/Components/GUIComponent.py
+++ b/
lib/python/Components/GUIComponent.py
@@
-7,8
+7,11
@@
class GUIComponent(object):
def __init__(self):
self.instance = None
def __init__(self):
self.instance = None
+ self.onVisibilityChange = [ ]
+ self.__visible = 0
self.visible = 1
self.skinAttributes = None
self.visible = 1
self.skinAttributes = None
+ self.deprecationInfo = None
def execBegin(self):
pass
def execBegin(self):
pass
@@
-31,10
+34,10
@@
class GUIComponent(object):
self.instance.hide()
if self.skinAttributes is None:
self.instance.hide()
if self.skinAttributes is None:
- print "warning, skin is missing some elements."
- return
+ return False
skin.applyAllAttributes(self.instance, desktop, self.skinAttributes)
skin.applyAllAttributes(self.instance, desktop, self.skinAttributes)
+ return True
def move(self, x, y = None):
# we assume, that x is already an ePoint
def move(self, x, y = None):
# we assume, that x is already an ePoint
@@
-50,14
+53,22
@@
class GUIComponent(object):
self.instance.setZPosition(z)
def show(self):
self.instance.setZPosition(z)
def show(self):
+ old = self.__visible
self.__visible = 1
if self.instance is not None:
self.instance.show()
self.__visible = 1
if self.instance is not None:
self.instance.show()
+ if old != self.__visible:
+ for fnc in self.onVisibilityChange:
+ fnc(True)
def hide(self):
def hide(self):
+ old = self.__visible
self.__visible = 0
if self.instance is not None:
self.instance.hide()
self.__visible = 0
if self.instance is not None:
self.instance.hide()
+ if old != self.__visible:
+ for fnc in self.onVisibilityChange:
+ fnc(False)
def getVisible(self):
return self.__visible
def getVisible(self):
return self.__visible