X-Git-Url: https://git.cweiske.de/enigma2.git/blobdiff_plain/97164baf8ea068ec7c4326d656c5c8f5ba262750..aa7e54fc4db217a7732f208af6f3e5a2e0bd6773:/lib/python/Plugins/Extensions/DVDBurn/ProjectSettings.py
diff --git a/lib/python/Plugins/Extensions/DVDBurn/ProjectSettings.py b/lib/python/Plugins/Extensions/DVDBurn/ProjectSettings.py
index 9b4e2d54..39d7277e 100755
--- a/lib/python/Plugins/Extensions/DVDBurn/ProjectSettings.py
+++ b/lib/python/Plugins/Extensions/DVDBurn/ProjectSettings.py
@@ -8,23 +8,17 @@ 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
class FileBrowser(Screen, HelpableScreen):
- skin = """
-
-
-
-
-
-
- """
def __init__(self, session, scope, configRef):
Screen.__init__(self, session)
+ # for the skin: first try FileBrowser_DVDBurn, then FileBrowser, this allows individual skinning
+ self.skinName = ["FileBrowser_DVDBurn", "FileBrowser" ]
+
HelpableScreen.__init__(self)
self.scope = scope
pattern = ""
@@ -57,12 +51,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)
@@ -98,10 +92,10 @@ class ProjectSettings(Screen,ConfigListScreen):
-
-
-
-
+
+
+
+
@@ -239,11 +233,19 @@ class ProjectSettings(Screen,ConfigListScreen):
else:
self.session.open(MessageBox,self.project.error,MessageBox.TYPE_ERROR)
elif scope == "project":
- if self.project.loadProject(path):
- configRef.setValue(path)
- self.initConfigList()
+ self.path = path
+ print "len(self.titles)", len(self.project.titles)
+ if len(self.project.titles):
+ self.session.openWithCallback(self.askLoadCB, MessageBox,text = _("Your current collection will get lost!") + "\n" + _("Do you want to restore your settings?"), type = MessageBox.TYPE_YESNO)
else:
- self.session.open(MessageBox,self.project.error,MessageBox.TYPE_ERROR)
+ self.askLoadCB(True)
elif scope:
configRef.setValue(path)
self.initConfigList()
+
+ def askLoadCB(self, answer):
+ if answer is not None and answer:
+ if self.project.loadProject(self.path):
+ self.initConfigList()
+ else:
+ self.session.open(MessageBox,self.project.error,MessageBox.TYPE_ERROR)
\ No newline at end of file