aboutsummaryrefslogtreecommitdiff
path: root/lib/python/Screens/TimerEdit.py
diff options
context:
space:
mode:
authorFraxinas <andreas.frisch@multimedia-labs.de>2008-11-10 10:18:28 +0100
committerFraxinas <andreas.frisch@multimedia-labs.de>2008-11-10 10:18:28 +0100
commit4c2cba9ccb6f754aac9378e2fc2c7b546e6d589c (patch)
tree1ae11748c8a14720c98fb666ffaf8615fd5ff038 /lib/python/Screens/TimerEdit.py
parentacbad24424304473f967b678bd9deb51f73acf27 (diff)
parent752d9da39e993387fefbd9ccbf39e5cb8f85735e (diff)
downloadenigma2-4c2cba9ccb6f754aac9378e2fc2c7b546e6d589c.tar.gz
enigma2-4c2cba9ccb6f754aac9378e2fc2c7b546e6d589c.zip
Merge branch 'master' of fraxinas@git.opendreambox.org:/git/enigma2
Diffstat (limited to 'lib/python/Screens/TimerEdit.py')
-rw-r--r--lib/python/Screens/TimerEdit.py23
1 files changed, 16 insertions, 7 deletions
diff --git a/lib/python/Screens/TimerEdit.py b/lib/python/Screens/TimerEdit.py
index 800bab33..aae345db 100644
--- a/lib/python/Screens/TimerEdit.py
+++ b/lib/python/Screens/TimerEdit.py
@@ -317,6 +317,7 @@ class TimerSanityConflict(Screen):
EMPTY = 0
ENABLE = 1
DISABLE = 2
+ EDIT = 3
def __init__(self, session, timer):
Screen.__init__(self, session)
@@ -338,10 +339,11 @@ class TimerSanityConflict(Screen):
self["key_red"] = Button("Edit")
self["key_green"] = Button(" ")
- self["key_yellow"] = Button("Edit")
+ self["key_yellow"] = Button(" ")
self["key_blue"] = Button(" ")
self.key_green_choice = self.EMPTY
+ self.key_yellow_choice = self.EMPTY
self.key_blue_choice = self.EMPTY
self["actions"] = ActionMap(["OkCancelActions", "DirectionActions", "ShortcutActions", "TimerEditActions"],
@@ -415,9 +417,14 @@ class TimerSanityConflict(Screen):
self["actions"].actions.update({"green":self.toggleTimer1})
self["key_green"].setText(_("Disable"))
self.key_green_choice = self.DISABLE
+
if len(self.timer) > 1:
x = self["list"].getSelectedIndex()
if self.timer[x] is not None:
+ if self.key_yellow_choice == self.EMPTY:
+ self["actions"].actions.update({"yellow":self.editTimer2})
+ self["key_yellow"].setText(_("Edit"))
+ self.key_yellow_choice = self.EDIT
if self.timer[x].disabled and self.key_blue_choice != self.ENABLE:
self["actions"].actions.update({"blue":self.toggleTimer2})
self["key_blue"].setText(_("Enable"))
@@ -432,9 +439,11 @@ class TimerSanityConflict(Screen):
self.key_blue_choice = self.DISABLE
else:
#FIXME.... this doesnt hide the buttons self.... just the text
- self.removeAction("yellow")
- self["key_yellow"].setText(" ")
- self.key_yellow_choice = self.EMPTY
- self.removeAction("blue")
- self["key_blue"].setText(" ")
- self.key_blue_choice = self.EMPTY
+ if self.key_yellow_choice != self.EMPTY:
+ self.removeAction("yellow")
+ self["key_yellow"].setText(" ")
+ self.key_yellow_choice = self.EMPTY
+ if self.key_blue_choice != self.EMPTY:
+ self.removeAction("blue")
+ self["key_blue"].setText(" ")
+ self.key_blue_choice = self.EMPTY