improve usability: hide some advanced options below expert, clear out and resort...
[enigma2.git] / lib / python / Plugins / Extensions / DVDBurn / ProjectSettings.py
index 7407263..e97961b 100644 (file)
@@ -102,9 +102,15 @@ class ProjectSettings(Screen,ConfigListScreen):
                self["key_red"] = StaticText(_("Cancel"))
                self["key_green"] = StaticText(_("OK"))
                self["key_yellow"] = StaticText(_("Load"))
-               self["key_blue"] = StaticText(_("Save"))
+               if config.usage.setup_level.index >= 2: # expert+
+                       self["key_blue"] = StaticText(_("Save"))
+               else:
+                       self["key_blue"] = StaticText()
                
-               infotext = _("Available format variables") + ":\n$i=" + _("Track") + ", $t=" + _("Title") + ", $d=" + _("Description") + ", $l=" + _("length") + ", $c=" + _("chapters") + ",\n" + _("Record") + " $T=" + _("Begin time") + ", $Y=" + _("Year") + ", $M=" + _("month") + ", $D=" + _("day") + ",\n$A=" + _("audio tracks") + ", $C=" + _("Channel") + ", $f=" + _("filename")
+               if config.usage.setup_level.index >= 2: # expert+
+                       infotext = _("Available format variables") + ":\n$i=" + _("Track") + ", $t=" + _("Title") + ", $d=" + _("Description") + ", $l=" + _("length") + ", $c=" + _("chapters") + ",\n" + _("Record") + " $T=" + _("Begin time") + ", $Y=" + _("Year") + ", $M=" + _("month") + ", $D=" + _("day") + ",\n$A=" + _("audio tracks") + ", $C=" + _("Channel") + ", $f=" + _("filename")
+               else:
+                       infotext = ""
                self["info"] = StaticText(infotext)
 
                self.settings = project.settings
@@ -141,9 +147,10 @@ class ProjectSettings(Screen,ConfigListScreen):
                        self.list.append(getConfigListEntry(_("ISO path"), self.settings.isopath))
                if authormode.startswith("menu"):
                        self.list.append(getConfigListEntry(_("Menu")+' '+_("template file"), self.settings.menutemplate))
-                       self.list.append(getConfigListEntry(_("Menu")+' '+_("Title"), self.project.menutemplate.settings.titleformat))
-                       self.list.append(getConfigListEntry(_("Menu")+' '+_("Subtitles"), self.project.menutemplate.settings.subtitleformat))
-                       self.list.append(getConfigListEntry(_("Menu")+' '+_("background image"), self.project.menutemplate.settings.menubg))
+                       if config.usage.setup_level.index >= 2: # expert+
+                               self.list.append(getConfigListEntry(_("Menu")+' '+_("Title"), self.project.menutemplate.settings.titleformat))
+                               self.list.append(getConfigListEntry(_("Menu")+' '+_("Subtitles"), self.project.menutemplate.settings.subtitleformat))
+                               self.list.append(getConfigListEntry(_("Menu")+' '+_("background image"), self.project.menutemplate.settings.menubg))
                        #self.list.append(getConfigListEntry(_("Menu")+' '+_("headline")+' '+_("color"), self.settings.color_headline))
                        #self.list.append(getConfigListEntry(_("Menu")+' '+_("text")+' '+_("color"), self.settings.color_button))
                        #self.list.append(getConfigListEntry(_("Menu")+' '+_("highlighted button")+' '+_("color"), self.settings.color_highlight))
@@ -151,12 +158,13 @@ class ProjectSettings(Screen,ConfigListScreen):
                        #self.list.append(getConfigListEntry(_("Font size")+' ('+_("headline")+', '+_("Title")+', '+_("Subtitles")+')', self.settings.font_size))
                        #self.list.append(getConfigListEntry(_("Menu")+' '+_("spaces (top, between rows, left)"), self.settings.space))
                        #self.list.append(getConfigListEntry(_("Menu")+' '+_("Audio"), self.settings.menuaudio))
-               if authormode != "data_ts":
-                       self.list.append(getConfigListEntry(_("Titleset mode"), self.settings.titlesetmode))
-                       if self.settings.titlesetmode.getValue() == "single" or authormode == "just_linked":
-                               self.list.append(getConfigListEntry(_("VMGM (intro trailer)"), self.settings.vmgm))
-               else:
-                       self.list.append(getConfigListEntry(("DVD data format"), self.settings.dataformat))
+               if config.usage.setup_level.index >= 2: # expert+
+                       if authormode != "data_ts":
+                               self.list.append(getConfigListEntry(_("Titleset mode"), self.settings.titlesetmode))
+                               if self.settings.titlesetmode.getValue() == "single" or authormode == "just_linked":
+                                       self.list.append(getConfigListEntry(_("VMGM (intro trailer)"), self.settings.vmgm))
+                       else:
+                               self.list.append(getConfigListEntry(("DVD data format"), self.settings.dataformat))
                
                self["config"].setList(self.list)
 
@@ -192,14 +200,15 @@ class ProjectSettings(Screen,ConfigListScreen):
                self.session.openWithCallback(self.FileBrowserClosed, FileBrowser, "project", self.settings)
 
        def saveProject(self):
-               self.applySettings()
-               ret = self.project.saveProject(resolveFilename(SCOPE_PLUGINS)+"Extensions/DVDBurn/")
-               if ret.startswith:
-                       text = _("Save")+' '+_('OK')+':\n'+ret
-                       self.session.open(MessageBox,text,type = MessageBox.TYPE_INFO)
-               else:
-                       text = _("Save")+' '+_('Error')
-                       self.session.open(MessageBox,text,type = MessageBox.TYPE_ERROR)
+               if config.usage.setup_level.index >= 2: # expert+
+                       self.applySettings()
+                       ret = self.project.saveProject(resolveFilename(SCOPE_PLUGINS)+"Extensions/DVDBurn/")
+                       if ret.startswith:
+                               text = _("Save")+' '+_('OK')+':\n'+ret
+                               self.session.open(MessageBox,text,type = MessageBox.TYPE_INFO)
+                       else:
+                               text = _("Save")+' '+_('Error')
+                               self.session.open(MessageBox,text,type = MessageBox.TYPE_ERROR)
 
        def FileBrowserClosed(self, path, scope):
                if scope == "menutemplate":