From d711c0e93592fa1e1df0fde808fe2bed39687421 Mon Sep 17 00:00:00 2001 From: ghost Date: Wed, 30 Dec 2009 17:11:58 +0100 Subject: show a short symbol when a unhandled key is pressed this fixes bug #293 --- lib/python/Screens/InfoBar.py | 6 ++--- lib/python/Screens/InfoBarGenerics.py | 41 ++++++++++++++++++++++++++++++++++- lib/python/Screens/Makefile.am | 2 +- lib/python/Screens/UnhandledKey.py | 7 ++++++ 4 files changed, 51 insertions(+), 5 deletions(-) create mode 100644 lib/python/Screens/UnhandledKey.py (limited to 'lib/python') diff --git a/lib/python/Screens/InfoBar.py b/lib/python/Screens/InfoBar.py index a15c7ac1..5b061245 100644 --- a/lib/python/Screens/InfoBar.py +++ b/lib/python/Screens/InfoBar.py @@ -12,7 +12,7 @@ profile("LOAD:InfoBarGenerics") from Screens.InfoBarGenerics import InfoBarShowHide, \ InfoBarNumberZap, InfoBarChannelSelection, InfoBarMenu, InfoBarRdsDecoder, \ InfoBarEPG, InfoBarSeek, InfoBarInstantRecord, \ - InfoBarAudioSelection, InfoBarAdditionalInfo, InfoBarNotifications, InfoBarDish, \ + InfoBarAudioSelection, InfoBarAdditionalInfo, InfoBarNotifications, InfoBarDish, InfoBarUnhandledKey, \ InfoBarSubserviceSelection, InfoBarShowMovies, InfoBarTimeshift, \ InfoBarServiceNotifications, InfoBarPVRState, InfoBarCueSheetSupport, InfoBarSimpleEventView, \ InfoBarSummarySupport, InfoBarMoviePlayerSummarySupport, InfoBarTimeshiftState, InfoBarTeletextPlugin, InfoBarExtensions, \ @@ -29,7 +29,7 @@ from Screens.HelpMenu import HelpableScreen class InfoBar(InfoBarBase, InfoBarShowHide, InfoBarNumberZap, InfoBarChannelSelection, InfoBarMenu, InfoBarEPG, InfoBarRdsDecoder, InfoBarInstantRecord, InfoBarAudioSelection, - HelpableScreen, InfoBarAdditionalInfo, InfoBarNotifications, InfoBarDish, + HelpableScreen, InfoBarAdditionalInfo, InfoBarNotifications, InfoBarDish, InfoBarUnhandledKey, InfoBarSubserviceSelection, InfoBarTimeshift, InfoBarSeek, InfoBarSummarySupport, InfoBarTimeshiftState, InfoBarTeletextPlugin, InfoBarExtensions, InfoBarPiP, InfoBarPlugins, InfoBarSubtitleSupport, InfoBarServiceErrorPopupSupport, InfoBarJobman, @@ -52,7 +52,7 @@ class InfoBar(InfoBarBase, InfoBarShowHide, for x in HelpableScreen, \ InfoBarBase, InfoBarShowHide, \ InfoBarNumberZap, InfoBarChannelSelection, InfoBarMenu, InfoBarEPG, InfoBarRdsDecoder, \ - InfoBarInstantRecord, InfoBarAudioSelection, \ + InfoBarInstantRecord, InfoBarAudioSelection, InfoBarUnhandledKey, \ InfoBarAdditionalInfo, InfoBarNotifications, InfoBarDish, InfoBarSubserviceSelection, \ InfoBarTimeshift, InfoBarSeek, InfoBarSummarySupport, InfoBarTimeshiftState, \ InfoBarTeletextPlugin, InfoBarExtensions, InfoBarPiP, InfoBarSubtitleSupport, InfoBarJobman, \ diff --git a/lib/python/Screens/InfoBarGenerics.py b/lib/python/Screens/InfoBarGenerics.py index a3e56a40..c8aa00cb 100644 --- a/lib/python/Screens/InfoBarGenerics.py +++ b/lib/python/Screens/InfoBarGenerics.py @@ -26,13 +26,14 @@ from Screens.PictureInPicture import PictureInPicture from Screens.SubtitleDisplay import SubtitleDisplay from Screens.RdsDisplay import RdsInfoDisplay, RassInteractive from Screens.TimeDateInput import TimeDateInput +from Screens.UnhandledKey import UnhandledKey from ServiceReference import ServiceReference from Tools import Notifications from Tools.Directories import fileExists from enigma import eTimer, eServiceCenter, eDVBServicePMTHandler, iServiceInformation, \ - iPlayableService, eServiceReference, eEPGCache + iPlayableService, eServiceReference, eEPGCache, eActionMap from time import time, localtime, strftime from os import stat as os_stat @@ -47,6 +48,44 @@ class InfoBarDish: def __init__(self): self.dishDialog = self.session.instantiateDialog(Dish) +class InfoBarUnhandledKey: + def __init__(self): + self.unhandledKeyDialog = self.session.instantiateDialog(UnhandledKey) + self.hideTimer = eTimer() + self.hideTimer.callback.append(self.unhandledKeyDialog.hide) + self.checkUnusedTimer = eTimer() + self.checkUnusedTimer.callback.append(self.checkUnused) + self.onLayoutFinish.append(self.unhandledKeyDialog.hide) + eActionMap.getInstance().bindAction('', -0x7FFFFFFF, self.actionA) #highest prio + eActionMap.getInstance().bindAction('', 0x7FFFFFFF, self.actionB) #lowest prio + self.key = -1; + self.flags = 0; + self.uflags = 0; + + #this function is called on every keypress! + def actionA(self, key, flag): + if flag != 4: + if self.key != key: + if self.checkUnusedTimer.isActive(): + self.checkUnusedTimer.stop() + self.checkUnused() + self.key = key + self.flags = self.uflags = 0 + self.flags |= (1< Date: Wed, 30 Dec 2009 18:08:16 +0100 Subject: InfoBarGenerics.py: small cleanup --- lib/python/Screens/InfoBarGenerics.py | 3 --- 1 file changed, 3 deletions(-) (limited to 'lib/python') diff --git a/lib/python/Screens/InfoBarGenerics.py b/lib/python/Screens/InfoBarGenerics.py index c8aa00cb..805b0f27 100644 --- a/lib/python/Screens/InfoBarGenerics.py +++ b/lib/python/Screens/InfoBarGenerics.py @@ -66,9 +66,6 @@ class InfoBarUnhandledKey: def actionA(self, key, flag): if flag != 4: if self.key != key: - if self.checkUnusedTimer.isActive(): - self.checkUnusedTimer.stop() - self.checkUnused() self.key = key self.flags = self.uflags = 0 self.flags |= (1< Date: Wed, 30 Dec 2009 18:35:59 +0100 Subject: InfoBarGenerics.py: fix handling for unused key indication when two times the same key is pressed, small cleanup --- lib/python/Screens/InfoBarGenerics.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'lib/python') diff --git a/lib/python/Screens/InfoBarGenerics.py b/lib/python/Screens/InfoBarGenerics.py index 805b0f27..a08621c8 100644 --- a/lib/python/Screens/InfoBarGenerics.py +++ b/lib/python/Screens/InfoBarGenerics.py @@ -58,15 +58,13 @@ class InfoBarUnhandledKey: self.onLayoutFinish.append(self.unhandledKeyDialog.hide) eActionMap.getInstance().bindAction('', -0x7FFFFFFF, self.actionA) #highest prio eActionMap.getInstance().bindAction('', 0x7FFFFFFF, self.actionB) #lowest prio - self.key = -1; - self.flags = 0; + self.flags = (1<<1); self.uflags = 0; #this function is called on every keypress! def actionA(self, key, flag): if flag != 4: - if self.key != key: - self.key = key + if self.flags & (1<<1): self.flags = self.uflags = 0 self.flags |= (1< Date: Thu, 31 Dec 2009 09:55:18 +0100 Subject: InfoBarGenerics.py: rename timer to fix automatic infobar hide after channel change --- lib/python/Screens/InfoBarGenerics.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lib/python') diff --git a/lib/python/Screens/InfoBarGenerics.py b/lib/python/Screens/InfoBarGenerics.py index a08621c8..6dd80533 100644 --- a/lib/python/Screens/InfoBarGenerics.py +++ b/lib/python/Screens/InfoBarGenerics.py @@ -51,8 +51,8 @@ class InfoBarDish: class InfoBarUnhandledKey: def __init__(self): self.unhandledKeyDialog = self.session.instantiateDialog(UnhandledKey) - self.hideTimer = eTimer() - self.hideTimer.callback.append(self.unhandledKeyDialog.hide) + self.hideUnhandledKeySymbolTimer = eTimer() + self.hideUnhandledKeySymbolTimer.callback.append(self.unhandledKeyDialog.hide) self.checkUnusedTimer = eTimer() self.checkUnusedTimer.callback.append(self.checkUnused) self.onLayoutFinish.append(self.unhandledKeyDialog.hide) @@ -79,7 +79,7 @@ class InfoBarUnhandledKey: def checkUnused(self): if self.flags == self.uflags: self.unhandledKeyDialog.show() - self.hideTimer.start(2000, True) + self.hideUnhandledKeySymbolTimer.start(2000, True) class InfoBarShowHide: """ InfoBar show/hide control, accepts toggleShow and hide actions, might start -- cgit v1.2.3 From 030f977e0a582b9ab6c7bc0ab39d7219f8a8ae97 Mon Sep 17 00:00:00 2001 From: thedoc Date: Tue, 15 Dec 2009 15:38:30 +0100 Subject: fixes bug #269 add "activate picture in picture" to ChannelSelection context menu to activate PiP for the currently selected service --- lib/python/Screens/ChannelSelection.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'lib/python') diff --git a/lib/python/Screens/ChannelSelection.py b/lib/python/Screens/ChannelSelection.py index 0432823b..d4a098c3 100644 --- a/lib/python/Screens/ChannelSelection.py +++ b/lib/python/Screens/ChannelSelection.py @@ -25,6 +25,7 @@ from Screens.InputBox import InputBox, PinInput from Screens.MessageBox import MessageBox from Screens.ServiceInfo import ServiceInfo profile("ChannelSelection.py 4") +from Screens.PictureInPicture import PictureInPicture from Screens.RdsDisplay import RassInteractive from ServiceReference import ServiceReference from Tools.BoundFunction import boundFunction @@ -101,6 +102,7 @@ class ChannelContextMenu(Screen): if not inBouquetRootList: isPlayable = not (current_sel_flags & (eServiceReference.isMarker|eServiceReference.isDirectory)) if isPlayable: + append_when_current_valid(current, menu, (_("Activate Picture in Picture"), self.showServiceInPiP), level = 0) if config.ParentalControl.configured.value: if parentalControl.getProtectionLevel(csel.getCurrentSelection().toCompareString()) == -1: append_when_current_valid(current, menu, (_("add to parental protection"), boundFunction(self.addParentalProtection, csel.getCurrentSelection())), level = 0) @@ -189,6 +191,21 @@ class ChannelContextMenu(Screen): self.close() else: self.session.openWithCallback(self.close, MessageBox, _("The pin code you entered is wrong."), MessageBox.TYPE_ERROR) + + def showServiceInPiP(self): + if self.session.pipshown: + del self.session.pip + self.session.pip = self.session.instantiateDialog(PictureInPicture) + self.session.pip.show() + newservice = self.csel.servicelist.getCurrent() + if self.session.pip.playService(newservice): + self.session.pipshown = True + self.session.pip.servicePath = self.csel.getCurrentServicePath() + self.close() + else: + self.session.pipshown = False + del self.session.pip + self.session.openWithCallback(self.close, MessageBox, _("Could not open Picture in Picture"), MessageBox.TYPE_ERROR) def addServiceToBouquetSelected(self): bouquets = self.csel.getBouquetList() -- cgit v1.2.3 From 37d2bc32217dfcabeee9c952e901e2fa6d3809a4 Mon Sep 17 00:00:00 2001 From: thedoc Date: Tue, 15 Dec 2009 16:18:52 +0100 Subject: fixes bug #354 change MenuList to ChoiceList in ChannelContext and assign Blue button to PiP activation --- data/skin_default.xml | 4 ++-- lib/python/Components/ChoiceList.py | 2 +- lib/python/Screens/ChannelSelection.py | 27 +++++++++++++++++---------- 3 files changed, 20 insertions(+), 13 deletions(-) (limited to 'lib/python') diff --git a/data/skin_default.xml b/data/skin_default.xml index bf21b715..85c4016a 100755 --- a/data/skin_default.xml +++ b/data/skin_default.xml @@ -70,8 +70,8 @@ - - + + diff --git a/lib/python/Components/ChoiceList.py b/lib/python/Components/ChoiceList.py index 4700e9e6..33868d61 100755 --- a/lib/python/Components/ChoiceList.py +++ b/lib/python/Components/ChoiceList.py @@ -3,7 +3,7 @@ from Tools.Directories import SCOPE_CURRENT_SKIN, resolveFilename from enigma import RT_HALIGN_LEFT, eListboxPythonMultiContent, gFont from Tools.LoadPixmap import LoadPixmap -def ChoiceEntryComponent(key, text): +def ChoiceEntryComponent(key = "", text = ["--"]): res = [ text ] if text[0] == "--": res.append((eListboxPythonMultiContent.TYPE_TEXT, 0, 00, 800, 25, 0, RT_HALIGN_LEFT, "-"*200)) diff --git a/lib/python/Screens/ChannelSelection.py b/lib/python/Screens/ChannelSelection.py index d4a098c3..e8bbce15 100644 --- a/lib/python/Screens/ChannelSelection.py +++ b/lib/python/Screens/ChannelSelection.py @@ -21,6 +21,7 @@ profile("ChannelSelection.py 2.3") from Components.Input import Input profile("ChannelSelection.py 3") from Components.ParentalControl import parentalControl +from Components.ChoiceList import ChoiceList, ChoiceEntryComponent from Screens.InputBox import InputBox, PinInput from Screens.MessageBox import MessageBox from Screens.ServiceInfo import ServiceInfo @@ -70,9 +71,9 @@ OFF = 0 EDIT_BOUQUET = 1 EDIT_ALTERNATIVES = 2 -def append_when_current_valid(current, menu, args, level = 0): +def append_when_current_valid(current, menu, args, level = 0, key = ""): if current and current.valid() and level <= config.usage.setup_level.index: - menu.append(args) + menu.append(ChoiceEntryComponent(key, args)) class ChannelContextMenu(Screen): def __init__(self, session, csel): @@ -81,13 +82,15 @@ class ChannelContextMenu(Screen): self.csel = csel self.bsel = None - self["actions"] = ActionMap(["OkCancelActions"], + self["actions"] = ActionMap(["OkCancelActions", "ColorActions", "NumberActions"], { "ok": self.okbuttonClick, - "cancel": self.cancelClick + "cancel": self.cancelClick, + "blue": self.showServiceInPiP }) menu = [ ] + self.pipAvailable = False current = csel.getCurrentSelection() current_root = csel.getRoot() current_sel_path = current.getPath() @@ -102,7 +105,6 @@ class ChannelContextMenu(Screen): if not inBouquetRootList: isPlayable = not (current_sel_flags & (eServiceReference.isMarker|eServiceReference.isDirectory)) if isPlayable: - append_when_current_valid(current, menu, (_("Activate Picture in Picture"), self.showServiceInPiP), level = 0) if config.ParentalControl.configured.value: if parentalControl.getProtectionLevel(csel.getCurrentSelection().toCompareString()) == -1: append_when_current_valid(current, menu, (_("add to parental protection"), boundFunction(self.addParentalProtection, csel.getCurrentSelection())), level = 0) @@ -124,8 +126,11 @@ class ChannelContextMenu(Screen): append_when_current_valid(current, menu, (_("remove entry"), self.removeCurrentService), level = 0) if current_root and current_root.getPath().find("flags == %d" %(FLAG_SERVICE_NEW_FOUND)) != -1: append_when_current_valid(current, menu, (_("remove new found flag"), self.removeNewFoundFlag), level = 0) + if isPlayable: + append_when_current_valid(current, menu, (_("Activate Picture in Picture"), self.showServiceInPiP), level = 0, key = "blue") + self.pipAvailable = True else: - menu.append((_("add bouquet"), self.showBouquetInputBox)) + menu.append(ChoiceEntryComponent(text = (_("add bouquet"), self.showBouquetInputBox))) append_when_current_valid(current, menu, (_("remove entry"), self.removeBouquet), level = 0) if inBouquet: # current list is editable? @@ -133,7 +138,7 @@ class ChannelContextMenu(Screen): if not csel.movemode: append_when_current_valid(current, menu, (_("enable move mode"), self.toggleMoveMode), level = 1) if not inBouquetRootList and current_root and not (current_root.flags & eServiceReference.isGroup): - menu.append((_("add marker"), self.showMarkerInputBox)) + menu.append(ChoiceEntryComponent(text = (_("add marker"), self.showMarkerInputBox))) if haveBouquets: append_when_current_valid(current, menu, (_("enable bouquet edit"), self.bouquetMarkStart), level = 0) else: @@ -158,11 +163,11 @@ class ChannelContextMenu(Screen): append_when_current_valid(current, menu, (_("end alternatives edit"), self.bouquetMarkEnd), level = 0) append_when_current_valid(current, menu, (_("abort alternatives edit"), self.bouquetMarkAbort), level = 0) - menu.append((_("back"), self.cancelClick)) - self["menu"] = MenuList(menu) + menu.append(ChoiceEntryComponent(text = (_("back"), self.cancelClick))) + self["menu"] = ChoiceList(menu) def okbuttonClick(self): - self["menu"].getCurrent()[1]() + self["menu"].getCurrent()[0][1]() def cancelClick(self): self.close(False) @@ -193,6 +198,8 @@ class ChannelContextMenu(Screen): self.session.openWithCallback(self.close, MessageBox, _("The pin code you entered is wrong."), MessageBox.TYPE_ERROR) def showServiceInPiP(self): + if not self.pipAvailable: + return if self.session.pipshown: del self.session.pip self.session.pip = self.session.instantiateDialog(PictureInPicture) -- cgit v1.2.3 From 4fc0831f4a2cd3fc3782f8b946d0bf9274441602 Mon Sep 17 00:00:00 2001 From: thedoc Date: Fri, 1 Jan 2010 14:43:26 +0100 Subject: fixes bug #369 close ChannelSelection after PiP is activated --- lib/python/Screens/ChannelSelection.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'lib/python') diff --git a/lib/python/Screens/ChannelSelection.py b/lib/python/Screens/ChannelSelection.py index e8bbce15..36a54e77 100644 --- a/lib/python/Screens/ChannelSelection.py +++ b/lib/python/Screens/ChannelSelection.py @@ -208,7 +208,7 @@ class ChannelContextMenu(Screen): if self.session.pip.playService(newservice): self.session.pipshown = True self.session.pip.servicePath = self.csel.getCurrentServicePath() - self.close() + self.close(True) else: self.session.pipshown = False del self.session.pip @@ -672,7 +672,11 @@ class ChannelSelectionEdit: self.entry_marked = True def doContext(self): - self.session.open(ChannelContextMenu, self) + self.session.openWithCallback(self.exitContext, ChannelContextMenu, self) + + def exitContext(self, close = False): + if close: + self.cancel() MODE_TV = 0 MODE_RADIO = 1 -- cgit v1.2.3 From f9307b54c180f2844bdf6ffc7010e37beb1f02bb Mon Sep 17 00:00:00 2001 From: ghost Date: Wed, 30 Dec 2009 11:13:26 +0100 Subject: no more ask for 50hz in videowizzard when 720p/1080i is selected.. and now multi is used as default for 720p and 1080i this fixes bug #262 --- lib/python/Plugins/SystemPlugins/Videomode/VideoWizard.py | 7 +++++-- lib/python/Plugins/SystemPlugins/Videomode/videowizard.xml | 6 +++--- 2 files changed, 8 insertions(+), 5 deletions(-) (limited to 'lib/python') diff --git a/lib/python/Plugins/SystemPlugins/Videomode/VideoWizard.py b/lib/python/Plugins/SystemPlugins/Videomode/VideoWizard.py index cd1529aa..49b5d53d 100644 --- a/lib/python/Plugins/SystemPlugins/Videomode/VideoWizard.py +++ b/lib/python/Plugins/SystemPlugins/Videomode/VideoWizard.py @@ -131,8 +131,11 @@ class VideoWizard(WizardLanguage, Rc): def modeSelect(self, mode): ratesList = self.listRates(mode) print "ratesList:", ratesList - self.hw.setMode(port = self.port, mode = mode, rate = ratesList[0][0]) - + if self.port == "DVI" and mode in ("720p", "1080i"): + self.hw.setMode(port = self.port, mode = mode, rate = "multi") + else: + self.hw.setMode(port = self.port, mode = mode, rate = ratesList[0][0]) + def listRates(self, querymode = None): if querymode is None: querymode = self.mode diff --git a/lib/python/Plugins/SystemPlugins/Videomode/videowizard.xml b/lib/python/Plugins/SystemPlugins/Videomode/videowizard.xml index 29ac4297..5dea661d 100644 --- a/lib/python/Plugins/SystemPlugins/Videomode/videowizard.xml +++ b/lib/python/Plugins/SystemPlugins/Videomode/videowizard.xml @@ -20,7 +20,7 @@ self.selectKey("DOWN") self["portpic"].hide() - + self.condition = (self.port != "DVI" or self.mode == "PC") @@ -33,7 +33,7 @@ self.selectKey("UP") self.selectKey("DOWN") - + self.hw.saveMode(self.port, self.mode, self.rate) -- cgit v1.2.3 From 6a8cfab5b86a3054ee91e82007f91f991bee03dc Mon Sep 17 00:00:00 2001 From: ghost Date: Wed, 30 Dec 2009 17:53:10 +0100 Subject: save multi framerate even to configfile --- lib/python/Plugins/SystemPlugins/Videomode/VideoWizard.py | 1 + 1 file changed, 1 insertion(+) (limited to 'lib/python') diff --git a/lib/python/Plugins/SystemPlugins/Videomode/VideoWizard.py b/lib/python/Plugins/SystemPlugins/Videomode/VideoWizard.py index 49b5d53d..512bcec3 100644 --- a/lib/python/Plugins/SystemPlugins/Videomode/VideoWizard.py +++ b/lib/python/Plugins/SystemPlugins/Videomode/VideoWizard.py @@ -132,6 +132,7 @@ class VideoWizard(WizardLanguage, Rc): ratesList = self.listRates(mode) print "ratesList:", ratesList if self.port == "DVI" and mode in ("720p", "1080i"): + self.rate = "multi" self.hw.setMode(port = self.port, mode = mode, rate = "multi") else: self.hw.setMode(port = self.port, mode = mode, rate = ratesList[0][0]) -- cgit v1.2.3 From 45aefe230c922417067e3409039e4372340e894f Mon Sep 17 00:00:00 2001 From: ghost Date: Sat, 2 Jan 2010 09:49:01 +0100 Subject: only show pip option in contextmenu when the hardware can handle pip --- lib/python/Screens/ChannelSelection.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib/python') diff --git a/lib/python/Screens/ChannelSelection.py b/lib/python/Screens/ChannelSelection.py index 36a54e77..5fbfd591 100644 --- a/lib/python/Screens/ChannelSelection.py +++ b/lib/python/Screens/ChannelSelection.py @@ -22,6 +22,7 @@ from Components.Input import Input profile("ChannelSelection.py 3") from Components.ParentalControl import parentalControl from Components.ChoiceList import ChoiceList, ChoiceEntryComponent +from Components.SystemInfo import SystemInfo from Screens.InputBox import InputBox, PinInput from Screens.MessageBox import MessageBox from Screens.ServiceInfo import ServiceInfo @@ -126,7 +127,7 @@ class ChannelContextMenu(Screen): append_when_current_valid(current, menu, (_("remove entry"), self.removeCurrentService), level = 0) if current_root and current_root.getPath().find("flags == %d" %(FLAG_SERVICE_NEW_FOUND)) != -1: append_when_current_valid(current, menu, (_("remove new found flag"), self.removeNewFoundFlag), level = 0) - if isPlayable: + if isPlayable and SystemInfo.get("NumVideoDecoders", 1) > 1: append_when_current_valid(current, menu, (_("Activate Picture in Picture"), self.showServiceInPiP), level = 0, key = "blue") self.pipAvailable = True else: -- cgit v1.2.3 From aa64f107516da5aaff79d6d096f8014f65ea3283 Mon Sep 17 00:00:00 2001 From: ghost Date: Sat, 2 Jan 2010 13:48:36 +0100 Subject: Components/config.py: dont show configtext input help in ConfigDirectory's --- lib/python/Components/config.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'lib/python') diff --git a/lib/python/Components/config.py b/lib/python/Components/config.py index a6007b10..471b59ec 100755 --- a/lib/python/Components/config.py +++ b/lib/python/Components/config.py @@ -1138,6 +1138,9 @@ class ConfigDirectory(ConfigText): else: return ConfigText.getMulti(self, selected) + def onSelect(self, session): + self.allmarked = (self.value != "") + # a slider. class ConfigSlider(ConfigElement): def __init__(self, default = 0, increment = 1, limits = (0, 100)): -- cgit v1.2.3 From a415c30723058b3da1c7cbc1adf7c2205508915b Mon Sep 17 00:00:00 2001 From: Stefan Pluecken Date: Tue, 5 Jan 2010 14:41:54 +0100 Subject: bug #238 added m4v file extension to media player capabilities Conflicts: lib/python/Plugins/Extensions/MediaPlayer/plugin.py --- lib/python/Components/FileList.py | 1 + lib/python/Plugins/Extensions/MediaPlayer/plugin.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) (limited to 'lib/python') diff --git a/lib/python/Components/FileList.py b/lib/python/Components/FileList.py index 222512ea..841a2fe5 100755 --- a/lib/python/Components/FileList.py +++ b/lib/python/Components/FileList.py @@ -23,6 +23,7 @@ EXTENSIONS = { "ts": "movie", "avi": "movie", "divx": "movie", + "m4v": "movie", "mpg": "movie", "mpeg": "movie", "mkv": "movie", diff --git a/lib/python/Plugins/Extensions/MediaPlayer/plugin.py b/lib/python/Plugins/Extensions/MediaPlayer/plugin.py index a2422be7..0fc78fb1 100755 --- a/lib/python/Plugins/Extensions/MediaPlayer/plugin.py +++ b/lib/python/Plugins/Extensions/MediaPlayer/plugin.py @@ -110,7 +110,7 @@ class MediaPlayer(Screen, InfoBarBase, InfoBarSeek, InfoBarAudioSelection, InfoB # 'None' is magic to start at the list of mountpoints defaultDir = config.mediaplayer.defaultDir.getValue() - self.filelist = FileList(defaultDir, matchingPattern = "(?i)^.*\.(mp2|mp3|ogg|ts|m2ts|wav|wave|m3u|pls|e2pls|mpg|vob|avi|divx|mkv|mp4|m4a|dat|flac|mov)", useServiceRef = True, additionalExtensions = "4098:m3u 4098:e2pls 4098:pls") + self.filelist = FileList(defaultDir, matchingPattern = "(?i)^.*\.(mp2|mp3|ogg|ts|m2ts|wav|wave|m3u|pls|e2pls|mpg|vob|avi|divx|m4v|mkv|mp4|m4a|dat|flac|mov)", useServiceRef = True, additionalExtensions = "4098:m3u 4098:e2pls 4098:pls") self["filelist"] = self.filelist self.playlist = MyPlayList() -- cgit v1.2.3 From 04bfb0d38fe6f49f03a630d18310104c6c783670 Mon Sep 17 00:00:00 2001 From: ghost Date: Tue, 5 Jan 2010 14:53:54 +0100 Subject: remove m2ts again --- lib/python/Plugins/Extensions/MediaPlayer/plugin.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/python') diff --git a/lib/python/Plugins/Extensions/MediaPlayer/plugin.py b/lib/python/Plugins/Extensions/MediaPlayer/plugin.py index 0fc78fb1..036bbbb9 100755 --- a/lib/python/Plugins/Extensions/MediaPlayer/plugin.py +++ b/lib/python/Plugins/Extensions/MediaPlayer/plugin.py @@ -110,7 +110,7 @@ class MediaPlayer(Screen, InfoBarBase, InfoBarSeek, InfoBarAudioSelection, InfoB # 'None' is magic to start at the list of mountpoints defaultDir = config.mediaplayer.defaultDir.getValue() - self.filelist = FileList(defaultDir, matchingPattern = "(?i)^.*\.(mp2|mp3|ogg|ts|m2ts|wav|wave|m3u|pls|e2pls|mpg|vob|avi|divx|m4v|mkv|mp4|m4a|dat|flac|mov)", useServiceRef = True, additionalExtensions = "4098:m3u 4098:e2pls 4098:pls") + self.filelist = FileList(defaultDir, matchingPattern = "(?i)^.*\.(mp2|mp3|ogg|ts|wav|wave|m3u|pls|e2pls|mpg|vob|avi|divx|m4v|mkv|mp4|m4a|dat|flac|mov)", useServiceRef = True, additionalExtensions = "4098:m3u 4098:e2pls 4098:pls") self["filelist"] = self.filelist self.playlist = MyPlayList() -- cgit v1.2.3 From 0dfedee9efae9f34cea383b5b79dcd71828002b0 Mon Sep 17 00:00:00 2001 From: ghost Date: Sun, 10 Jan 2010 13:45:57 +0100 Subject: Screen.py: add missing dict.__init__ call --- lib/python/Screens/Screen.py | 1 + 1 file changed, 1 insertion(+) (limited to 'lib/python') diff --git a/lib/python/Screens/Screen.py b/lib/python/Screens/Screen.py index 7ac7841c..f0bf773d 100644 --- a/lib/python/Screens/Screen.py +++ b/lib/python/Screens/Screen.py @@ -15,6 +15,7 @@ class Screen(dict, GUISkin): global_screen = None def __init__(self, session, parent = None): + dict.__init__(self) self.skinName = self.__class__.__name__ self.session = session self.parent = parent -- cgit v1.2.3 From bb2987585250d140bc125d8e316f2381421447e4 Mon Sep 17 00:00:00 2001 From: acid-burn Date: Mon, 18 Jan 2010 17:21:55 +0100 Subject: SoftwareManager/plugin.py, Screens/PluginBrowser.py: -reactivate packetmanager in expert mode. - add a link from PluginBrowser to new Extensionsmanager if the Softwaremanager is installed. - fix small typo. This fixes bug #383 --- .../Plugins/SystemPlugins/SoftwareManager/plugin.py | 12 +++++++----- lib/python/Screens/PluginBrowser.py | 18 +++++++++++++++++- 2 files changed, 24 insertions(+), 6 deletions(-) (limited to 'lib/python') diff --git a/lib/python/Plugins/SystemPlugins/SoftwareManager/plugin.py b/lib/python/Plugins/SystemPlugins/SoftwareManager/plugin.py index f61ea53c..b20ba51e 100755 --- a/lib/python/Plugins/SystemPlugins/SoftwareManager/plugin.py +++ b/lib/python/Plugins/SystemPlugins/SoftwareManager/plugin.py @@ -137,8 +137,8 @@ class UpdatePluginMenu(Screen): self.list.append(("advancedrestore", _("Advanced restore"), _("\nRestore your backups by date." ) + self.oktext, None)) self.list.append(("backuplocation", _("Choose backup location"), _("\nSelect your backup device.\nCurrent device: " ) + config.plugins.configurationbackup.backuplocation.value + self.oktext, None)) self.list.append(("backupfiles", _("Choose backup files"), _("Select files for backup. Currently selected:\n" ) + self.backupdirs + self.oktext, None)) - #if config.usage.setup_level.index >= 2: # expert+ - # self.list.append(("ipkg-manager", _("Packet management"), _("\nView, install and remove available or installed packages." ) + self.oktext, None)) + if config.usage.setup_level.index >= 2: # expert+ + self.list.append(("ipkg-manager", _("Packet management"), _("\nView, install and remove available or installed packages." ) + self.oktext, None)) self.list.append(("ipkg-source",_("Choose upgrade source"), _("\nEdit the upgrade source address." ) + self.oktext, None)) for p in plugins.getPlugins(PluginDescriptor.WHERE_SOFTWAREMANAGER): if p.__call__.has_key("AdvancedSoftwareSupported"): @@ -326,10 +326,12 @@ class PluginManager(Screen, DreamInfoHandler): """ - def __init__(self, session, plugin_path, args = None): + def __init__(self, session, plugin_path = None, args = None): Screen.__init__(self, session) self.session = session self.skin_path = plugin_path + if self.skin_path == None: + self.skin_path = resolveFilename(SCOPE_CURRENT_PLUGIN, "SystemPlugins/SoftwareManager") self["shortcuts"] = ActionMap(["ShortcutActions", "WizardActions", "InfobarEPGActions", "HelpActions" ], { @@ -634,7 +636,7 @@ class PluginManager(Screen, DreamInfoHandler): elif tag == 'Default': return(( _("Default Settings"), _("View list of available default settings" ), tag, divpng )) elif tag == 'SAT': - return(( _("Satteliteequipment"), _("View list of available Satteliteequipment extensions." ), tag, divpng )) + return(( _("Satellite equipment"), _("View list of available Satellite equipment extensions." ), tag, divpng )) elif tag == 'Software': return(( _("Software"), _("View list of available software extensions" ), tag, divpng )) elif tag == 'Multimedia': @@ -818,7 +820,7 @@ class PluginManagerHelp(Screen): {"template": [ - MultiContentEntryText(pos = (50, 0), size = (150, 26), font=0, flags = RT_HALIGN_LEFT, text = 0), # index 0 is the name + MultiContentEntryText(pos = (50, 0), size = (540, 26), font=0, flags = RT_HALIGN_LEFT, text = 0), # index 0 is the name MultiContentEntryText(pos = (50, 27), size = (540, 23), font=1, flags = RT_HALIGN_LEFT, text = 1), # index 1 is the state MultiContentEntryPixmapAlphaTest(pos = (0, 1), size = (48, 48), png = 2), # index 2 is the status pixmap MultiContentEntryPixmapAlphaTest(pos = (0, 48), size = (550, 2), png = 3), # index 3 is the div pixmap diff --git a/lib/python/Screens/PluginBrowser.py b/lib/python/Screens/PluginBrowser.py index cce08aed..c7909ffb 100755 --- a/lib/python/Screens/PluginBrowser.py +++ b/lib/python/Screens/PluginBrowser.py @@ -38,7 +38,12 @@ class PluginBrowser(Screen): "red": self.delete, "green": self.download }) + self["SoftwareActions"] = ActionMap(["ColorActions"], + { + "red": self.openExtensionmanager + }) self["PluginDownloadActions"].setEnabled(False) + self["SoftwareActions"].setEnabled(False) self.onFirstExecBegin.append(self.checkWarnings) self.onShown.append(self.updateList) @@ -62,12 +67,14 @@ class PluginBrowser(Screen): self.list = [PluginEntryComponent(plugin) for plugin in self.pluginlist] self["list"].l.setList(self.list) if fileExists(resolveFilename(SCOPE_PLUGINS, "SystemPlugins/SoftwareManager/plugin.py")): - self["red"].setText("") + self["red"].setText(_("Manage extensions")) self["green"].setText("") + self["SoftwareActions"].setEnabled(True) self["PluginDownloadActions"].setEnabled(False) else: self["red"].setText(_("Remove Plugins")) self["green"].setText(_("Download Plugins")) + self["SoftwareActions"].setEnabled(False) self["PluginDownloadActions"].setEnabled(True) def delete(self): @@ -80,6 +87,15 @@ class PluginBrowser(Screen): self.updateList() self.checkWarnings() + def openExtensionmanager(self): + if fileExists(resolveFilename(SCOPE_PLUGINS, "SystemPlugins/SoftwareManager/plugin.py")): + print "blah" + try: + from Plugins.SystemPlugins.SoftwareManager.plugin import PluginManager + except ImportError: + self.session.open(MessageBox, _("The Softwaremanagement extension is not installed!\nPlease install it."), type = MessageBox.TYPE_INFO,timeout = 10 ) + else: + self.session.openWithCallback(self.PluginDownloadBrowserClosed, PluginManager) class PluginDownloadBrowser(Screen): DOWNLOAD = 0 -- cgit v1.2.3