Enigma2{skin_default.xml,Plugins-DVDBurn,DVDPlayer}: - move FileBrowser Skin into...
authoracid-burn <acidburn@opendreambox.org>
Mon, 12 Oct 2009 07:36:09 +0000 (09:36 +0200)
committeracid-burn <acidburn@opendreambox.org>
Mon, 12 Oct 2009 07:36:09 +0000 (09:36 +0200)
data/skin_default.xml
lib/python/Plugins/Extensions/DVDBurn/ProjectSettings.py
lib/python/Plugins/Extensions/DVDPlayer/plugin.py [changed mode: 0644->0755]

index 100bd5b..e72095f 100755 (executable)
@@ -1170,6 +1170,14 @@ self.instance.move(ePoint(orgpos.x() + (orgwidth - newwidth)/2, orgpos.y()))
                <widget name="text" position="12,35" size="536,46" font="Regular;46" transparent="1" noWrap="1" halign="right" />
                <widget name="list" position="10,100" size="540,225" selectionDisabled="1" transparent="1" />
        </screen>
+       <!-- FileBrowser -->
+       <screen name="FileBrowser" position="center,center" size="520,430" title="DVD File Browser" >
+               <ePixmap pixmap="skin_default/buttons/red.png" position="0,0" size="140,40" alphatest="on" />
+               <ePixmap pixmap="skin_default/buttons/green.png" position="140,0" size="140,40" alphatest="on" />
+               <widget source="key_red" render="Label" position="0,0" zPosition="1" size="140,40" font="Regular;20" halign="center" valign="center" backgroundColor="#9f1313" transparent="1" />
+               <widget source="key_green" render="Label" position="140,0" zPosition="1" size="140,40" font="Regular;20" halign="center" valign="center" backgroundColor="#1f771f" transparent="1" />
+               <widget name="filelist" position="5,50" size="510,370" scrollbarMode="showOnDemand" />
+       </screen>
        <!-- VideoSetup (VideoMode Plugin) -->
        <screen name="VideoSetup" position="center,center" size="560,430" title="VideoSetup">
                <ePixmap pixmap="skin_default/buttons/red.png" position="0,0" size="140,40" alphatest="on" />
index 9b4e2d5..513c0c8 100755 (executable)
@@ -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)
old mode 100644 (file)
new mode 100755 (executable)
index ce5fa9d..e895a14
@@ -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 = """
-       <screen name="FileBrowser" position="100,100" size="520,376" title="DVD File Browser" >
-               <widget name="filelist" position="0,0" size="520,376" scrollbarMode="showOnDemand" />
-       </screen>"""
+
        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):