<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" />
<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">
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)
@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)