diff --git a/gtk/tools/gtk-builder-tool-simplify.c b/gtk/tools/gtk-builder-tool-simplify.c index 0541207a97..b61487c537 100644 --- a/gtk/tools/gtk-builder-tool-simplify.c +++ b/gtk/tools/gtk-builder-tool-simplify.c @@ -1723,6 +1723,20 @@ rewrite_toolbar (Element *element, set_attribute_value (element, "class", "GtkBox"); + for (l = element->children; l; l = l->next) + { + Element *child = l->data; + + if (g_str_equal (child->element_name, "property") && + (has_attribute (child, "name", "toolbar_style") || + has_attribute (child, "name", "toolbar-style"))) + { + element->children = g_list_remove (element->children, child); + free_element (child); + break; + } + } + for (l = element->children; l; l = l->next) { Element *child = l->data; diff --git a/testsuite/tools/simplify-data-3to4/toolbar.ui b/testsuite/tools/simplify-data-3to4/toolbar.ui index 3f45466024..d695a41b6b 100644 --- a/testsuite/tools/simplify-data-3to4/toolbar.ui +++ b/testsuite/tools/simplify-data-3to4/toolbar.ui @@ -3,6 +3,7 @@ 1 + both 1