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



commit 3d450edad50a7b6b2aa9d588603873f31e529185
Author: Pierre Wieser <pwieser trychlos org>
Date:   Sun Jan 8 12:46:23 2012 +0100

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

 ChangeLog                        |    1 +
 src/nact/nact-assistant-export.c |   17 +++++++++--------
 2 files changed, 10 insertions(+), 8 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 66f2b04..bfe6ea0 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-assistant-export.c (instance_constructed):
 	* src/nact/nact-main-window.c (instance_constructed):
 	* src/nact/nact-tree-view.c (instance_constructed):
 	* src/plugin-menu/nautilus-actions.c (instance_constructed):
diff --git a/src/nact/nact-assistant-export.c b/src/nact/nact-assistant-export.c
index 8b3eebd..1c526df 100644
--- a/src/nact/nact-assistant-export.c
+++ b/src/nact/nact-assistant-export.c
@@ -257,13 +257,19 @@ static void
 instance_constructed( GObject *window )
 {
 	static const gchar *thisfn = "nact_assistant_export_instance_constructed";
-	NactAssistantExport *self;
+	NactAssistantExportPrivate *priv;
 
 	g_return_if_fail( NACT_IS_ASSISTANT_EXPORT( window ));
 
-	self = NACT_ASSISTANT_EXPORT( window );
+	priv = NACT_ASSISTANT_EXPORT( window )->private;
+
+	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( window );
+		}
 
-	if( !self->private->dispose_has_run ){
 		g_debug( "%s: window=%p (%s)", thisfn, ( void * ) window, G_OBJECT_TYPE_NAME( window ));
 
 		base_window_signal_connect(
@@ -283,11 +289,6 @@ instance_constructed( GObject *window )
 				G_OBJECT( window ),
 				BASE_SIGNAL_ALL_WIDGETS_SHOWED,
 				G_CALLBACK( on_base_all_widgets_showed ));
-
-		/* chain up to the parent class */
-		if( G_OBJECT_CLASS( st_parent_class )->constructed ){
-			G_OBJECT_CLASS( st_parent_class )->constructed( window );
-		}
 	}
 }
 



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