summaryrefslogtreecommitdiff
path: root/gtk/gen-gtk-gresources-xml.py
diff options
context:
space:
mode:
authorAlexander Larsson <alexl@redhat.com>2018-09-10 05:09:12 +0200
committerAlexander Larsson <alexl@redhat.com>2018-09-10 05:09:12 +0200
commitb128e52915065d8b1fef23485b0e9c27988fba1d (patch)
tree1c5331a52c659aa92606ac9418918420627a597d /gtk/gen-gtk-gresources-xml.py
parent005f932d13dafd01c9fcf7565be1a4fb9280228c (diff)
downloadgtk+-wip/alexl/gtkbuilder-xml-preparse.tar.gz
Use pre-parsed xml for GtkBuilder resource fileswip/alexl/gtkbuilder-xml-preparse
This enables the xml-preparser gresource option which runs the xml through g_markup_parser_context_record(), and saves the generated binary format instead of the xml. We then check for the magic marker in the GtkBuilder code so that this automatically uses g_markup_parser_context_replay() instead, to avoid any parsing. The binary format is also smaller.
Diffstat (limited to 'gtk/gen-gtk-gresources-xml.py')
-rw-r--r--gtk/gen-gtk-gresources-xml.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/gtk/gen-gtk-gresources-xml.py b/gtk/gen-gtk-gresources-xml.py
index 440d0b75f0..cf9b4c32d5 100644
--- a/gtk/gen-gtk-gresources-xml.py
+++ b/gtk/gen-gtk-gresources-xml.py
@@ -57,7 +57,7 @@ for f in get_files('gesture', '.symbolic.png'):
xml += '\n'
for f in get_files('ui', '.ui'):
- xml += ' <file preprocess=\'xml-stripblanks\'>ui/{0}</file>\n'.format(f)
+ xml += ' <file preprocess=\'xml-stripblanks,xml-preparse\'>ui/{0}</file>\n'.format(f)
xml += '\n'