Commit 0066ee41 authored by Juan Pablo Ugarte's avatar Juan Pablo Ugarte
Browse files

GladeGtkWidget: add viewport on add scrolled window action

Add a viewport for non scrollable widget when adding a
scrolled window parent.

Fix issue #471 "XML not updated after adding element"
parent 068528e6
......@@ -932,6 +932,18 @@ glade_gtk_widget_action_activate (GladeWidgetAdaptor *adaptor,
if ((gnew_parent =
glade_command_create (adaptor, gparent, NULL, project)) != NULL)
/* We might need to add a viewport */
if (new_type == GTK_TYPE_SCROLLED_WINDOW &&
GladeWidgetAdaptor *viewport =
glade_widget_adaptor_get_by_type (GTK_TYPE_VIEWPORT);
gnew_parent = glade_command_create (viewport,
/* Now we created the new parent, if gwidget had a parentless widget reference...
* set that reference to the new parent instead */
if (property)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment