small speedups/cleanups by moritz venn
[enigma2.git] / lib / python / Screens / TimerEdit.py
index 58cece6c10c70a5f998706277e8a379c03fb6e96..cdff4c5ba36f22fe803727d93a966694adb48e86 100644 (file)
@@ -95,10 +95,11 @@ class TimerEditList(Screen):
                        else:
                                if t.isRunning():
                                        if t.repeated:
-                                               list = []
-                                               list.append((_("Stop current event but not coming events"), "stoponlycurrent"))
-                                               list.append((_("Stop current event and disable coming events"), "stopall"))
-                                               list.append((_("Don't stop current event but disable coming events"), "stoponlycoming"))
+                                               list = (
+                                                       (_("Stop current event but not coming events"), "stoponlycurrent"),
+                                                       (_("Stop current event and disable coming events"), "stopall"),
+                                                       (_("Don't stop current event but disable coming events"), "stoponlycoming")
+                                               )
                                                self.session.openWithCallback(boundFunction(self.runningEventCallback, t), ChoiceBox, title=_("Repeating event currently recording... What do you want to do?"), list = list)
                                else:
                                        t.disable()
@@ -408,7 +409,7 @@ class TimerSanityConflict(Screen):
                                self["actions"].actions.update({"green":self.toggleTimer1})
                                self["key_green"].setText(_("Enable"))
                                self.key_green_choice = self.ENABLE
-                       elif self.timer[0].isRunning() and not timer[0].repeated and self.key_green_choice != self.EMPTY:
+                       elif self.timer[0].isRunning() and not self.timer[0].repeated and self.key_green_choice != self.EMPTY:
                                self.removeAction("green")
                                self["key_green"].setText(" ")
                                self.key_green_choice = self.EMPTY
@@ -428,7 +429,7 @@ class TimerSanityConflict(Screen):
                                        self["actions"].actions.update({"blue":self.toggleTimer2})
                                        self["key_blue"].setText(_("Enable"))
                                        self.key_blue_choice = self.ENABLE
-                               elif self.timer[x].isRunning() and not timer[x].repeated and self.key_blue_choice != self.EMPTY:
+                               elif self.timer[x].isRunning() and not self.timer[x].repeated and self.key_blue_choice != self.EMPTY:
                                        self.removeAction("blue")
                                        self["key_blue"].setText(" ")
                                        self.key_blue_choice = self.EMPTY