use already translated string
[enigma2.git] / lib / python / Plugins / Extensions / DVDBurn / DVDProject.py
index 9ee3bdb955e50281a8d0327638b405cfabbd6f37..112a221e2500db44676e740826a6eac6d416f86d 100644 (file)
@@ -1,5 +1,5 @@
 from Tools.Directories import fileExists
-from Components.config import config, ConfigSubsection, ConfigInteger, ConfigYesNo, ConfigText, ConfigSelection, getConfigListEntry, ConfigSequence
+from Components.config import config, ConfigSubsection, ConfigInteger, ConfigText, ConfigSelection, getConfigListEntry, ConfigSequence
 
 class ConfigColor(ConfigSequence):
        def __init__(self):
@@ -9,24 +9,45 @@ class ConfigPixelvals(ConfigSequence):
        def __init__(self):
                ConfigSequence.__init__(self, seperator = ",", limits = [(0,200),(0,200),(0,200)])
 
+class ConfigPixelvals(ConfigSequence):
+       def __init__(self):
+               ConfigSequence.__init__(self, seperator = ",", limits = [(0,200),(0,200),(0,200)])
+
+class ConfigFilename(ConfigText):
+       def __init__(self):
+               ConfigText.__init__(self, default = "", fixed_size = True, visible_width = False)
+
+       def getMulti(self, selected):
+               filename = (self.text.rstrip("/").rsplit("/",1))[1].encode("utf-8")[:40] + " "
+               if self.allmarked:
+                       mark = range(0, len(filename))
+               else:
+                       mark = [filename]
+               return ("mtext"[1-selected:], filename, mark)
+       
 class DVDProject:
        def __init__(self):
                self.titles = [ ]
                self.target = None
                self.settings = ConfigSubsection()
-               self.settings.name = ConfigText(visible_width = 40)
-               self.settings.authormode = ConfigSelection(choices = [("menu_linked", _("Linked titles with a DVD menu")), ("just_linked", _("Direct playback of linked titles without menu")), ("menu_seperate", _("Seperate titles with a main menu")), ])
-               self.settings.menubg = ConfigText(visible_width = 40)
-               self.settings.menuaudio = ConfigText(visible_width = 40)
-               self.settings.titleformat = ConfigText(visible_width = 40)
-               self.settings.subtitleformat = ConfigText(visible_width = 40)
+               self.settings.name = ConfigText(fixed_size = False, visible_width = 40)
+               self.settings.authormode = ConfigSelection(choices = [("menu_linked", _("Linked titles with a DVD menu")), ("just_linked", _("Direct playback of linked titles without menu")), ("menu_seperate", _("Seperate titles with a main menu")), ("data_ts", _("Dreambox format data DVD (HDTV compatible)"))])
+               self.settings.titlesetmode = ConfigSelection(choices = [("single", _("Simple titleset (compatibility for legacy players)")), ("multi", _("Complex (allows mixing audio tracks and aspects)"))], default="multi")
+               self.settings.output = ConfigSelection(choices = [("iso", _("Create DVD-ISO")), ("dvd", _("Burn DVD"))])
+               self.settings.isopath = ConfigText(fixed_size = False, visible_width = 40)
+               self.settings.dataformat = ConfigSelection(choices = [("iso9660_1", ("ISO9660 Level 1")), ("iso9660_4", ("ISO9660 version 2")), ("udf", ("UDF"))])                      
+               self.settings.menubg = ConfigFilename()
+               self.settings.menuaudio = ConfigFilename()
+               self.settings.titleformat = ConfigText(fixed_size = False, visible_width = 40)
+               self.settings.subtitleformat = ConfigText(fixed_size = False, visible_width = 40)
                self.settings.color_headline = ConfigColor()
                self.settings.color_highlight = ConfigColor()
                self.settings.color_button = ConfigColor()
-               self.settings.font_face = ConfigText(visible_width = 40)
+               self.settings.font_face = ConfigFilename()
                self.settings.font_size = ConfigPixelvals()
                self.settings.space = ConfigPixelvals()
-               self.settings.vmgm = ConfigText(visible_width = 40)
+               self.settings.vmgm = ConfigFilename()
+               self.filekeys = ["vmgm", "menubg", "menuaudio", "font_face", "isopath"]
 
        def addService(self, service):
                import DVDTitle
@@ -100,8 +121,7 @@ class DVDProject:
                                                self.error = "unknown attribute '%s'" % (key)
                                                raise AttributeError
                                        i += 1
-                       checkfiles = ["vmgm", "menubg", "menuaudio", "font_face"]
-                       for key in checkfiles:
+                       for key in self.filekeys:
                                val = self.settings.dict()[key].getValue()
                                if not fileExists(val):
                                        self.error += "\n%s '%s' not found" % (key, val)