aboutsummaryrefslogtreecommitdiff
path: root/gui
diff options
context:
space:
mode:
authorVicent Marti2008-10-18 10:06:33 +0000
committerVicent Marti2008-10-18 10:06:33 +0000
commit1cc3ae04cdaca1716bb6c78c621bfdfacf3f5b22 (patch)
treee51676a931f277577e73a8121934b4942489813d /gui
parentdf8af387fb33d5ef645e41b554267aaafd2432bf (diff)
downloadscummvm-rg350-1cc3ae04cdaca1716bb6c78c621bfdfacf3f5b22.tar.gz
scummvm-rg350-1cc3ae04cdaca1716bb6c78c621bfdfacf3f5b22.tar.bz2
scummvm-rg350-1cc3ae04cdaca1716bb6c78c621bfdfacf3f5b22.zip
Fixed: Default theme had several XML headers.
svn-id: r34818
Diffstat (limited to 'gui')
-rw-r--r--gui/themes/default.inc4
-rw-r--r--gui/themes/scummtheme.py9
2 files changed, 8 insertions, 5 deletions
diff --git a/gui/themes/default.inc b/gui/themes/default.inc
index a7adc49d7f..1376b9db04 100644
--- a/gui/themes/default.inc
+++ b/gui/themes/default.inc
@@ -1,4 +1,4 @@
-"<?xml version = '1.0'?> "
+ "<?xml version = '1.0'?>"
"<render_info> "
"<palette> "
"<color name = 'black' "
@@ -305,7 +305,6 @@
"/> "
"</drawdata> "
"</render_info> "
-"<?xml version = '1.0'?> "
"<layout_info resolution = '-320xY, -256x240'> "
"<globals> "
"<def var = 'Line.Height' value = '16' /> "
@@ -909,7 +908,6 @@
"</layout> "
"</dialog> "
"</layout_info> "
-"<?xml version = '1.0'?> "
"<layout_info resolution = '320xY, 256x240'> "
"<globals> "
"<def var = 'Line.Height' value = '12' /> "
diff --git a/gui/themes/scummtheme.py b/gui/themes/scummtheme.py
index e88f8c1f9c..72cf8d0c82 100644
--- a/gui/themes/scummtheme.py
+++ b/gui/themes/scummtheme.py
@@ -35,12 +35,15 @@ def buildAllThemes():
def parseSTX(theme_file, def_file):
comm = re.compile("<!--(.*?)-->", re.DOTALL)
+ head = re.compile("<\?(.*?)\?>")
output = ""
for line in theme_file:
output += line.rstrip("\r\n\t ").lstrip() + " \n"
-
- output = re.sub(comm, "", output).replace("\t", " ").replace(" ", " ").replace("\"", "'").splitlines()
+
+ output = re.sub(comm, "", output)
+ output = re.sub(head, "", output)
+ output = output.replace("\t", " ").replace(" ", " ").replace("\"", "'").splitlines()
for line in output:
if line and not line.isspace():
@@ -52,6 +55,8 @@ def buildDefTheme(themeName):
if not os.path.isdir(themeName):
print "Cannot open default theme dir."
+ def_file.write(""" "<?xml version = '1.0'?>"\n""")
+
for filename in os.listdir(themeName):
filename = os.path.join(themeName, filename)
if os.path.isfile(filename) and filename.endswith(".stx"):