aboutsummaryrefslogtreecommitdiff
path: root/lib/python/Components/config.py
diff options
context:
space:
mode:
authorghost <andreas.monzner@multimedia-labs.de>2008-12-03 17:40:25 +0100
committerghost <andreas.monzner@multimedia-labs.de>2008-12-03 17:40:25 +0100
commit2e5c13aebb389a6d74e4130658ccee6a863d01f6 (patch)
tree41690ea5a25209d0d4e0be320d25daf248fe1772 /lib/python/Components/config.py
parentcc53ef67c6cfb594f1d30d1367210c0d3bc41d15 (diff)
downloadenigma2-2e5c13aebb389a6d74e4130658ccee6a863d01f6.tar.gz
enigma2-2e5c13aebb389a6d74e4130658ccee6a863d01f6.zip
add possibility to change start/end time in timer edit with Vol/Bouquet +/- (thx to Moritz Venn)
Diffstat (limited to 'lib/python/Components/config.py')
-rwxr-xr-xlib/python/Components/config.py28
1 files changed, 28 insertions, 0 deletions
diff --git a/lib/python/Components/config.py b/lib/python/Components/config.py
index 4d57bbb9..d79337ba 100755
--- a/lib/python/Components/config.py
+++ b/lib/python/Components/config.py
@@ -604,6 +604,34 @@ class ConfigClock(ConfigSequence):
t = time.localtime(default)
ConfigSequence.__init__(self, seperator = ":", limits = [(0,23),(0,59)], default = [t.tm_hour, t.tm_min])
+ def increment(self):
+ # Check if Minutes maxed out
+ if self._value[1] == 59:
+ # Check if Hours not maxed out
+ if self._value[0] < 23:
+ # Increment Hour, reset Minutes to 0
+ self._value[0] += 1
+ self._value[1] = 0
+ else:
+ # Increment Minutes
+ self._value[1] += 1
+ # Trigger change
+ self.changed()
+
+ def decrement(self):
+ # Check if Minutes is minimum
+ if self._value[1] == 0:
+ # Check if Hour is greater than 0
+ if self._value[0] > 0:
+ # Decrement Hour, set Minutes to 59
+ self._value[0] -= 1
+ self._value[1] = 59
+ else:
+ # Decrement Minutes
+ self._value[1] -= 1
+ # Trigger change
+ self.changed()
+
class ConfigInteger(ConfigSequence):
def __init__(self, default, limits = (0, 9999999999)):
ConfigSequence.__init__(self, seperator = ":", limits = [limits], default = default)