Path and template fixes
[enigma2.git] / lib / python / Plugins / Extensions / DVDBurn / TitleList.py
index 6edb090..fc4460e 100644 (file)
@@ -11,7 +11,7 @@ from Components.Sources.Progress import Progress
 from Components.FileList import FileList
 from Components.Label import Label
 from enigma import eListboxPythonMultiContent, gFont, RT_HALIGN_LEFT
-from Tools.Directories import resolveFilename, SCOPE_PLAYLIST
+from Tools.Directories import resolveFilename, SCOPE_PLUGINS
 
 class TitleList(Screen):
        skin = """
@@ -41,7 +41,7 @@ class TitleList(Screen):
                                "addTitle": (self.addTitle, _("Add a new title"), _("Add title")),
                                "editTitle": (self.editTitle, _("Edit chapters of current title"), _("Edit title")),
                                "removeCurrentTitle": (self.removeCurrentTitle, _("Remove currently selected title"), _("Remove title")),
-                               "settings": (self.settings, _("Project settings"), _("Settings")),
+                               "settings": (self.settings, _("Collection settings"), _("Settings")),
                                "burnProject": (self.burnProject, _("Burn DVD"), _("Burn DVD")),
                        })
 
@@ -55,9 +55,9 @@ class TitleList(Screen):
                                "cancel": self.leave
                        })
 
-               self["key_red"] = StaticText(_("Add title"))
-               self["key_green"] = StaticText(_("Edit title"))
-               self["key_yellow"] = StaticText(_("Remove title"))
+               self["key_red"] = StaticText(_("Remove title"))
+               self["key_green"] = StaticText(_("Add title"))
+               self["key_yellow"] = StaticText(_("Edit title"))
                self["key_blue"] = StaticText(_("Settings"))
 
                self["title_label"] = StaticText()
@@ -81,12 +81,12 @@ class TitleList(Screen):
                
        def showMenu(self):
                menu = []
+               menu.append((_("Burn DVD"), "burn"));
+               menu.append((_("Preview menu"), "previewMenu"));
                menu.append((_("Collection settings"), "settings"));
                menu.append((_("Add a new title"), "addtitle"));
                menu.append((_("Remove title"), "removetitle"));
                menu.append((_("Edit chapters of current title"), "edittitle"));
-               menu.append((_("Preview menu"), "previewMenu"));
-               menu.append((_("Burn DVD"), "burn"));
                menu.append((_("Exit"), "exit"));
                self.session.openWithCallback(self.menuCallback, ChoiceBox, title="", list=menu)
 
@@ -130,7 +130,7 @@ class TitleList(Screen):
                if source is None:
                        return None
                t = self.project.addService(source)
-               self.editTitle(t, readOnly=True)
+               self.editTitle(t, readOnly=False)
 
        def removeCurrentTitle(self):
                title = self.getCurrentTitle()
@@ -147,7 +147,7 @@ class TitleList(Screen):
                self["title_label"].text = _("Table of content for collection") + " \"" + self.project.settings.name.getValue() + "\":"
 
        def loadTemplate(self):
-               filename = resolveFilename(SCOPE_PLAYLIST)+"DreamboxDVDtemplate.ddvdp.xml"
+               filename = resolveFilename(SCOPE_PLUGINS)+"Extensions/DVDBurn/DreamboxDVDtemplate.ddvdp.xml"
                if self.project.loadProject(filename):
                        self["error_label"].hide()
                        return True
@@ -158,6 +158,10 @@ class TitleList(Screen):
                        return False
 
        def burnProject(self):
+               autochapter = self.project.settings.autochapter.getValue()
+               if autochapter > 0:
+                       for title in self.project.titles:
+                               title.produceAutoChapter(autochapter)
                self.project.waitboxref = self.project.session.open(ProjectSettings.WaitBox,self.burnProjectCB)
 
        def burnProjectCB(self):