diff options
| author | Andreas Monzner <andreas.monzner@multimedia-labs.de> | 2007-09-14 17:22:44 +0000 |
|---|---|---|
| committer | Andreas Monzner <andreas.monzner@multimedia-labs.de> | 2007-09-14 17:22:44 +0000 |
| commit | e9ac30d0d9eadcce3d2872ab2e4380144e49adbc (patch) | |
| tree | 5a10e4e2ed37154a186384dbdc09b6509216cfd0 /lib/python/Components/Converter | |
| parent | f2a67250266080d05742d961e544e7b8fba2611a (diff) | |
| download | enigma2-e9ac30d0d9eadcce3d2872ab2e4380144e49adbc.tar.gz enigma2-e9ac30d0d9eadcce3d2872ab2e4380144e49adbc.zip | |
add support for pictures in mainmenu
Diffstat (limited to 'lib/python/Components/Converter')
| -rw-r--r-- | lib/python/Components/Converter/MenuEntryCompare.py | 25 |
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) |
