Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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
Dr.Best
committed
Dec 3, 2013
1 parent
cebad50
commit 941b7bb
Showing
7 changed files
with
62 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,2 @@ | |||
Description: ChannelSelectionShortTitle Converter | |||
Depends: enigma2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1 @@ | |||
SUBDIRS = src |
39 changes: 39 additions & 0 deletions
39
channelselectionshorttitle/src/ChannelSelectionShortTitle.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,4 @@ | |||
installdir = $(libdir)/enigma2/python/Plugins/SkinComponents/ChannelSelectionShortTitle | |||
converterinstalldir = $(libdir)/enigma2/python/Components/Converter | |||
install_DATA = README | |||
converterinstall_PYTHON = ChannelSelectionShortTitle.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -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> | |||
|
|||
|
|||
|
|||
|
|||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters