summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2019-03-28 19:28:05 -0400
committerMatthias Clasen <mclasen@redhat.com>2019-03-28 19:28:05 -0400
commitc30fc92b3e1030394a287d8dec5a8c4ec015ca46 (patch)
tree557fd9c7e913431e7c6f5f4bcd680165de620689
parent7222bda146713f83829848389d2926e62ed03553 (diff)
downloadgtk+-c30fc92b3e1030394a287d8dec5a8c4ec015ca46.tar.gz
builder-tool: Don't strip the xml declaration
This is useful for interoperability with other tools.
-rw-r--r--gtk/tools/gtk-builder-tool-simplify.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/gtk/tools/gtk-builder-tool-simplify.c b/gtk/tools/gtk-builder-tool-simplify.c
index 2c7f4e52cf..44f5f59e53 100644
--- a/gtk/tools/gtk-builder-tool-simplify.c
+++ b/gtk/tools/gtk-builder-tool-simplify.c
@@ -1265,8 +1265,15 @@ dump_element (Element *element,
}
static void
+write_xml_declaration (FILE *output)
+{
+ g_fprintf (output, "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n");
+}
+
+static void
dump_tree (MyParserData *data)
{
+ write_xml_declaration (data->output);
dump_element (data->root, data->output, 0);
}