diff options
author | Matthias Clasen <mclasen@redhat.com> | 2021-01-05 13:57:47 -0500 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2021-01-05 13:58:58 -0500 |
commit | ca9801f5fb50d749d89a69f0614bb85da6b17335 (patch) | |
tree | 3fb14764a733d59d161f043cadb15bd990ce94d1 | |
parent | 6b6fc1e5d8c309b44af6da6d27033eedc6238323 (diff) | |
download | gtk+-ca9801f5fb50d749d89a69f0614bb85da6b17335.tar.gz |
3to4: Remove GtkToolbar::toolbar_style
The property was removed (with the rest of the widget),
so keeping it around in the ui file makes no sense.
Testcase included.
-rw-r--r-- | gtk/tools/gtk-builder-tool-simplify.c | 14 | ||||
-rw-r--r-- | testsuite/tools/simplify-data-3to4/toolbar.ui | 1 |
2 files changed, 15 insertions, 0 deletions
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 @@ -1726,6 +1726,20 @@ rewrite_toolbar (Element *element, 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; Element *object = NULL; Element *packing = NULL; 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 @@ <requires lib="gtk+" version="3.0"/> <object class="GtkToolbar"> <property name="visible">1</property> + <property name="toolbar_style">both</property> <child> <object class="GtkToolButton"> <property name="visible">1</property> |