Commit 1a198f86 authored by Juan Pablo Ugarte's avatar Juan Pablo Ugarte

GladeCommand: ensure widget name on object properties

Closes issue #307 "Error in Glade 3.22.1 in menu item XML produced"
parent 540f025c
......@@ -618,6 +618,16 @@ glade_command_set_property_execute (GladeCommand *cmd)
}
}
/* Make sure the target object has a name for object properties */
if (glade_property_class_is_object (pclass))
{
GObject *pobject = g_value_get_object (&new_value);
GladeWidget *pwidget;
if (pobject && (pwidget = glade_widget_get_from_gobject (pobject)))
glade_widget_ensure_name (pwidget, cmd->priv->project, TRUE);
}
success = glade_property_set_value (sdata->property, &new_value);
retval = retval || success;
......
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