aboutsummaryrefslogtreecommitdiff
path: root/lib/python
diff options
context:
space:
mode:
authorAndreas Monzner <andreas.monzner@multimedia-labs.de>2007-09-14 17:22:44 +0000
committerAndreas Monzner <andreas.monzner@multimedia-labs.de>2007-09-14 17:22:44 +0000
commite9ac30d0d9eadcce3d2872ab2e4380144e49adbc (patch)
tree5a10e4e2ed37154a186384dbdc09b6509216cfd0 /lib/python
parentf2a67250266080d05742d961e544e7b8fba2611a (diff)
downloadenigma2-e9ac30d0d9eadcce3d2872ab2e4380144e49adbc.tar.gz
enigma2-e9ac30d0d9eadcce3d2872ab2e4380144e49adbc.zip
add support for pictures in mainmenu
Diffstat (limited to 'lib/python')
-rw-r--r--lib/python/Components/Converter/MenuEntryCompare.py25
1 files changed, 25 insertions, 0 deletions
diff --git a/lib/python/Components/Converter/MenuEntryCompare.py b/lib/python/Components/Converter/MenuEntryCompare.py
new file mode 100644
index 00000000..42cdc5d1
--- /dev/null
+++ b/lib/python/Components/Converter/MenuEntryCompare.py
@@ -0,0 +1,25 @@
+from Components.Converter.Converter import Converter
+from Components.Element import cached
+
+class MenuEntryCompare(Converter, object):
+ def __init__(self, type):
+ Converter.__init__(self, type)
+ self.entry_id = type
+
+ def selChanged(self):
+ self.downstream_elements.changed((self.CHANGED_ALL, 0))
+
+ @cached
+ def getBool(self):
+ id = self.entry_id
+ cur = self.source.current
+ if cur and len(cur) > 2:
+ EntryID = cur[2]
+ return EntryID and id and id == EntryID
+ return False
+
+ boolean = property(getBool)
+
+ def changed(self, *args, **kwargs):
+ if args[0][0] == self.CHANGED_DEFAULT:
+ self.source.onSelectionChanged.append(self.selChanged)