Merge remote branch 'origin/bug_348_dvdburn_residenttask'
authorghost <andreas.monzner@multimedia-labs.de>
Sat, 2 Jan 2010 09:59:49 +0000 (10:59 +0100)
committerghost <andreas.monzner@multimedia-labs.de>
Sat, 2 Jan 2010 09:59:49 +0000 (10:59 +0100)
lib/python/Plugins/Extensions/DVDBurn/Process.py
lib/python/Plugins/Extensions/DVDBurn/ProjectSettings.py
lib/python/Plugins/Extensions/DVDBurn/TitleList.py
lib/python/Plugins/Extensions/DVDBurn/TitleProperties.py

index 44075d64035a207584fe9ac2f7ccd2cde464578f..642a898d2d72523a960225cfaf1d4d2db11db887 100644 (file)
@@ -264,6 +264,7 @@ class WaitForResidentTasks(Task):
                
        def run(self, callback):
                print "waiting for %d resident task(s) %s to finish..." % (len(self.job.resident_tasks),str(self.job.resident_tasks))
+               self.callback = callback
                if self.job.resident_tasks == 0:
                        callback(self, [])
 
index c4289cb087d3c057336e6003ddd8857195ab1306..a1c3884225e0028f30bfda8f5fbba55fdbefd325 100755 (executable)
@@ -8,7 +8,6 @@ from Components.Sources.List import List
 from Components.Sources.StaticText import StaticText
 from Components.Sources.Progress import Progress
 from Components.FileList import FileList
-from enigma import eListboxPythonMultiContent, gFont, RT_HALIGN_LEFT
 from Tools.Directories import fileExists, resolveFilename, SCOPE_PLUGINS, SCOPE_FONTS, SCOPE_HDD
 from Components.config import config, getConfigListEntry
 from Components.ConfigList import ConfigListScreen
@@ -235,7 +234,6 @@ class ProjectSettings(Screen,ConfigListScreen):
                                self.session.open(MessageBox,self.project.error,MessageBox.TYPE_ERROR)
                elif scope == "project":
                        if self.project.loadProject(path):
-                               configRef.setValue(path)
                                self.initConfigList()
                        else:
                                self.session.open(MessageBox,self.project.error,MessageBox.TYPE_ERROR)
index bb40cc30b607fe17a1d89e86ccfc3fffd1a9ac80..dbc988b1cdf8a41ad16d3beb5de8e2dd7cb1a270 100755 (executable)
@@ -10,7 +10,8 @@ from Components.ActionMap import HelpableActionMap, ActionMap
 from Components.Sources.List import List
 from Components.Sources.StaticText import StaticText
 from Components.Sources.Progress import Progress
-from enigma import eListboxPythonMultiContent, gFont, RT_HALIGN_LEFT
+from Components.MultiContent import MultiContentEntryText
+from enigma import gFont, RT_HALIGN_LEFT, RT_HALIGN_RIGHT
 from Tools.Directories import resolveFilename, SCOPE_PLUGINS
 
 class TitleList(Screen, HelpableScreen):
@@ -27,7 +28,18 @@ class TitleList(Screen, HelpableScreen):
                        <widget source="title_label" render="Label" position="10,48" size="540,38" font="Regular;18" transparent="1" />
                        <widget source="error_label" render="Label" position="10,48" size="540,395" zPosition="3" font="Regular;20" transparent="1" />
                        <widget source="titles" render="Listbox" scrollbarMode="showOnDemand" position="10,86" size="540,312" zPosition="3" transparent="1" >
-                               <convert type="StaticMultiList" />
+                               <convert type="TemplatedMultiContent">
+                                       {"template": [
+                                                       MultiContentEntryText(pos = (0, 0), size = (420, 20), font = 0, flags = RT_HALIGN_LEFT, text = 1), # index 1 Title,
+                                                       MultiContentEntryText(pos = (0, 20), size = (328, 17), font = 1, flags = RT_HALIGN_LEFT, text = 2), # index 2 description,
+                                                       MultiContentEntryText(pos = (420, 6), size = (120, 20), font = 1, flags = RT_HALIGN_RIGHT, text = 3), # index 3 begin time,
+                                                       MultiContentEntryText(pos = (328, 20), size = (154, 17), font = 1, flags = RT_HALIGN_RIGHT, text = 4), # index 4 channel,
+                                                       MultiContentEntryText(pos = (482, 20), size = (58, 20), font = 1, flags = RT_HALIGN_RIGHT, text = 5), # index 4 channel,
+                                               ],
+                                       "fonts": [gFont("Regular", 20), gFont("Regular", 14)],
+                                       "itemHeight": 37
+                                       }
+                               </convert>
                        </widget>
                        <widget source="space_bar" render="Progress" position="10,410" size="540,26" borderWidth="1" backgroundColor="#254f7497" />
                        <widget source="space_label" render="Label" position="40,414" size="480,22" zPosition="2" font="Regular;18" halign="center" transparent="1" foregroundColor="#000000" />
@@ -71,7 +83,7 @@ class TitleList(Screen, HelpableScreen):
                else:
                        self.newProject()
 
-               self["titles"] = List(list = [ ], enableWrapAround = True, item_height=30, fonts = [gFont("Regular", 20)])
+               self["titles"] = List([])
                self.updateTitleList()
                self.previous_size = 0
                self.onLayoutFinish.append(self.layoutFinished)
@@ -259,15 +271,14 @@ class TitleList(Screen, HelpableScreen):
                job = Process.DVDJob(self.project, menupreview=True)
                job_manager.in_background = False
                job_manager.AddJob(job)
-               
+
        def updateTitleList(self):
-               res = [ ]
+               list = [ ]
                for title in self.project.titles:
-                       a = [ title, (eListboxPythonMultiContent.TYPE_TEXT, 0, 5, 500, 25, 0, RT_HALIGN_LEFT, title.properties.menutitle.getValue())  ]
-                       res.append(a)
-               self["titles"].list = res
+                       list.append((title, title.properties.menutitle.getValue(), title.properties.menusubtitle.getValue(), title.DVBchannel, title.formatDVDmenuText("$D.$M.$Y, $T", 0), title.formatDVDmenuText("$l", 0)))
+               self["titles"].list = list
                self.updateSize()
-               if len(res):
+               if len(list):
                        self["key_red"].text = _("Remove title")
                        self["key_yellow"].text = _("Title properties")
                else:
index 11601cc301adceab005a8768449bb31d2498377c..ca571ffed4a2efa4a9bd3253669a352822ccb446 100755 (executable)
@@ -9,7 +9,7 @@ from Components.Sources.StaticText import StaticText
 from Components.Sources.Progress import Progress
 from Components.FileList import FileList
 from Components.Pixmap import Pixmap
-from enigma import eListboxPythonMultiContent, gFont, RT_HALIGN_LEFT, ePicLoad
+from enigma import ePicLoad
 from Tools.Directories import fileExists, resolveFilename, SCOPE_PLUGINS, SCOPE_FONTS, SCOPE_HDD
 from Components.config import config, getConfigListEntry, ConfigInteger, ConfigSubsection, ConfigSelection
 from Components.ConfigList import ConfigListScreen