diff options
| author | Felix Domke <tmbinc@elitedvb.net> | 2009-01-26 23:47:10 +0100 |
|---|---|---|
| committer | Felix Domke <tmbinc@elitedvb.net> | 2009-01-26 23:47:10 +0100 |
| commit | a4fd5bddb0f8c1b05b963cb8af9692f6c89f3dab (patch) | |
| tree | 16f6251dd134ab977ab7953d9a2f928ce5e770ad /lib/python/Components | |
| parent | 87b5fc099dcc08b9af41122b11fb9ba99a4119d3 (diff) | |
| download | enigma2-a4fd5bddb0f8c1b05b963cb8af9692f6c89f3dab.tar.gz enigma2-a4fd5bddb0f8c1b05b963cb8af9692f6c89f3dab.zip | |
patch by moritz venn: wrap around for minutes/hours
Diffstat (limited to 'lib/python/Components')
| -rwxr-xr-x | lib/python/Components/config.py | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/lib/python/Components/config.py b/lib/python/Components/config.py index a7724f40..6eeca698 100755 --- a/lib/python/Components/config.py +++ b/lib/python/Components/config.py @@ -629,11 +629,12 @@ class ConfigClock(ConfigSequence): def increment(self): # Check if Minutes maxed out if self._value[1] == 59: - # Check if Hours not maxed out + # Increment Hour, reset Minutes if self._value[0] < 23: - # Increment Hour, reset Minutes to 0 self._value[0] += 1 - self._value[1] = 0 + else: + self._value[0] = 0 + self._value[1] = 0 else: # Increment Minutes self._value[1] += 1 @@ -643,11 +644,12 @@ class ConfigClock(ConfigSequence): def decrement(self): # Check if Minutes is minimum if self._value[1] == 0: - # Check if Hour is greater than 0 + # Decrement Hour, set Minutes to 59 if self._value[0] > 0: - # Decrement Hour, set Minutes to 59 self._value[0] -= 1 - self._value[1] = 59 + else: + self._value[0] = 23 + self._value[1] = 59 else: # Decrement Minutes self._value[1] -= 1 |
