Commit d13b806a authored by Tristan Van Berkom's avatar Tristan Van Berkom

Reverted the above patch portion where built objects only had thier


	* gladeui/glade-widget.c: Reverted the above patch portion where built
	  objects only had thier construct props set, this caused errors, fixed.

Also fixed a bug in previous copy of glade-editor-proeprty.c


svn path=/trunk/; revision=1913
parent 9bcbb72e
......@@ -127,6 +127,9 @@
metadata as comments at the toplevel in libglade and older versions
of gtk+ that dont recognize versioning (i.e. gtk+ < 2.14) (bug 536310)
* gladeui/glade-widget.c: Reverted the above patch portion where built
objects only had thier construct props set, this caused errors, fixed.
2008-09-15 Juan Pablo Ugarte <juanpablougarte@gmail.com>
* plugins/gtk+/glade-gtk.c, plugins/gtk+/gtk+.xml.in:
......
......@@ -2717,18 +2717,22 @@ glade_eprop_object_show_dialog (GtkWidget *dialog_button,
new_object = g_value_get_object (value);
new_widget = glade_widget_get_from_gobject (new_object);
if (new_object && old_object != new_object &&
(old_ref = glade_widget_get_parentless_widget_ref (new_widget)))
if (new_object && old_object != new_object)
{
gchar *desc = g_strdup_printf (_("Setting %s of %s to %s"),
eprop->property->klass->name,
eprop->property->widget->name,
new_widget->name);
glade_command_push_group (desc);
glade_command_set_property (old_ref, NULL);
glade_editor_property_commit (eprop, value);
glade_command_pop_group ();
g_free (desc);
if ((old_ref = glade_widget_get_parentless_widget_ref (new_widget)))
{
gchar *desc = g_strdup_printf (_("Setting %s of %s to %s"),
eprop->property->klass->name,
eprop->property->widget->name,
new_widget->name);
glade_command_push_group (desc);
glade_command_set_property (old_ref, NULL);
glade_editor_property_commit (eprop, value);
glade_command_pop_group ();
g_free (desc);
}
else
glade_editor_property_commit (eprop, value);
}
}
}
......
......@@ -508,7 +508,7 @@ glade_widget_build_object (GladeWidgetAdaptor *adaptor,
{
GParameter *params;
GObject *object;
guint n_params;
guint n_params, i;
if (reason == GLADE_CREATE_LOAD)
return g_object_new (adaptor->type, NULL);
......@@ -524,6 +524,16 @@ glade_widget_build_object (GladeWidgetAdaptor *adaptor,
free_params (params, n_params);
if (widget)
params = glade_widget_template_params (widget, FALSE, &n_params);
else
params = glade_widget_adaptor_default_params (adaptor, FALSE, &n_params);
for (i = 0; i < n_params; i++)
g_object_set_property (object, params[i].name, &(params[i].value));
free_params (params, n_params);
return object;
}
......
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