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.
This commit is contained in:
Matthias Clasen 2021-01-05 13:57:47 -05:00
parent 6b6fc1e5d8
commit ca9801f5fb
2 changed files with 15 additions and 0 deletions

View File

@ -1723,6 +1723,20 @@ rewrite_toolbar (Element *element,
set_attribute_value (element, "class", "GtkBox"); 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) for (l = element->children; l; l = l->next)
{ {
Element *child = l->data; Element *child = l->data;

View File

@ -3,6 +3,7 @@
<requires lib="gtk+" version="3.0"/> <requires lib="gtk+" version="3.0"/>
<object class="GtkToolbar"> <object class="GtkToolbar">
<property name="visible">1</property> <property name="visible">1</property>
<property name="toolbar_style">both</property>
<child> <child>
<object class="GtkToolButton"> <object class="GtkToolButton">
<property name="visible">1</property> <property name="visible">1</property>