[gtk] builder-tool: Don't strip the xml declaration
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk] builder-tool: Don't strip the xml declaration
- Date: Thu, 28 Mar 2019 23:28:53 +0000 (UTC)
commit c30fc92b3e1030394a287d8dec5a8c4ec015ca46
Author: Matthias Clasen <mclasen redhat com>
Date: Thu Mar 28 19:28:05 2019 -0400
builder-tool: Don't strip the xml declaration
This is useful for interoperability with other tools.
gtk/tools/gtk-builder-tool-simplify.c | 7 +++++++
1 file changed, 7 insertions(+)
---
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
@@ -1264,9 +1264,16 @@ dump_element (Element *element,
g_fprintf (output, "/>\n");
}
+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);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]