[nautilus-actions] NAPivot: call parent_class::constructed() method at the beginning of the function



commit 8772d8e4beff9e3def308ce6aed6f864b256b5f3
Author: Pierre Wieser <pwieser trychlos org>
Date:   Sun Jan 8 12:52:34 2012 +0100

    NAPivot: call parent_class::constructed() method at the beginning of the function

 ChangeLog           |    1 +
 src/core/na-pivot.c |   21 +++++++++++----------
 2 files changed, 12 insertions(+), 10 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index bfe6ea0..97f902c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -3,6 +3,7 @@
 	Rather call parent_class::instance_constructed() method before executing
 	the derived class one.
 
+	* src/core/na-pivot.c (instance_constructed):
 	* src/nact/nact-assistant-export.c (instance_constructed):
 	* src/nact/nact-main-window.c (instance_constructed):
 	* src/nact/nact-tree-view.c (instance_constructed):
diff --git a/src/core/na-pivot.c b/src/core/na-pivot.c
index a8c2cfc..c818b4a 100644
--- a/src/core/na-pivot.c
+++ b/src/core/na-pivot.c
@@ -228,26 +228,27 @@ static void
 instance_constructed( GObject *object )
 {
 	static const gchar *thisfn = "na_pivot_instance_constructed";
-	NAPivot *self;
+	NAPivotPrivate *priv;
 
 	g_return_if_fail( NA_IS_PIVOT( object ));
-	self = NA_PIVOT( object );
 
-	if( !self->private->dispose_has_run ){
+	priv = NA_PIVOT( object )->private;
 
-		g_debug( "%s: object=%p", thisfn, ( void * ) object );
+	if( !priv->dispose_has_run ){
 
-		self->private->modules = na_module_load_modules();
+		/* chain up to the parent class */
+		if( G_OBJECT_CLASS( st_parent_class )->constructed ){
+			G_OBJECT_CLASS( st_parent_class )->constructed( object );
+		}
+
+		g_debug( "%s: object=%p (%s)", thisfn, ( void * ) object, G_OBJECT_TYPE_NAME( object ));
+
+		priv->modules = na_module_load_modules();
 
 		/* force class initialization and io-factory registration
 		 */
 		g_object_unref( na_object_action_new_with_profile());
 		g_object_unref( na_object_menu_new());
-
-		/* chain up to the parent class */
-		if( G_OBJECT_CLASS( st_parent_class )->constructed ){
-			G_OBJECT_CLASS( st_parent_class )->constructed( object );
-		}
 	}
 }
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]