From c392f41bb2d53a1b40fe236cfe1a04efe6d97066 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Sun, 8 Jan 2017 13:07:12 +0100 Subject: [PATCH] builderparser: Shuffle if-statements around once more The previous reordering broke the builderparser test case. --- gtk/gtkbuilderparser.c | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/gtk/gtkbuilderparser.c b/gtk/gtkbuilderparser.c index 68516ee706..b2c62888e3 100644 --- a/gtk/gtkbuilderparser.c +++ b/gtk/gtkbuilderparser.c @@ -967,22 +967,22 @@ start_element (GMarkupParseContext *context, return; } - if (strcmp (element_name, "property") == 0) - parse_property (data, element_name, names, values, error); - else if (strcmp (element_name, "object") == 0) + if (strcmp (element_name, "object") == 0) parse_object (context, data, element_name, names, values, error); - else if (strcmp (element_name, "child") == 0) - parse_child (data, element_name, names, values, error); - else if (strcmp (element_name, "signal") == 0) - parse_signal (data, element_name, names, values, error); - else if (strcmp (element_name, "requires") == 0) - parse_requires (data, element_name, names, values, error); - else if (strcmp (element_name, "template") == 0) - parse_template (context, data, element_name, names, values, error); else if (data->requested_objects && !data->inside_requested_object) { /* If outside a requested object, simply ignore this tag */ } + else if (strcmp (element_name, "property") == 0) + parse_property (data, element_name, names, values, error); + else if (strcmp (element_name, "child") == 0) + parse_child (data, element_name, names, values, error); + else if (strcmp (element_name, "signal") == 0) + parse_signal (data, element_name, names, values, error); + else if (strcmp (element_name, "template") == 0) + parse_template (context, data, element_name, names, values, error); + else if (strcmp (element_name, "requires") == 0) + parse_requires (data, element_name, names, values, error); else if (strcmp (element_name, "interface") == 0) parse_interface (data, element_name, names, values, error); else if (strcmp (element_name, "menu") == 0) @@ -1028,7 +1028,11 @@ end_element (GMarkupParseContext *context, return; } - if (strcmp (element_name, "property") == 0) + if (data->requested_objects && !data->inside_requested_object) + { + /* If outside a requested object, simply ignore this tag */ + } + else if (strcmp (element_name, "property") == 0) { PropertyInfo *prop_info = state_pop_info (data, PropertyInfo); CommonInfo *info = state_peek_info (data, CommonInfo); @@ -1135,10 +1139,6 @@ end_element (GMarkupParseContext *context, else if (strcmp (element_name, "interface") == 0) { } - else if (data->requested_objects && !data->inside_requested_object) - { - /* If outside a requested object, simply ignore this tag */ - } else if (strcmp (element_name, "menu") == 0) { _gtk_builder_menu_end (data);