aboutsummaryrefslogtreecommitdiff
path: root/lib/python/Components
diff options
context:
space:
mode:
authorStefan Pluecken <stefan.pluecken@multimedia-labs.de>2010-03-04 00:19:21 +0100
committerStefan Pluecken <stefan.pluecken@multimedia-labs.de>2010-03-04 00:21:42 +0100
commitb9078822ea1ab5a65389532b3f34c2a26e4660bb (patch)
treeac244c6429ad1443aa43e866487c78960c1c3df9 /lib/python/Components
parent529d27d845bdc567ded0c43fe040ed674276936a (diff)
downloadenigma2-b9078822ea1ab5a65389532b3f34c2a26e4660bb.tar.gz
enigma2-b9078822ea1ab5a65389532b3f34c2a26e4660bb.zip
fixes bug #460
allow setting a timer end time for zapping timers zapping timers with no end time set end right after the zapping timer was started now, so no conflicts with other timers occur that the user doesn't expect
Diffstat (limited to 'lib/python/Components')
-rwxr-xr-xlib/python/Components/TimerList.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/lib/python/Components/TimerList.py b/lib/python/Components/TimerList.py
index 2a7405df..30097c96 100755
--- a/lib/python/Components/TimerList.py
+++ b/lib/python/Components/TimerList.py
@@ -33,12 +33,18 @@ class TimerList(HTMLComponent, GUIComponent, object):
count += 1
flags = flags >> 1
if timer.justplay:
- res.append((eListboxPythonMultiContent.TYPE_TEXT, 0, 50, width-150, 20, 1, RT_HALIGN_LEFT|RT_VALIGN_CENTER, repeatedtext + ((" %s "+ _("(ZAP)")) % (FuzzyTime(timer.begin)[1]))))
+ if timer.end - timer.begin < 4: # rounding differences
+ res.append((eListboxPythonMultiContent.TYPE_TEXT, 0, 50, width-150, 20, 1, RT_HALIGN_LEFT|RT_VALIGN_CENTER, repeatedtext + ((" %s "+ _("(ZAP)")) % (FuzzyTime(timer.begin)[1]))))
+ else:
+ res.append((eListboxPythonMultiContent.TYPE_TEXT, 0, 50, width-150, 20, 1, RT_HALIGN_LEFT|RT_VALIGN_CENTER, repeatedtext + ((" %s ... %s (%d " + _("mins") + ") ") % (FuzzyTime(timer.begin)[1], FuzzyTime(timer.end)[1], (timer.end - timer.begin) / 60)) + _("(ZAP)")))
else:
res.append((eListboxPythonMultiContent.TYPE_TEXT, 0, 50, width-150, 20, 1, RT_HALIGN_LEFT|RT_VALIGN_CENTER, repeatedtext + ((" %s ... %s (%d " + _("mins") + ")") % (FuzzyTime(timer.begin)[1], FuzzyTime(timer.end)[1], (timer.end - timer.begin) / 60))))
else:
if timer.justplay:
- res.append((eListboxPythonMultiContent.TYPE_TEXT, 0, 50, width-150, 20, 1, RT_HALIGN_LEFT|RT_VALIGN_CENTER, repeatedtext + (("%s, %s " + _("(ZAP)")) % (FuzzyTime(timer.begin)))))
+ if timer.end - timer.begin < 4:
+ res.append((eListboxPythonMultiContent.TYPE_TEXT, 0, 50, width-150, 20, 1, RT_HALIGN_LEFT|RT_VALIGN_CENTER, repeatedtext + (("%s, %s " + _("(ZAP)")) % (FuzzyTime(timer.begin)))))
+ else:
+ res.append((eListboxPythonMultiContent.TYPE_TEXT, 0, 50, width-150, 20, 1, RT_HALIGN_LEFT|RT_VALIGN_CENTER, repeatedtext + (("%s, %s ... %s (%d " + _("mins") + ") ") % (FuzzyTime(timer.begin) + FuzzyTime(timer.end)[1:] + ((timer.end - timer.begin) / 60,))) + _("(ZAP)")))
else:
res.append((eListboxPythonMultiContent.TYPE_TEXT, 0, 50, width-150, 20, 1, RT_HALIGN_LEFT|RT_VALIGN_CENTER, repeatedtext + (("%s, %s ... %s (%d " + _("mins") + ")") % (FuzzyTime(timer.begin) + FuzzyTime(timer.end)[1:] + ((timer.end - timer.begin) / 60,)))))