glade3 r1799 - in trunk: . gladeui
- From: jpu svn gnome org
- To: svn-commits-list gnome org
- Subject: glade3 r1799 - in trunk: . gladeui
- Date: Thu, 17 Apr 2008 00:22:10 +0100 (BST)
Author: jpu
Date: Thu Apr 17 00:22:10 2008
New Revision: 1799
URL: http://svn.gnome.org/viewvc/glade3?rev=1799&view=rev
Log:
* gladeui/glade-widget.c: make glade_widget_build_object() do not apply
catalog defaults if the object we are creating is for loading purposes.
Modified:
trunk/ChangeLog
trunk/gladeui/glade-widget.c
Modified: trunk/gladeui/glade-widget.c
==============================================================================
--- trunk/gladeui/glade-widget.c (original)
+++ trunk/gladeui/glade-widget.c Thu Apr 17 00:22:10 2008
@@ -502,16 +502,19 @@
}
static GObject *
-glade_widget_build_object (GladeWidgetAdaptor *adaptor, GladeWidget *widget, void /* GladeWidgetInfo */ *info)
+glade_widget_build_object (GladeWidgetAdaptor *adaptor,
+ GladeWidget *widget,
+ GladeCreateReason reason)
{
GParameter *params;
GObject *object;
guint n_params, i;
+
+ if (reason == GLADE_CREATE_LOAD)
+ return g_object_new (adaptor->type, NULL);
if (widget)
params = glade_widget_template_params (widget, TRUE, &n_params);
-/* else if (info) */
-/* params = glade_widget_info_params (adaptor, info, TRUE, &n_params); */
else
params = glade_widget_adaptor_default_params (adaptor, TRUE, &n_params);
@@ -523,8 +526,6 @@
if (widget)
params = glade_widget_template_params (widget, FALSE, &n_params);
-/* else if (info) */
-/* params = glade_widget_info_params (adaptor, info, FALSE, &n_params); */
else
params = glade_widget_adaptor_default_params (adaptor, FALSE, &n_params);
@@ -698,7 +699,7 @@
{
object = glade_widget_build_object(gwidget->adaptor,
gwidget->construct_template,
- NULL/* gwidget->construct_info */);
+ gwidget->construct_reason);
glade_widget_set_object (gwidget, object);
}
@@ -2198,7 +2199,7 @@
/* Hold a reference to the old widget while we transport properties
* and children from it
*/
- new_object = glade_widget_build_object(adaptor, gwidget, NULL);
+ new_object = glade_widget_build_object(adaptor, gwidget, GLADE_CREATE_REBUILD);
old_object = g_object_ref(glade_widget_get_object (gwidget));
glade_widget_set_object (gwidget, new_object);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]