avoid gtk_widget_reparent(), deprecated in GTK+ 3.14

(cherry picked from commit f8e430e479)
This commit is contained in:
Paul Cornett
2015-10-10 10:40:57 -07:00
parent 41e5cd4506
commit d3dba370da
2 changed files with 11 additions and 10 deletions

View File

@@ -281,7 +281,10 @@ void wxToolBarTool::CreateDropDown()
GtkWidget* box = gtk_box_new(orient, 0);
GtkWidget* arrow = gtk_arrow_new(arrowType, GTK_SHADOW_NONE);
GtkWidget* tool_button = gtk_bin_get_child(GTK_BIN(m_item));
gtk_widget_reparent(tool_button, box);
g_object_ref(tool_button);
gtk_container_remove(GTK_CONTAINER(m_item), tool_button);
gtk_container_add(GTK_CONTAINER(box), tool_button);
g_object_unref(tool_button);
GtkWidget* arrow_button = gtk_toggle_button_new();
gtk_button_set_relief(GTK_BUTTON(arrow_button),
gtk_tool_item_get_relief_style(GTK_TOOL_ITEM(m_item)));