From dbdd7b433aa9c2da4fdd52b260c939e6041c96b2 Mon Sep 17 00:00:00 2001 From: Fraxinas Date: Mon, 8 Dec 2008 13:34:07 +0100 Subject: get rid off trailing colon : from translatable strings for tag keys --- lib/python/Plugins/Extensions/MediaPlayer/plugin.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'lib/python') diff --git a/lib/python/Plugins/Extensions/MediaPlayer/plugin.py b/lib/python/Plugins/Extensions/MediaPlayer/plugin.py index 9ab23e5f..485dfe32 100644 --- a/lib/python/Plugins/Extensions/MediaPlayer/plugin.py +++ b/lib/python/Plugins/Extensions/MediaPlayer/plugin.py @@ -123,15 +123,15 @@ class MediaPlayer(Screen, InfoBarBase, InfoBarSeek, InfoBarAudioSelection, InfoB self["currenttext"] = Label("") - self["artisttext"] = Label(_("Artist:")) + self["artisttext"] = Label(_("Artist")+':') self["artist"] = Label("") - self["titletext"] = Label(_("Title:")) + self["titletext"] = Label(_("Title")+':') self["title"] = Label("") - self["albumtext"] = Label(_("Album:")) + self["albumtext"] = Label(_("Album")+':') self["album"] = Label("") - self["yeartext"] = Label(_("Year:")) + self["yeartext"] = Label(_("Year")+':') self["year"] = Label("") - self["genretext"] = Label(_("Genre:")) + self["genretext"] = Label(_("Genre")+':') self["genre"] = Label("") self["coverArt"] = MediaPixmap() self["repeat"] = MultiPixmap() -- cgit v1.2.3 From d53eb38c31fb300d39c98fef81af99a40819246f Mon Sep 17 00:00:00 2001 From: Fraxinas Date: Mon, 8 Dec 2008 13:35:55 +0100 Subject: allow using complex shell commandlines (including | etc.) for job tasks (handle with care, no tool exist precondition checking!) --- lib/python/Components/Task.py | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'lib/python') diff --git a/lib/python/Components/Task.py b/lib/python/Components/Task.py index 9a768425..04e5c938 100644 --- a/lib/python/Components/Task.py +++ b/lib/python/Components/Task.py @@ -127,6 +127,7 @@ class Task(object): self.cmd = None self.cwd = "/tmp" self.args = [ ] + self.cmdline = None self.task_progress_changed = None self.output_line = "" job.addTask(self) @@ -141,6 +142,9 @@ class Task(object): self.global_preconditions.append(ToolExistsPrecondition()) self.postconditions.append(ReturncodePostcondition()) + def setCmdline(self, cmdline): + self.cmdline = cmdline + def checkPreconditions(self, immediate = False): not_met = [ ] if immediate: @@ -166,13 +170,15 @@ class Task(object): self.container.stdoutAvail.append(self.processStdout) self.container.stderrAvail.append(self.processStderr) - assert self.cmd is not None - assert len(self.args) >= 1 - if self.cwd is not None: self.container.setCWD(self.cwd) - print "execute:", self.container.execute(self.cmd, *self.args), self.cmd, self.args + if not self.cmd and self.cmdline: + print "execute:", self.container.execute(self.cmdline), self.cmdline + else: + assert self.cmd is not None + assert len(self.args) >= 1 + print "execute:", self.container.execute(self.cmd, *self.args), ' '.join(self.args) if self.initial_input: self.writeInput(self.initial_input) -- cgit v1.2.3 From 5d283dd8a7936fe8cc53fff4962c39dde1a6d22a Mon Sep 17 00:00:00 2001 From: Fraxinas Date: Mon, 8 Dec 2008 13:36:58 +0100 Subject: change translateable year string from lower to upper case to save one po entry --- lib/python/Plugins/Extensions/DVDBurn/ProjectSettings.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/python') diff --git a/lib/python/Plugins/Extensions/DVDBurn/ProjectSettings.py b/lib/python/Plugins/Extensions/DVDBurn/ProjectSettings.py index 85d81706..7407263d 100644 --- a/lib/python/Plugins/Extensions/DVDBurn/ProjectSettings.py +++ b/lib/python/Plugins/Extensions/DVDBurn/ProjectSettings.py @@ -104,7 +104,7 @@ class ProjectSettings(Screen,ConfigListScreen): self["key_yellow"] = StaticText(_("Load")) self["key_blue"] = StaticText(_("Save")) - infotext = _("Available format variables") + ":\n$i=" + _("Track") + ", $t=" + _("Title") + ", $d=" + _("Description") + ", $l=" + _("length") + ", $c=" + _("chapters") + ",\n" + _("Record") + " $T=" + _("Begin time") + ", $Y=" + _("year") + ", $M=" + _("month") + ", $D=" + _("day") + ",\n$A=" + _("audio tracks") + ", $C=" + _("Channel") + ", $f=" + _("filename") + infotext = _("Available format variables") + ":\n$i=" + _("Track") + ", $t=" + _("Title") + ", $d=" + _("Description") + ", $l=" + _("length") + ", $c=" + _("chapters") + ",\n" + _("Record") + " $T=" + _("Begin time") + ", $Y=" + _("Year") + ", $M=" + _("month") + ", $D=" + _("day") + ",\n$A=" + _("audio tracks") + ", $C=" + _("Channel") + ", $f=" + _("filename") self["info"] = StaticText(infotext) self.settings = project.settings -- cgit v1.2.3 From 22e4755ccb4820da1a50c7301951978dc45eaab3 Mon Sep 17 00:00:00 2001 From: Fraxinas Date: Mon, 8 Dec 2008 13:43:31 +0100 Subject: add search parameter for NumericalTextInput which supplies a mapping with only lowercase and standard ascii characters plus number plus SQL wildcards --- lib/python/Tools/NumericalTextInput.py | 33 +++++++++++++++++++++++---------- 1 file changed, 23 insertions(+), 10 deletions(-) (limited to 'lib/python') diff --git a/lib/python/Tools/NumericalTextInput.py b/lib/python/Tools/NumericalTextInput.py index 5954c9c3..be4cf01f 100644 --- a/lib/python/Tools/NumericalTextInput.py +++ b/lib/python/Tools/NumericalTextInput.py @@ -3,12 +3,33 @@ from enigma import eTimer from Components.Language import language class NumericalTextInput: - def __init__(self, nextFunc=None, handleTimeout = True): + def __init__(self, nextFunc=None, handleTimeout = True, search = False): self.mapping = [] self.lang = language.getLanguage() self.useableChars=None self.nextFunction=nextFunc - + + if handleTimeout: + self.timer = eTimer() + self.timer.callback.append(self.timeout) + else: + self.timer = None + self.lastKey = -1 + self.pos = -1 + + if search: + self.mapping.append (u"%_0") # 0 + self.mapping.append (u" 1") # 1 + self.mapping.append (u"abc2") # 2 + self.mapping.append (u"def3") # 3 + self.mapping.append (u"ghi4") # 4 + self.mapping.append (u"jkl5") # 5 + self.mapping.append (u"mno6") # 6 + self.mapping.append (u"pqrs7") # 7 + self.mapping.append (u"tuv8") # 8 + self.mapping.append (u"wxyz9") # 9 + return + if self.lang == 'de_DE': self.mapping.append (u".,?'+\"0-()@/:_$!") # 0 self.mapping.append (u" 1") # 1 @@ -54,14 +75,6 @@ class NumericalTextInput: self.mapping.append (u"tuv8TUV") # 8 self.mapping.append (u"wxyz9WXYZ") # 9 - if handleTimeout: - self.timer = eTimer() - self.timer.callback.append(self.timeout) - else: - self.timer = None - self.lastKey = -1 - self.pos = -1 - def setUseableChars(self, useable): self.useableChars = useable -- cgit v1.2.3 From 73b5c76cb020ac7baa2536e14997618b0e17eef5 Mon Sep 17 00:00:00 2001 From: Fraxinas Date: Mon, 8 Dec 2008 13:45:18 +0100 Subject: add new config types ConfigSearchText, which uses the new sql NumericalTextInput search map plus type ConfigDirectory which displays paths as strings --- lib/python/Components/config.py | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'lib/python') diff --git a/lib/python/Components/config.py b/lib/python/Components/config.py index d79337ba..cfa4318c 100755 --- a/lib/python/Components/config.py +++ b/lib/python/Components/config.py @@ -926,6 +926,31 @@ class ConfigNumber(ConfigText): self.marked_pos = 0 self.offset = 0 +class ConfigSearchText(ConfigText): + def __init__(self, default = "", fixed_size = False, visible_width = False): + ConfigText.__init__(self, default = default, fixed_size = fixed_size, visible_width = visible_width) + NumericalTextInput.__init__(self, nextFunc = self.nextFunc, handleTimeout = False, search = True) + +class ConfigDirectory(ConfigText): + def __init__(self, default="", visible_width=60): + ConfigText.__init__(self, default, fixed_size = True, visible_width = visible_width) + def handleKey(self, key): + pass + def getValue(self): + if self.text == "": + return None + else: + return ConfigText.getValue(self) + def setValue(self, val): + if val == None: + val = "" + ConfigText.setValue(self, val) + def getMulti(self, selected): + if self.text == "": + return ("mtext"[1-selected:], _("List of Storage Devices"), range(0)) + else: + return ConfigText.getMulti(self, selected) + # a slider. class ConfigSlider(ConfigElement): def __init__(self, default = 0, increment = 1, limits = (0, 100)): -- cgit v1.2.3 From 9920b499d772afe24a40b71c8dfdd4e11bdfcf8e Mon Sep 17 00:00:00 2001 From: Fraxinas Date: Mon, 8 Dec 2008 13:47:30 +0100 Subject: use ConfigDirectory from config.py instead of local definition --- .../Plugins/Extensions/MediaPlayer/settings.py | 22 +--------------------- 1 file changed, 1 insertion(+), 21 deletions(-) (limited to 'lib/python') diff --git a/lib/python/Plugins/Extensions/MediaPlayer/settings.py b/lib/python/Plugins/Extensions/MediaPlayer/settings.py index c6d274bd..416ab2ee 100644 --- a/lib/python/Plugins/Extensions/MediaPlayer/settings.py +++ b/lib/python/Plugins/Extensions/MediaPlayer/settings.py @@ -3,30 +3,10 @@ from Screens.HelpMenu import HelpableScreen from Components.Label import Label from Components.FileList import FileList from Components.MediaPlayer import PlayList -from Components.config import config, getConfigListEntry, ConfigSubsection, configfile, ConfigText, ConfigYesNo +from Components.config import config, getConfigListEntry, ConfigSubsection, configfile, ConfigText, ConfigYesNo, ConfigDirectory from Components.ConfigList import ConfigListScreen from Components.ActionMap import ActionMap -class ConfigDirectory(ConfigText): - def __init__(self, default="", visible_width=60): - ConfigText.__init__(self, default, fixed_size = True, visible_width = visible_width) - def handleKey(self, key): - pass - def getValue(self): - if self.text == "": - return None - else: - return ConfigText.getValue(self) - def setValue(self, val): - if val == None: - val = "" - ConfigText.setValue(self, val) - def getMulti(self, selected): - if self.text == "": - return ("mtext"[1-selected:], _("List of Storage Devices"), range(0)) - else: - return ConfigText.getMulti(self, selected) - config.mediaplayer = ConfigSubsection() config.mediaplayer.repeat = ConfigYesNo(default=False) config.mediaplayer.savePlaylistOnExit = ConfigYesNo(default=True) -- cgit v1.2.3 From 91f1726f99acf507973513a7203cbd1306275718 Mon Sep 17 00:00:00 2001 From: Fraxinas Date: Mon, 8 Dec 2008 14:50:20 +0100 Subject: change character encoding of source file from 8859-1 to utf-8 --- lib/python/Tools/NumericalTextInput.py | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'lib/python') diff --git a/lib/python/Tools/NumericalTextInput.py b/lib/python/Tools/NumericalTextInput.py index be4cf01f..c5576405 100644 --- a/lib/python/Tools/NumericalTextInput.py +++ b/lib/python/Tools/NumericalTextInput.py @@ -1,4 +1,4 @@ -# -*- coding: iso-8859-1 -*- +# -*- coding: utf-8 -*- from enigma import eTimer from Components.Language import language @@ -33,33 +33,33 @@ class NumericalTextInput: if self.lang == 'de_DE': self.mapping.append (u".,?'+\"0-()@/:_$!") # 0 self.mapping.append (u" 1") # 1 - self.mapping.append (u"abc2ABC") # 2 + self.mapping.append (u"aäbc2AÄBC") # 2 self.mapping.append (u"def3DEF") # 3 self.mapping.append (u"ghi4GHI") # 4 self.mapping.append (u"jkl5JKL") # 5 - self.mapping.append (u"mno6MNO") # 6 - self.mapping.append (u"pqrs7PQRS") # 7 - self.mapping.append (u"tuv8TUV") # 8 + self.mapping.append (u"mnoö6MNOÖ") # 6 + self.mapping.append (u"pqrsß7PQRSß") # 7 + self.mapping.append (u"tuüv8TUÜV") # 8 self.mapping.append (u"wxyz9WXYZ") # 9 elif self.lang == 'es_ES': self.mapping.append (u".,?'+\"0-()@/:_$!") # 0 self.mapping.append (u" 1") # 1 - self.mapping.append (u"abc2ABC") # 2 - self.mapping.append (u"def3DEF") # 3 - self.mapping.append (u"ghi4GHI") # 4 + self.mapping.append (u"abcáà2ABCÁÀ") # 2 + self.mapping.append (u"deéèf3DEFÉÈ") # 3 + self.mapping.append (u"ghiíì4GHIÍÌ") # 4 self.mapping.append (u"jkl5JKL") # 5 - self.mapping.append (u"mno6MNO") # 6 + self.mapping.append (u"mnñoóò6MNÑOÓÒ") # 6 self.mapping.append (u"pqrs7PQRS") # 7 - self.mapping.append (u"tuv8TUV") # 8 + self.mapping.append (u"tuvúù8TUVÚÙ") # 8 self.mapping.append (u"wxyz9WXYZ") # 9 if self.lang in ['sv_SE', 'fi_FI']: self.mapping.append (u".,?'+\"0-()@/:_$!") # 0 self.mapping.append (u" 1") # 1 - self.mapping.append (u"abc2ABC") # 2 - self.mapping.append (u"def3DEF") # 3 + self.mapping.append (u"abcåä2ABCÅÄ") # 2 + self.mapping.append (u"defé3DEFÉ") # 3 self.mapping.append (u"ghi4GHI") # 4 self.mapping.append (u"jkl5JKL") # 5 - self.mapping.append (u"mno6MNO") # 6 + self.mapping.append (u"mnoö6MNOÖ") # 6 self.mapping.append (u"pqrs7PQRS") # 7 self.mapping.append (u"tuv8TUV") # 8 self.mapping.append (u"wxyz9WXYZ") # 9 -- cgit v1.2.3 From f1b8049d3735b3f6544e84817e9c7d3bca474d5e Mon Sep 17 00:00:00 2001 From: ghost Date: Mon, 8 Dec 2008 15:50:30 +0100 Subject: remove agc --- lib/python/Plugins/SystemPlugins/PositionerSetup/plugin.py | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) (limited to 'lib/python') diff --git a/lib/python/Plugins/SystemPlugins/PositionerSetup/plugin.py b/lib/python/Plugins/SystemPlugins/PositionerSetup/plugin.py index d67a97cb..c8aa2718 100644 --- a/lib/python/Plugins/SystemPlugins/PositionerSetup/plugin.py +++ b/lib/python/Plugins/SystemPlugins/PositionerSetup/plugin.py @@ -28,16 +28,13 @@ class PositionerSetup(Screen): - - + - - + - - + @@ -87,14 +84,11 @@ class PositionerSetup(Screen): self.createSetup() self["snr"] = Label() - self["agc"] = Label() self["ber"] = Label() self["lock"] = Label() self["snr_percentage"] = TunerInfo(TunerInfo.SNR_PERCENTAGE, statusDict = self.frontendStatus) - self["agc_percentage"] = TunerInfo(TunerInfo.AGC_PERCENTAGE, statusDict = self.frontendStatus) self["ber_value"] = TunerInfo(TunerInfo.BER_VALUE, statusDict = self.frontendStatus) self["snr_bar"] = TunerInfo(TunerInfo.SNR_BAR, statusDict = self.frontendStatus) - self["agc_bar"] = TunerInfo(TunerInfo.AGC_BAR, statusDict = self.frontendStatus) self["ber_bar"] = TunerInfo(TunerInfo.BER_BAR, statusDict = self.frontendStatus) self["lock_state"] = TunerInfo(TunerInfo.LOCK_STATE, statusDict = self.frontendStatus) @@ -330,10 +324,8 @@ class PositionerSetup(Screen): if self.frontend: self.frontend.getFrontendStatus(self.frontendStatus) self["snr_percentage"].update() - self["agc_percentage"].update() self["ber_value"].update() self["snr_bar"].update() - self["agc_bar"].update() self["ber_bar"].update() self["lock_state"].update() transponderdata = self.tuner.getTransponderData() -- cgit v1.2.3