[maemo-commits] [maemo-commits] r11783 - projects/haf/trunk/glib/gobject

From: subversion at stage.maemo.org subversion at stage.maemo.org
Date: Wed May 23 18:22:45 EEST 2007
Author: timj
Date: 2007-05-23 18:20:03 +0300 (Wed, 23 May 2007)
New Revision: 11783

Modified:
   projects/haf/trunk/glib/gobject/ChangeLog
   projects/haf/trunk/glib/gobject/gobject.c
   projects/haf/trunk/glib/gobject/gobject.h
Log:
Tue Apr  3 12:34:14 2007  Tim Janik  <timj at gtk.org>

        * gobject.[hc]: invoke GObjectClass.constructed() only for newly
        constructed objects, and invoke it while the notify queue is
        still being frozen, after all CONSTRUCT* properties have been
        set and before random other properties are being set.

        * applied modified patch from Ryan Lortie to implement
        GObjectClass.constructed() to fix #425324.

2007-04-02  Ryan Lortie  <desrt at desrt.ca>

        * gobject/gobject.h: Add 'constructed' vcall to GObjectClass.
        * gobject/gobject.c (g_object_newv): call ->constructed() as last
        step of object construction.




Modified: projects/haf/trunk/glib/gobject/ChangeLog
===================================================================
--- projects/haf/trunk/glib/gobject/ChangeLog	2007-05-23 14:36:10 UTC (rev 11782)
+++ projects/haf/trunk/glib/gobject/ChangeLog	2007-05-23 15:20:03 UTC (rev 11783)
@@ -1,3 +1,22 @@
+Tue Apr  3 12:34:14 2007  Tim Janik  <timj at gtk.org>
+
+	* gobject.[hc]: invoke GObjectClass.constructed() only for newly
+	constructed objects, and invoke it while the notify queue is
+	still being frozen, after all CONSTRUCT* properties have been
+	set and before random other properties are being set.
+
+	* applied modified patch from Ryan Lortie to implement
+	GObjectClass.constructed() to fix #425324.
+
+2007-04-02  Ryan Lortie  <desrt at desrt.ca>
+
+	* gobject/gobject.h: Add 'constructed' vcall to GObjectClass.
+	* gobject/gobject.c (g_object_newv): call ->constructed() as last
+	step of object construction.
+
+2007-03-16  Matthias Clasen  <mclasen at redhat.com>
+  
+  	* === Released 2.13.0 ===
 2007-05-01  Matthias Clasen  <mclasen at redhat.com>
 
 	* === Released 2.12.12 ===

Modified: projects/haf/trunk/glib/gobject/gobject.c
===================================================================
--- projects/haf/trunk/glib/gobject/gobject.c	2007-05-23 14:36:10 UTC (rev 11782)
+++ projects/haf/trunk/glib/gobject/gobject.c	2007-05-23 15:20:03 UTC (rev 11783)
@@ -950,6 +950,10 @@
   if (newly_constructed)
     g_object_notify_queue_thaw (object, nqueue);
 
+  /* run 'constructed' handler if there is one */
+  if (newly_constructed && class->constructed)
+    class->constructed (object);
+
   /* set remaining properties */
   for (i = 0; i < n_oparams; i++)
     object_set_property (object, oparams[i].pspec, oparams[i].value, nqueue);
@@ -958,6 +962,7 @@
   /* release our own freeze count and handle notifications */
   if (newly_constructed || n_oparams)
     g_object_notify_queue_thaw (object, nqueue);
+
   if (unref_class)
     g_type_class_unref (unref_class);
 

Modified: projects/haf/trunk/glib/gobject/gobject.h
===================================================================
--- projects/haf/trunk/glib/gobject/gobject.h	2007-05-23 14:36:10 UTC (rev 11782)
+++ projects/haf/trunk/glib/gobject/gobject.h	2007-05-23 15:20:03 UTC (rev 11783)
@@ -87,10 +87,11 @@
   GSList      *construct_properties;
 
   /*< public >*/
-  /* overridable methods */
+  /* seldomly overidden */
   GObject*   (*constructor)     (GType                  type,
                                  guint                  n_construct_properties,
                                  GObjectConstructParam *construct_properties);
+  /* overridable methods */
   void       (*set_property)		(GObject        *object,
                                          guint           property_id,
                                          const GValue   *value,
@@ -101,18 +102,20 @@
                                          GParamSpec     *pspec);
   void       (*dispose)			(GObject        *object);
   void       (*finalize)		(GObject        *object);
-  
   /* seldomly overidden */
   void       (*dispatch_properties_changed) (GObject      *object,
 					     guint	   n_pspecs,
 					     GParamSpec  **pspecs);
-
   /* signals */
   void	     (*notify)			(GObject	*object,
 					 GParamSpec	*pspec);
+
+  /* called when done constructing */
+  void	     (*constructed)		(GObject	*object);
+
   /*< private >*/
   /* padding */
-  gpointer	pdummy[8];
+  gpointer	pdummy[7];
 };
 struct _GObjectConstructParam
 {


More information about the maemo-commits mailing list