[gtk/gtk-4-4] resources: Treat svgs as xml



commit 0d94a4fcc88880f42684b6eebdfd80c43b62329f
Author: Matthias Clasen <mclasen redhat com>
Date:   Sun Sep 19 08:26:14 2021 -0400

    resources: Treat svgs as xml
    
    They can have their whitespace removed just the same.

 gtk/gen-gtk-gresources-xml.py | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/gtk/gen-gtk-gresources-xml.py b/gtk/gen-gtk-gresources-xml.py
index 81c06637bc..179761a154 100644
--- a/gtk/gen-gtk-gresources-xml.py
+++ b/gtk/gen-gtk-gresources-xml.py
@@ -55,7 +55,7 @@ for f in get_files('theme/Default/assets', '.png'):
 xml += '\n'
 
 for f in get_files('theme/Default/assets', '.svg'):
-  xml += '    <file>theme/Default/assets/{0}</file>\n'.format(f)
+  xml += '    <file preprocess=\'xml-stripblanks\'>theme/Default/assets/{0}</file>\n'.format(f)
 
 for f in get_files('theme/Default/assets-hc', '.png'):
   xml += '    <file>theme/Default/assets-hc/{0}</file>\n'.format(f)
@@ -63,10 +63,10 @@ for f in get_files('theme/Default/assets-hc', '.png'):
 xml += '\n'
 
 for f in get_files('theme/Default/assets-hc', '.svg'):
-  xml += '    <file>theme/Default/assets-hc/{0}</file>\n'.format(f)
+  xml += '    <file preprocess=\'xml-stripblanks\'>theme/Default/assets-hc/{0}</file>\n'.format(f)
 
 for f in get_files('ui', '.ui'):
-  xml += '    <file preprocess=\'xml-stripblanks\'>ui/{0}</file>\n'.format(f)
+  xml += '    <file>ui/{0}</file>\n'.format(f)
 
 xml += '\n'
 
@@ -77,7 +77,7 @@ for s in ['16x16', '32x32', '64x64', 'scalable']:
       for f in get_files(icons_dir, '.png'):
         xml += '    <file>icons/{0}/{1}/{2}</file>\n'.format(s,c,f)
       for f in get_files(icons_dir, '.svg'):
-        xml += '    <file>icons/{0}/{1}/{2}</file>\n'.format(s,c,f)
+        xml += '    <file preprocess=\'xml-stripblanks\'>icons/{0}/{1}/{2}</file>\n'.format(s,c,f)
 
 for f in get_files('inspector', '.ui'):
   xml += '    <file preprocess=\'xml-stripblanks\'>inspector/{0}</file>\n'.format(f)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]