From 7a5004310012b60d8bf1fbd8b36add992a666bb0 Mon Sep 17 00:00:00 2001 From: acid-burn Date: Mon, 12 Oct 2009 09:36:09 +0200 Subject: [PATCH] Enigma2{skin_default.xml,Plugins-DVDBurn,DVDPlayer}: - move FileBrowser Skin into skin_default and allow individual skinning --- data/skin_default.xml | 8 ++++++++ .../Plugins/Extensions/DVDBurn/ProjectSettings.py | 4 ++-- lib/python/Plugins/Extensions/DVDPlayer/plugin.py | 18 +++++++++++++----- 3 files changed, 23 insertions(+), 7 deletions(-) mode change 100644 => 100755 lib/python/Plugins/Extensions/DVDPlayer/plugin.py diff --git a/data/skin_default.xml b/data/skin_default.xml index 100bd5b..e72095f 100755 --- a/data/skin_default.xml +++ b/data/skin_default.xml @@ -1170,6 +1170,14 @@ self.instance.move(ePoint(orgpos.x() + (orgwidth - newwidth)/2, orgpos.y())) + + + + + + + + diff --git a/lib/python/Plugins/Extensions/DVDBurn/ProjectSettings.py b/lib/python/Plugins/Extensions/DVDBurn/ProjectSettings.py index 9b4e2d5..513c0c8 100755 --- a/lib/python/Plugins/Extensions/DVDBurn/ProjectSettings.py +++ b/lib/python/Plugins/Extensions/DVDBurn/ProjectSettings.py @@ -57,12 +57,12 @@ class FileBrowser(Screen, HelpableScreen): self.filelist = FileList(currDir, matchingPattern=pattern) self["filelist"] = self.filelist - self["FilelistActions"] = ActionMap(["OkCancelActions"], + self["FilelistActions"] = ActionMap(["SetupActions"], { + "save": self.ok, "ok": self.ok, "cancel": self.exit }) - self["key_red"] = StaticText(_("Cancel")) self["key_green"] = StaticText(_("OK")) self.onLayoutFinish.append(self.layoutFinished) diff --git a/lib/python/Plugins/Extensions/DVDPlayer/plugin.py b/lib/python/Plugins/Extensions/DVDPlayer/plugin.py old mode 100644 new mode 100755 index ce5fa9d..e895a14 --- a/lib/python/Plugins/Extensions/DVDPlayer/plugin.py +++ b/lib/python/Plugins/Extensions/DVDPlayer/plugin.py @@ -7,6 +7,7 @@ from Screens.HelpMenu import HelpableScreen from Screens.InfoBarGenerics import InfoBarSeek, InfoBarPVRState, InfoBarCueSheetSupport, InfoBarShowHide, InfoBarNotifications from Components.ActionMap import ActionMap, NumberActionMap, HelpableActionMap from Components.Label import Label +from Components.Sources.StaticText import StaticText from Components.Pixmap import Pixmap from Components.FileList import FileList from Components.MenuList import MenuList @@ -20,13 +21,13 @@ import servicedvd # load c++ part of dvd player plugin lastpath = "" class FileBrowser(Screen): - skin = """ - - - """ + def __init__(self, session, dvd_filelist = [ ]): Screen.__init__(self, session) + # for the skin: first try FileBrowser_DVDPlayer, then FileBrowser, this allows individual skinning + self.skinName = ["FileBrowser_DVDPlayer", "FileBrowser" ] + self.dvd_filelist = dvd_filelist if len(dvd_filelist): self["filelist"] = MenuList(self.dvd_filelist) @@ -42,11 +43,18 @@ class FileBrowser(Screen): self.filelist = FileList(currDir, matchingPattern = "(?i)^.*\.(iso)", useServiceRef = True) self["filelist"] = self.filelist - self["FilelistActions"] = ActionMap(["OkCancelActions"], + self["FilelistActions"] = ActionMap(["SetupActions"], { + "save": self.ok, "ok": self.ok, "cancel": self.exit }) + self["key_red"] = StaticText(_("Cancel")) + self["key_green"] = StaticText(_("OK")) + self.onLayoutFinish.append(self.layoutFinished) + + def layoutFinished(self): + self.setTitle(_("DVD File Browser")) def ok(self): if len(self.dvd_filelist): -- 2.7.4