Commit 35923d01 authored by Juan Pablo Ugarte's avatar Juan Pablo Ugarte

GladeCommand: ignore special child types placeholders in add command.

GladeGtkWindow: mark titlebar placeholder as special child type.

Fix bug "Glade deletes all widgets when adding a Scrolled Window parent, but doesn't show it."

#196
parent bc5f9d0f
......@@ -1281,8 +1281,9 @@ glade_command_add (GList *widgets,
{
child = l->data;
/* Find a placeholder for this child */
if (GLADE_IS_PLACEHOLDER (child) &&
/* Find a placeholder for this child, ignore special child types */
if (GLADE_IS_PLACEHOLDER (child) &&
g_object_get_data (G_OBJECT (child), "special-child-type") == NULL &&
g_list_find (placeholders, child) == NULL)
{
placeholders = g_list_append (placeholders, child);
......
......@@ -55,6 +55,7 @@ glade_gtk_window_ensure_titlebar_placeholder (GObject *window)
return;
placeholder = glade_placeholder_new ();
g_object_set_data (G_OBJECT (placeholder), "special-child-type", "titlebar");
gtk_window_set_titlebar (GTK_WINDOW (window), placeholder);
gtk_widget_hide (placeholder);
......
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