aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Monzner <andreas.monzner@multimedia-labs.de>2006-10-11 12:29:11 +0000
committerAndreas Monzner <andreas.monzner@multimedia-labs.de>2006-10-11 12:29:11 +0000
commit93e5471ad948cc4504bb128f0b5fbb0a939fbcbf (patch)
treed297e78edac5bfac4a19cb283d9f3995e684f32d
parent64277bb53eb950f712b0a6c2676a44aacd0e73c0 (diff)
downloadenigma2-93e5471ad948cc4504bb128f0b5fbb0a939fbcbf.tar.gz
enigma2-93e5471ad948cc4504bb128f0b5fbb0a939fbcbf.zip
convert radiotext to utf8
-rw-r--r--data/skin.xml2
-rw-r--r--data/skin_default.xml2
-rw-r--r--lib/python/Components/Converter/RadioText.py8
-rw-r--r--lib/python/Components/Sources/RadioText.py3
4 files changed, 9 insertions, 6 deletions
diff --git a/data/skin.xml b/data/skin.xml
index eb690a94..86e593b0 100644
--- a/data/skin.xml
+++ b/data/skin.xml
@@ -64,7 +64,7 @@
<screen name="InfoBar" flags="wfNoBorder" position="0,330" size="720,198" title="InfoBar" backgroundColor="transparent" >
<widget source="RadioText" render="Label" position="50,0" size="620,50" font="LCD;25" backgroundColor="transparent">
- <convert type="RadioText">Name</convert>
+ <convert type="RadioText">RadioText-UTF8</convert>
</widget>
<ePixmap position="0,50" zPosition="-1" size="720,148" pixmap="info-bg.png" />
diff --git a/data/skin_default.xml b/data/skin_default.xml
index 40eb2355..6e931389 100644
--- a/data/skin_default.xml
+++ b/data/skin_default.xml
@@ -228,7 +228,7 @@
<widget name="key_blue" position="420,0" size="140,40" backgroundColor="blue" font="Regular;21" />
<widget name="list" position="0,45" size="560,196" scrollbarMode="showOnDemand" />
<widget source="RadioText" render="Label" position="0,241" size="560,66" font="LCD;25" >
- <convert type="RadioText">Name</convert>
+ <convert type="RadioText">RadioText-UTF8</convert>
</widget>
</screen>
<screen name="RadioInfoBar" position="90,420" size="560,105" zPosition="-1">
diff --git a/lib/python/Components/Converter/RadioText.py b/lib/python/Components/Converter/RadioText.py
index 77ec58ed..e4499950 100644
--- a/lib/python/Components/Converter/RadioText.py
+++ b/lib/python/Components/Converter/RadioText.py
@@ -4,12 +4,16 @@ from Components.Element import cached
class RadioText(Converter, object):
def __init__(self, type):
Converter.__init__(self, type)
+ self.type = type
@cached
def getText(self):
rt = self.source.radiotext
if rt is None:
return "N/A"
- return rt
-
+ text = rt.getRadioText()
+ if self.type == "RadioText-UTF8":
+ return text.decode("latin-1").encode("utf-8")
+ else:
+ return text
text = property(getText)
diff --git a/lib/python/Components/Sources/RadioText.py b/lib/python/Components/Sources/RadioText.py
index 6faad317..de10ad81 100644
--- a/lib/python/Components/Sources/RadioText.py
+++ b/lib/python/Components/Sources/RadioText.py
@@ -16,8 +16,7 @@ class RadioText(PerServiceBase, Source, object):
@cached
def getText(self):
service = self.navcore.getCurrentService()
- info = service and service.radioText()
- return info and info.getRadioText()
+ return service and service.radioText()
radiotext = property(getText)