Permalink
Browse files

new converter: ChannelSelectionShortTitle Converter --> this converte…

…r truncates the original title of ChannelSelection --> "title (MODE)" will be cut off

Usage:
<widget backgroundColor="secondBG" font="Regular;24" position="70,5" render="Label" size="850,80" source="Title" transparent="1" valign="center" zPosition="1">
	<convert type="ChannelSelectionShortTitle"/>
</widget>
  • Loading branch information...
1 parent cebad50 commit 941b7bb8c19097ca202bc9b86d628e6334d19630 @drbest2 drbest2 committed Dec 3, 2013
View
@@ -18,6 +18,7 @@ SUBDIRS = \
bitrateviewer \
bonjour \
cdinfo \
+ channelselectionshorttitle \
curlytx \
dreamexplorer \
dreamirc \
@@ -0,0 +1,2 @@
+Description: ChannelSelectionShortTitle Converter
+Depends: enigma2
@@ -0,0 +1 @@
+SUBDIRS = src
@@ -0,0 +1,39 @@
+#
+# ChannelSelectionShortTitle - Converter
+#
+# Coded by Dr.Best (c) 2013
+# Support: www.dreambox-tools.info
+# E-Mail: dr.best@dreambox-tools.info
+#
+# This plugin is open source but it is NOT free software.
+#
+# This plugin may only be distributed to and executed on hardware which
+# is licensed by Dream Multimedia GmbH.
+# In other words:
+# It's NOT allowed to distribute any parts of this plugin or its source code in ANY way
+# to hardware which is NOT licensed by Dream Multimedia GmbH.
+# It's NOT allowed to execute this plugin and its source code or even parts of it in ANY way
+# on hardware which is NOT licensed by Dream Multimedia GmbH.
+#
+# If you want to use or modify the code or parts of it,
+# you have to keep MY license and inform me about the modifications by mail.
+#
+
+from Components.Converter.Converter import Converter
+from Components.Element import cached
+from Components.config import config
+
+class ChannelSelectionShortTitle(Converter, object):
+ def __init__(self, type):
+ Converter.__init__(self, type)
+
+ @cached
+ def getText(self):
+ title = self.source.text
+ t = " (%s) " % config.servicelist.lastmode.value.upper()
+ pos = title.find(t)
+ if pos != -1:
+ title = title[pos+len(t):]
+ return title
+
+ text = property(getText)
@@ -0,0 +1,4 @@
+installdir = $(libdir)/enigma2/python/Plugins/SkinComponents/ChannelSelectionShortTitle
+converterinstalldir = $(libdir)/enigma2/python/Components/Converter
+install_DATA = README
+converterinstall_PYTHON = ChannelSelectionShortTitle.py
@@ -0,0 +1,12 @@
+Description: ChannelSelectionShortTitle Converter
+This converter truncates the original title of ChannelSelection --> "title (MODE)" will be cut off
+
+Usage:
+<widget backgroundColor="secondBG" font="Regular;24" position="70,5" render="Label" size="850,80" source="Title" transparent="1" valign="center" zPosition="1">
+ <convert type="ChannelSelectionShortTitle"/>
+</widget>
+
+
+
+
+
View
@@ -142,6 +142,9 @@ cdinfo/Makefile
cdinfo/meta/Makefile
cdinfo/src/Makefile
+channelselectionshorttitle/Makefile
+channelselectionshorttitle/src/Makefile
+
curlytx/Makefile
curlytx/meta/Makefile
curlytx/po/Makefile

0 comments on commit 941b7bb

Please sign in to comment.