aboutsummaryrefslogtreecommitdiff
path: root/lib/python
diff options
context:
space:
mode:
authorFelix Domke <tmbinc@elitedvb.net>2006-02-20 16:35:12 +0000
committerFelix Domke <tmbinc@elitedvb.net>2006-02-20 16:35:12 +0000
commit52ef2f890b4cf1087cabac94eb88643d06f7a2c1 (patch)
tree558236823d4c43608dcf147193f9bfe00bbc33dd /lib/python
parent6122cc68226a670e637d27aac3ef7c11e3b8ac3d (diff)
downloadenigma2-52ef2f890b4cf1087cabac94eb88643d06f7a2c1.tar.gz
enigma2-52ef2f890b4cf1087cabac94eb88643d06f7a2c1.zip
fix string conversion: do not use float, remove duplicate code, fix precedence
Diffstat (limited to 'lib/python')
-rw-r--r--lib/python/Screens/ChannelSelection.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/python/Screens/ChannelSelection.py b/lib/python/Screens/ChannelSelection.py
index 86388e32..c7c1b968 100644
--- a/lib/python/Screens/ChannelSelection.py
+++ b/lib/python/Screens/ChannelSelection.py
@@ -644,9 +644,12 @@ class ChannelSelectionBase(Screen):
service.setName(service_name) # why we need this cast?
except:
if orbpos > 1800: # west
- service.setName("%s (%3.1f" + _("W") + ")" %(str, (0 - (orbpos - 3600)) / 10.0))
+ orbpos = 3600 - orbpos
+ h = _("W")
else:
- service.setName("%s (%3.1f" + _("E") + ")" % (str, orbpos / 10.0))
+ h = _("E")
+ n = ("%s (%d.%d" + h + ")") % (service_name, orbpos / 10, orbpos % 10)
+ service.setName(n)
self.servicelist.addService(service)
self.servicelist.finishFill()
if prev is not None: