from Components.config import config, ConfigSubsection, ConfigInteger, ConfigText, ConfigSelection, getConfigListEntry, ConfigSequence, ConfigSubList
class ConfigColor(ConfigSequence):
- def __init__(self):
- ConfigSequence.__init__(self, seperator = "#", limits = [(0,255),(0,255),(0,255)])
+ def __init__(self, default = [128,128,128]):
+ ConfigSequence.__init__(self, seperator = "#", limits = [(0,255),(0,255),(0,255)], default = default)
class ConfigFilename(ConfigText):
def __init__(self):
return ("mtext"[1-selected:], filename, mark)
class DVDProject:
+ MAX_SL = 4480
+ MAX_DL = 8150
def __init__(self):
self.titles = [ ]
self.target = None
return title
def saveProject(self, path):
- import xml.dom.minidom
- from Tools.XMLTools import elementsWithTag, mergeText, stringToXML
+ from Tools.XMLTools import stringToXML
list = []
list.append('<?xml version="1.0" encoding="utf-8" ?>\n')
list.append('<DreamDVDBurnerProject>\n')
if project.nodeType == xml.dom.minidom.Element.nodeType:
if project.tagName == 'settings':
i = 0
- if project.attributes.length < len(self.settings.dict()):
+ if project.attributes.length < len(self.settings.dict())-1:
self.error = "project attributes missing"
raise AttributeError
while i < project.attributes.length:
return False
return True
+ def getSize(self):
+ totalsize = 0
+ for title in self.titles:
+ totalsize += title.estimatedDiskspace
+ return totalsize
+
+ size = property(getSize)
+
class MenuTemplate(DVDProject):
def __init__(self):
self.settings = ConfigSubsection()
self.settings.thumb_size = ConfigSequence(seperator = ',', default = [200,158], limits = [(0,576),(-1,720)])
self.settings.thumb_border = ConfigInteger(default = 2, limits = (0, 20))
self.filekeys = ["menubg", "menuaudio", "fontface_headline", "fontface_title", "fontface_subtitle"]
+ from TitleProperties import languageChoices
+ self.settings.menulang = ConfigSelection(choices = languageChoices.choices, default=languageChoices.choices[1][0])
def loadTemplate(self, filename):
ret = DVDProject.loadProject(self, filename)