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



commit 21867cf87f74a463d4bcea9897ac15201b69ca1f
Author: Pierre Wieser <pwieser trychlos org>
Date:   Sun Jan 8 12:27:15 2012 +0100

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

 ChangeLog                 |    1 +
 src/nact/nact-tree-view.c |   30 +++++++++++++++++++-----------
 2 files changed, 20 insertions(+), 11 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 0cfad94..5547543 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -3,6 +3,7 @@
 	Rather call parent_class::instance_constructed() method before executing
 	the derived class one.
 
+	* src/nact/nact-tree-view.c (instance_constructed):
 	* src/plugin-menu/nautilus-actions.c (instance_constructed):
 	Call parent class on the beginning of the function.
 
diff --git a/src/nact/nact-tree-view.c b/src/nact/nact-tree-view.c
index 717a741..02657df 100644
--- a/src/nact/nact-tree-view.c
+++ b/src/nact/nact-tree-view.c
@@ -572,26 +572,34 @@ static void
 instance_constructed( GObject *object )
 {
 	static const gchar *thisfn = "nact_tree_view_instance_constructed";
-	NactTreeView *self;
+	NactTreeViewPrivate *priv;
 
 	g_return_if_fail( NACT_IS_TREE_VIEW( object ));
-	self = NACT_TREE_VIEW( object );
-
-	if( !self->private->dispose_has_run ){
-		g_debug( "%s: object=%p", thisfn, ( void * ) object );
-
-		base_window_signal_connect( self->private->window,
-				G_OBJECT( self->private->window ), BASE_SIGNAL_INITIALIZE_WINDOW, G_CALLBACK( on_base_initialize_view ));
 
-		base_window_signal_connect( self->private->window,
-				G_OBJECT( self->private->window ), BASE_SIGNAL_ALL_WIDGETS_SHOWED, G_CALLBACK( on_base_all_widgets_showed ));
+	priv = NACT_TREE_VIEW( object )->private;
 
-		g_object_set_data( G_OBJECT( self->private->window ), WINDOW_DATA_TREE_VIEW, self );
+	if( !priv->dispose_has_run ){
 
 		/* 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 ));
+
+		base_window_signal_connect(
+				priv->window,
+				G_OBJECT( priv->window ),
+				BASE_SIGNAL_INITIALIZE_WINDOW,
+				G_CALLBACK( on_base_initialize_view ));
+
+		base_window_signal_connect(
+				priv->window,
+				G_OBJECT( priv->window ),
+				BASE_SIGNAL_ALL_WIDGETS_SHOWED,
+				G_CALLBACK( on_base_all_widgets_showed ));
+
+		g_object_set_data( G_OBJECT( priv->window ), WINDOW_DATA_TREE_VIEW, object );
 	}
 }
 



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