X-Git-Url: https://git.cweiske.de/enigma2.git/blobdiff_plain/cc35894a8a1a0a3291dd60f48da60f347c5a7100..2c862a6323b51e446270ee3b6845ed234ed8771d:/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 c4289cb0..39d7277e 100755 --- a/lib/python/Plugins/Extensions/DVDBurn/ProjectSettings.py +++ b/lib/python/Plugins/Extensions/DVDBurn/ProjectSettings.py @@ -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 @@ -93,10 +92,10 @@ class ProjectSettings(Screen,ConfigListScreen): - - - - + + + + @@ -234,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