[nautilus-actions] Add missing instance_finalize debug messages



commit 05f82416d23c7e3932e0ab05afdf4427b06bb02e
Author: Pierre Wieser <pwieser trychlos org>
Date:   Sun Jan 16 01:14:28 2011 +0100

    Add missing instance_finalize debug messages

 ChangeLog                              |   19 +++++++++++++++++++
 src/core/na-data-boxed.c               |    6 ++++++
 src/core/na-gconf-monitor.c            |    4 ++++
 src/core/na-io-provider.c              |   10 ++++++----
 src/core/na-tokens.c                   |    9 ++++++---
 src/core/na-updater.c                  |    9 ++++++---
 src/io-desktop/nadp-desktop-file.c     |   10 ++++++++--
 src/io-desktop/nadp-desktop-provider.c |   14 +++++++++++---
 src/io-desktop/nadp-monitor.c          |   14 +++++++++++---
 src/io-gconf/nagp-gconf-provider.c     |   14 +++++++++++---
 src/io-xml/naxml-provider.c            |   14 +++++++++++---
 src/nact/base-application.c            |   11 ++++++++---
 src/nact/base-builder.c                |   19 ++++++++++++-------
 src/nact/base-window.c                 |   12 +++++++++---
 src/nact/nact-application.c            |   12 +++++++++---
 src/nact/nact-clipboard.c              |   22 ++++++++++++++--------
 src/nact/nact-main-window.c            |    8 ++++++--
 src/nact/nact-tree-model.c             |   12 +++++++++---
 src/nact/nact-window.c                 |   12 +++++++++---
 19 files changed, 175 insertions(+), 56 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 698c30f..01c590d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -25,6 +25,25 @@
 
 2011-01-15 Pierre Wieser <pwieser trychlos org>
 
+	* src/core/na-data-boxed.c:
+	* src/core/na-gconf-monitor.c:
+	* src/core/na-io-provider.c:
+	* src/core/na-tokens.c:
+	* src/core/na-updater.c:
+	* src/io-desktop/nadp-desktop-file.c:
+	* src/io-desktop/nadp-desktop-provider.c:
+	* src/io-desktop/nadp-monitor.c:
+	* src/io-gconf/nagp-gconf-provider.c:
+	* src/io-xml/naxml-provider.c:
+	* src/nact/base-application.c:
+	* src/nact/base-builder.c:
+	* src/nact/base-window.c: 
+	* src/nact/nact-application.c:
+	* src/nact/nact-clipboard.c:
+	* src/nact/nact-main-window.c:
+	* src/nact/nact-tree-model.c:
+	* src/nact/nact-window.c: Add instance_finalize debug message.
+
 	* src/core/na-core-utils.c (na_core_utils_slist_dump): Display string length.
 
 	* src/core/na-boxed.c
diff --git a/src/core/na-data-boxed.c b/src/core/na-data-boxed.c
index f7d58a4..16bc0f6 100644
--- a/src/core/na-data-boxed.c
+++ b/src/core/na-data-boxed.c
@@ -359,10 +359,16 @@ instance_dispose( GObject *object )
 static void
 instance_finalize( GObject *object )
 {
+	static const gchar *thisfn = "na_data_boxed_instance_finalize";
 	NADataBoxed *self;
 
 	g_return_if_fail( NA_IS_DATA_BOXED( object ));
 
+	g_debug( "%s: object=%p (%s), name=%s",
+			thisfn,
+			( void * ) object, G_OBJECT_TYPE_NAME( object ),
+			NA_DATA_BOXED( object )->private->def->name );
+
 	self = NA_DATA_BOXED( object );
 
 	DataBoxedFn *fn = get_data_boxed_fn( self->private->def->type );
diff --git a/src/core/na-gconf-monitor.c b/src/core/na-gconf-monitor.c
index bbf5683..be1bdf1 100644
--- a/src/core/na-gconf-monitor.c
+++ b/src/core/na-gconf-monitor.c
@@ -167,9 +167,13 @@ instance_dispose( GObject *object )
 static void
 instance_finalize( GObject *object )
 {
+	static const gchar *thisfn = "na_gconf_monitor_instance_finalize";
 	NAGConfMonitor *self;
 
 	g_return_if_fail( NA_IS_GCONF_MONITOR( object ));
+
+	g_debug( "%s: object=%p (%s)", thisfn, ( void * ) object, G_OBJECT_TYPE_NAME( object ));
+
 	self = NA_GCONF_MONITOR( object );
 
 	g_free( self->private->path );
diff --git a/src/core/na-io-provider.c b/src/core/na-io-provider.c
index f4675b8..a4eeba2 100644
--- a/src/core/na-io-provider.c
+++ b/src/core/na-io-provider.c
@@ -167,11 +167,11 @@ instance_init( GTypeInstance *instance, gpointer klass )
 
 	g_return_if_fail( NA_IS_IO_PROVIDER( instance ));
 
-	self = NA_IO_PROVIDER( instance );
-
 	g_debug( "%s: instance=%p (%s), klass=%p",
 			thisfn, ( void * ) instance, G_OBJECT_TYPE_NAME( instance ), ( void * ) klass );
 
+	self = NA_IO_PROVIDER( instance );
+
 	self->private = g_new0( NAIOProviderPrivate, 1 );
 
 	self->private->dispose_has_run = FALSE;
@@ -249,6 +249,7 @@ instance_dispose( GObject *object )
 	NAIOProvider *self;
 
 	g_return_if_fail( NA_IS_IO_PROVIDER( object ));
+
 	self = NA_IO_PROVIDER( object );
 
 	if( !self->private->dispose_has_run ){
@@ -278,9 +279,10 @@ instance_finalize( GObject *object )
 	NAIOProvider *self;
 
 	g_return_if_fail( NA_IS_IO_PROVIDER( object ));
-	self = NA_IO_PROVIDER( object );
 
-	g_debug( "%s: object=%p", thisfn, ( void * ) object );
+	g_debug( "%s: object=%p (%s)", thisfn, ( void * ) object, G_OBJECT_TYPE_NAME( object ));
+
+	self = NA_IO_PROVIDER( object );
 
 	g_free( self->private->id );
 
diff --git a/src/core/na-tokens.c b/src/core/na-tokens.c
index f666796..1e96866 100644
--- a/src/core/na-tokens.c
+++ b/src/core/na-tokens.c
@@ -141,11 +141,12 @@ instance_init( GTypeInstance *instance, gpointer klass )
 	NATokens *self;
 
 	g_return_if_fail( NA_IS_TOKENS( instance ));
-	self = NA_TOKENS( instance );
 
 	g_debug( "%s: instance=%p (%s), klass=%p",
 			thisfn, ( void * ) instance, G_OBJECT_TYPE_NAME( instance ), ( void * ) klass );
 
+	self = NA_TOKENS( instance );
+
 	self->private = g_new0( NATokensPrivate, 1 );
 
 	self->private->uris = NULL;
@@ -170,6 +171,7 @@ instance_dispose( GObject *object )
 	NATokens *self;
 
 	g_return_if_fail( NA_IS_TOKENS( object ));
+
 	self = NA_TOKENS( object );
 
 	if( !self->private->dispose_has_run ){
@@ -191,9 +193,10 @@ instance_finalize( GObject *object )
 	NATokens *self;
 
 	g_return_if_fail( NA_IS_TOKENS( object ));
-	self = NA_TOKENS( object );
 
-	g_debug( "%s: object=%p", thisfn, ( void * ) object );
+	g_debug( "%s: object=%p (%s)", thisfn, ( void * ) object, G_OBJECT_TYPE_NAME( object ));
+
+	self = NA_TOKENS( object );
 
 	g_free( self->private->scheme );
 	g_free( self->private->username );
diff --git a/src/core/na-updater.c b/src/core/na-updater.c
index d8d4d79..b7ca518 100644
--- a/src/core/na-updater.c
+++ b/src/core/na-updater.c
@@ -119,11 +119,12 @@ instance_init( GTypeInstance *instance, gpointer klass )
 	NAUpdater *self;
 
 	g_return_if_fail( NA_IS_UPDATER( instance ));
-	self = NA_UPDATER( instance );
 
 	g_debug( "%s: instance=%p (%s), klass=%p",
 			thisfn, ( void * ) instance, G_OBJECT_TYPE_NAME( instance ), ( void * ) klass );
 
+	self = NA_UPDATER( instance );
+
 	self->private = g_new0( NAUpdaterPrivate, 1 );
 
 	self->private->dispose_has_run = FALSE;
@@ -136,6 +137,7 @@ instance_dispose( GObject *object )
 	NAUpdater *self;
 
 	g_return_if_fail( NA_IS_UPDATER( object ));
+
 	self = NA_UPDATER( object );
 
 	if( !self->private->dispose_has_run ){
@@ -158,9 +160,10 @@ instance_finalize( GObject *object )
 	NAUpdater *self;
 
 	g_return_if_fail( NA_IS_UPDATER( object ));
-	self = NA_UPDATER( object );
 
-	g_debug( "%s: object=%p", thisfn, ( void * ) object );
+	g_debug( "%s: object=%p (%s)", thisfn, ( void * ) object, G_OBJECT_TYPE_NAME( object ));
+
+	self = NA_UPDATER( object );
 
 	g_free( self->private );
 
diff --git a/src/io-desktop/nadp-desktop-file.c b/src/io-desktop/nadp-desktop-file.c
index 4316896..51e658b 100644
--- a/src/io-desktop/nadp-desktop-file.c
+++ b/src/io-desktop/nadp-desktop-file.c
@@ -147,12 +147,14 @@ instance_dispose( GObject *object )
 	static const gchar *thisfn = "nadp_desktop_file_instance_dispose";
 	NadpDesktopFile *self;
 
-	g_debug( "%s: object=%p (%s)", thisfn, ( void * ) object, G_OBJECT_TYPE_NAME( object ));
 	g_return_if_fail( NADP_IS_DESKTOP_FILE( object ));
+
 	self = NADP_DESKTOP_FILE( object );
 
 	if( !self->private->dispose_has_run ){
 
+		g_debug( "%s: object=%p (%s)", thisfn, ( void * ) object, G_OBJECT_TYPE_NAME( object ));
+
 		self->private->dispose_has_run = TRUE;
 
 		/* chain up to the parent class */
@@ -165,9 +167,13 @@ instance_dispose( GObject *object )
 static void
 instance_finalize( GObject *object )
 {
+	static const gchar *thisfn = "nadp_desktop_file_instance_finalize";
 	NadpDesktopFile *self;
 
-	g_assert( NADP_IS_DESKTOP_FILE( object ));
+	g_return_if_fail( NADP_IS_DESKTOP_FILE( object ));
+
+	g_debug( "%s: object=%p (%s)", thisfn, ( void * ) object, G_OBJECT_TYPE_NAME( object ));
+
 	self = NADP_DESKTOP_FILE( object );
 
 	g_free( self->private->id );
diff --git a/src/io-desktop/nadp-desktop-provider.c b/src/io-desktop/nadp-desktop-provider.c
index b680d19..f5444ad 100644
--- a/src/io-desktop/nadp-desktop-provider.c
+++ b/src/io-desktop/nadp-desktop-provider.c
@@ -163,9 +163,11 @@ instance_init( GTypeInstance *instance, gpointer klass )
 	static const gchar *thisfn = "nadp_desktop_provider_instance_init";
 	NadpDesktopProvider *self;
 
+	g_return_if_fail( NADP_IS_DESKTOP_PROVIDER( instance ));
+
 	g_debug( "%s: instance=%p (%s), klass=%p",
 			thisfn, ( void * ) instance, G_OBJECT_TYPE_NAME( instance ), ( void * ) klass );
-	g_return_if_fail( NADP_IS_DESKTOP_PROVIDER( instance ));
+
 	self = NADP_DESKTOP_PROVIDER( instance );
 
 	self->private = g_new0( NadpDesktopProviderPrivate, 1 );
@@ -180,12 +182,14 @@ instance_dispose( GObject *object )
 	static const gchar *thisfn = "nadp_desktop_provider_instance_dispose";
 	NadpDesktopProvider *self;
 
-	g_debug( "%s: object=%p (%s)", thisfn, ( void * ) object, G_OBJECT_TYPE_NAME( object ));
 	g_return_if_fail( NADP_IS_DESKTOP_PROVIDER( object ));
+
 	self = NADP_DESKTOP_PROVIDER( object );
 
 	if( !self->private->dispose_has_run ){
 
+		g_debug( "%s: object=%p (%s)", thisfn, ( void * ) object, G_OBJECT_TYPE_NAME( object ));
+
 		self->private->dispose_has_run = TRUE;
 
 		nadp_desktop_provider_release_monitors( self );
@@ -200,9 +204,13 @@ instance_dispose( GObject *object )
 static void
 instance_finalize( GObject *object )
 {
+	static const gchar *thisfn = "nadp_desktop_provider_instance_finalize";
 	NadpDesktopProvider *self;
 
-	g_assert( NADP_IS_DESKTOP_PROVIDER( object ));
+	g_return_if_fail( NADP_IS_DESKTOP_PROVIDER( object ));
+
+	g_debug( "%s: object=%p (%s)", thisfn, ( void * ) object, G_OBJECT_TYPE_NAME( object ));
+
 	self = NADP_DESKTOP_PROVIDER( object );
 
 	g_free( self->private );
diff --git a/src/io-desktop/nadp-monitor.c b/src/io-desktop/nadp-monitor.c
index bc28f8d..4924426 100644
--- a/src/io-desktop/nadp-monitor.c
+++ b/src/io-desktop/nadp-monitor.c
@@ -123,9 +123,11 @@ instance_init( GTypeInstance *instance, gpointer klass )
 	static const gchar *thisfn = "nadp_monitor_instance_init";
 	NadpMonitor *self;
 
+	g_return_if_fail( NADP_IS_MONITOR( instance ));
+
 	g_debug( "%s: instance=%p (%s), klass=%p",
 			thisfn, ( void * ) instance, G_OBJECT_TYPE_NAME( instance ), ( void * ) klass );
-	g_return_if_fail( NADP_IS_MONITOR( instance ));
+
 	self = NADP_MONITOR( instance );
 
 	self->private = g_new0( NadpMonitorPrivate, 1 );
@@ -139,12 +141,14 @@ instance_dispose( GObject *object )
 	static const gchar *thisfn = "nadp_monitor_instance_dispose";
 	NadpMonitor *self;
 
-	g_debug( "%s: object=%p (%s)", thisfn, ( void * ) object, G_OBJECT_TYPE_NAME( object ));
 	g_return_if_fail( NADP_IS_MONITOR( object ));
+
 	self = NADP_MONITOR( object );
 
 	if( !self->private->dispose_has_run ){
 
+		g_debug( "%s: object=%p (%s)", thisfn, ( void * ) object, G_OBJECT_TYPE_NAME( object ));
+
 		if( self->private->handler ){
 			g_signal_handler_disconnect( self->private->monitor, self->private->handler );
 		}
@@ -169,9 +173,13 @@ instance_dispose( GObject *object )
 static void
 instance_finalize( GObject *object )
 {
+	static const gchar *thisfn = "nadp_monitor_instance_finalize";
 	NadpMonitor *self;
 
-	g_assert( NADP_IS_MONITOR( object ));
+	g_return_if_fail( NADP_IS_MONITOR( object ));
+
+	g_debug( "%s: object=%p (%s)", thisfn, ( void * ) object, G_OBJECT_TYPE_NAME( object ));
+
 	self = NADP_MONITOR( object );
 
 	g_free( self->private->name );
diff --git a/src/io-gconf/nagp-gconf-provider.c b/src/io-gconf/nagp-gconf-provider.c
index 8cb80a7..4b174c9 100644
--- a/src/io-gconf/nagp-gconf-provider.c
+++ b/src/io-gconf/nagp-gconf-provider.c
@@ -139,9 +139,11 @@ instance_init( GTypeInstance *instance, gpointer klass )
 	static const gchar *thisfn = "nagp_gconf_provider_instance_init";
 	NagpGConfProvider *self;
 
+	g_return_if_fail( NAGP_IS_GCONF_PROVIDER( instance ));
+
 	g_debug( "%s: instance=%p (%s), klass=%p",
 			thisfn, ( void * ) instance, G_OBJECT_TYPE_NAME( instance ), ( void * ) klass );
-	g_return_if_fail( NAGP_IS_GCONF_PROVIDER( instance ));
+
 	self = NAGP_GCONF_PROVIDER( instance );
 
 	self->private = g_new0( NagpGConfProviderPrivate, 1 );
@@ -158,12 +160,14 @@ instance_dispose( GObject *object )
 	static const gchar *thisfn = "nagp_gconf_provider_instance_dispose";
 	NagpGConfProvider *self;
 
-	g_debug( "%s: object=%p (%s)", thisfn, ( void * ) object, G_OBJECT_TYPE_NAME( object ));
 	g_return_if_fail( NAGP_IS_GCONF_PROVIDER( object ));
+
 	self = NAGP_GCONF_PROVIDER( object );
 
 	if( !self->private->dispose_has_run ){
 
+		g_debug( "%s: object=%p (%s)", thisfn, ( void * ) object, G_OBJECT_TYPE_NAME( object ));
+
 		self->private->dispose_has_run = TRUE;
 
 		/* release the GConf monitoring */
@@ -182,9 +186,13 @@ instance_dispose( GObject *object )
 static void
 instance_finalize( GObject *object )
 {
+	static const gchar *thisfn =" nagp_gconf_provider_instance_finalize";
 	NagpGConfProvider *self;
 
-	g_assert( NAGP_IS_GCONF_PROVIDER( object ));
+	g_return_if_fail( NAGP_IS_GCONF_PROVIDER( object ));
+
+	g_debug( "%s: object=%p (%s)", thisfn, ( void * ) object, G_OBJECT_TYPE_NAME( object ));
+
 	self = NAGP_GCONF_PROVIDER( object );
 
 	g_free( self->private );
diff --git a/src/io-xml/naxml-provider.c b/src/io-xml/naxml-provider.c
index b85b51b..6a6c7ac 100644
--- a/src/io-xml/naxml-provider.c
+++ b/src/io-xml/naxml-provider.c
@@ -148,9 +148,11 @@ instance_init( GTypeInstance *instance, gpointer klass )
 	static const gchar *thisfn = "naxml_provider_instance_init";
 	NAXMLProvider *self;
 
+	g_return_if_fail( NA_IS_XML_PROVIDER( instance ));
+
 	g_debug( "%s: instance=%p (%s), klass=%p",
 			thisfn, ( void * ) instance, G_OBJECT_TYPE_NAME( instance ), ( void * ) klass );
-	g_return_if_fail( NA_IS_XML_PROVIDER( instance ));
+
 	self = NAXML_PROVIDER( instance );
 
 	self->private = g_new0( NAXMLProviderPrivate, 1 );
@@ -164,12 +166,14 @@ instance_dispose( GObject *object )
 	static const gchar *thisfn = "naxml_provider_instance_dispose";
 	NAXMLProvider *self;
 
-	g_debug( "%s: object=%p (%s)", thisfn, ( void * ) object, G_OBJECT_TYPE_NAME( object ));
 	g_return_if_fail( NA_IS_XML_PROVIDER( object ));
+
 	self = NAXML_PROVIDER( object );
 
 	if( !self->private->dispose_has_run ){
 
+		g_debug( "%s: object=%p (%s)", thisfn, ( void * ) object, G_OBJECT_TYPE_NAME( object ));
+
 		self->private->dispose_has_run = TRUE;
 
 		/* chain up to the parent class */
@@ -182,9 +186,13 @@ instance_dispose( GObject *object )
 static void
 instance_finalize( GObject *object )
 {
+	static const gchar *thisfn = "naxml_provider_instance_finalize";
 	NAXMLProvider *self;
 
-	g_assert( NA_IS_XML_PROVIDER( object ));
+	g_return_if_fail( NA_IS_XML_PROVIDER( object ));
+
+	g_debug( "%s: object=%p (%s)", thisfn, ( void * ) object, G_OBJECT_TYPE_NAME( object ));
+
 	self = NAXML_PROVIDER( object );
 
 	g_free( self->private );
diff --git a/src/nact/base-application.c b/src/nact/base-application.c
index 93c62be..3c771ba 100644
--- a/src/nact/base-application.c
+++ b/src/nact/base-application.c
@@ -280,10 +280,11 @@ instance_init( GTypeInstance *application, gpointer klass )
 	static const gchar *thisfn = "base_application_instance_init";
 	BaseApplication *self;
 
+	g_return_if_fail( BASE_IS_APPLICATION( application ));
+
 	g_debug( "%s: application=%p (%s), klass=%p",
 			thisfn, ( void * ) application, G_OBJECT_TYPE_NAME( application ), ( void * ) klass );
 
-	g_return_if_fail( BASE_IS_APPLICATION( application ));
 	self = BASE_APPLICATION( application );
 
 	self->private = g_new0( BaseApplicationPrivate, 1 );
@@ -416,12 +417,14 @@ instance_dispose( GObject *application )
 	static const gchar *thisfn = "base_application_instance_dispose";
 	BaseApplication *self;
 
-	g_debug( "%s: application=%p (%s)", thisfn, ( void * ) application, G_OBJECT_TYPE_NAME( application ));
 	g_return_if_fail( BASE_IS_APPLICATION( application ));
+
 	self = BASE_APPLICATION( application );
 
 	if( !self->private->dispose_has_run ){
 
+		g_debug( "%s: application=%p (%s)", thisfn, ( void * ) application, G_OBJECT_TYPE_NAME( application ));
+
 		self->private->dispose_has_run = TRUE;
 
 		if( UNIQUE_IS_APP( self->private->unique_app_handle )){
@@ -449,8 +452,10 @@ instance_finalize( GObject *application )
 	static const gchar *thisfn = "base_application_instance_finalize";
 	BaseApplication *self;
 
-	g_debug( "%s: application=%p", thisfn, ( void * ) application );
 	g_return_if_fail( BASE_IS_APPLICATION( application ));
+
+	g_debug( "%s: application=%p (%s)", thisfn, ( void * ) application, G_OBJECT_TYPE_NAME( application ));
+
 	self = BASE_APPLICATION( application );
 
 	g_free( self->private->exit_message1 );
diff --git a/src/nact/base-builder.c b/src/nact/base-builder.c
index 3953243..f1dcdae 100644
--- a/src/nact/base-builder.c
+++ b/src/nact/base-builder.c
@@ -119,10 +119,11 @@ instance_init( GTypeInstance *instance, gpointer klass )
 	static const gchar *thisfn = "base_builder_instance_init";
 	BaseBuilder *self;
 
+	g_return_if_fail( BASE_IS_BUILDER( instance ));
+
 	g_debug( "%s: instance=%p (%s), klass=%p",
 			thisfn, ( void * ) instance, G_OBJECT_TYPE_NAME( instance ), ( void * ) klass );
 
-	g_return_if_fail( BASE_IS_BUILDER( instance ));
 	self = BASE_BUILDER( instance );
 
 	self->private = g_new0( BaseBuilderPrivate, 1 );
@@ -136,12 +137,14 @@ instance_dispose( GObject *instance )
 	static const gchar *thisfn = "base_builder_instance_dispose";
 	BaseBuilder *self;
 
-	g_debug( "%s: instance=%p (%s)", thisfn, ( void * ) instance, G_OBJECT_TYPE_NAME( instance ));
 	g_return_if_fail( BASE_IS_BUILDER( instance ));
+
 	self = BASE_BUILDER( instance );
 
 	if( !self->private->dispose_has_run ){
 
+		g_debug( "%s: instance=%p (%s)", thisfn, ( void * ) instance, G_OBJECT_TYPE_NAME( instance ));
+
 		self->private->dispose_has_run = TRUE;
 
 		/* chain up to the parent class */
@@ -152,14 +155,16 @@ instance_dispose( GObject *instance )
 }
 
 static void
-instance_finalize( GObject *window )
+instance_finalize( GObject *instance )
 {
 	static const gchar *thisfn = "base_builder_instance_finalize";
 	BaseBuilder *self;
 
-	g_debug( "%s: window=%p", thisfn, ( void * ) window );
-	g_return_if_fail( BASE_IS_BUILDER( window ));
-	self = BASE_BUILDER( window );
+	g_return_if_fail( BASE_IS_BUILDER( instance ));
+
+	g_debug( "%s: instance=%p (%s)", thisfn, ( void * ) instance, G_OBJECT_TYPE_NAME( instance ));
+
+	self = BASE_BUILDER( instance );
 
 	na_core_utils_slist_free( self->private->fnames );
 
@@ -167,7 +172,7 @@ instance_finalize( GObject *window )
 
 	/* chain call to parent class */
 	if( G_OBJECT_CLASS( st_parent_class )->finalize ){
-		G_OBJECT_CLASS( st_parent_class )->finalize( window );
+		G_OBJECT_CLASS( st_parent_class )->finalize( instance );
 	}
 }
 
diff --git a/src/nact/base-window.c b/src/nact/base-window.c
index 43a58f2..e5a4283 100644
--- a/src/nact/base-window.c
+++ b/src/nact/base-window.c
@@ -344,9 +344,11 @@ instance_init( GTypeInstance *instance, gpointer klass )
 	static const gchar *thisfn = "base_window_instance_init";
 	BaseWindow *self;
 
+	g_return_if_fail( BASE_IS_WINDOW( instance ));
+
 	g_debug( "%s: instance=%p (%s), klass=%p",
 			thisfn, ( void * ) instance, G_OBJECT_TYPE_NAME( instance ), ( void * ) klass );
-	g_return_if_fail( BASE_IS_WINDOW( instance ));
+
 	self = BASE_WINDOW( instance );
 
 	self->private = g_new0( BaseWindowPrivate, 1 );
@@ -471,12 +473,14 @@ instance_dispose( GObject *window )
 	BaseWindow *self;
 	GSList *is;
 
-	g_debug( "%s: window=%p (%s)", thisfn, ( void * ) window, G_OBJECT_TYPE_NAME( window ));
 	g_return_if_fail( BASE_IS_WINDOW( window ));
+
 	self = BASE_WINDOW( window );
 
 	if( !self->private->dispose_has_run ){
 
+		g_debug( "%s: window=%p (%s)", thisfn, ( void * ) window, G_OBJECT_TYPE_NAME( window ));
+
 		if( self->private->save_window_position ){
 			base_iprefs_save_window_position( self );
 		}
@@ -539,8 +543,10 @@ instance_finalize( GObject *window )
 	static const gchar *thisfn = "base_window_instance_finalize";
 	BaseWindow *self;
 
-	g_debug( "%s: window=%p", thisfn, ( void * ) window );
 	g_return_if_fail( BASE_IS_WINDOW( window ));
+
+	g_debug( "%s: window=%p (%s)", thisfn, ( void * ) window, G_OBJECT_TYPE_NAME( window ));
+
 	self = BASE_WINDOW( window );
 
 	g_free( self->private->toplevel_name );
diff --git a/src/nact/nact-application.c b/src/nact/nact-application.c
index 9e62ac0..e530152 100644
--- a/src/nact/nact-application.c
+++ b/src/nact/nact-application.c
@@ -175,9 +175,11 @@ instance_init( GTypeInstance *application, gpointer klass )
 	static const gchar *thisfn = "nact_application_instance_init";
 	NactApplication *self;
 
+	g_return_if_fail( NACT_IS_APPLICATION( application ));
+
 	g_debug( "%s: application=%p (%s), klass=%p",
 			thisfn, ( void * ) application, G_OBJECT_TYPE_NAME( application ), ( void * ) klass );
-	g_assert( NACT_IS_APPLICATION( application ));
+
 	self = NACT_APPLICATION( application );
 
 	self->private = g_new0( NactApplicationPrivate, 1 );
@@ -235,12 +237,14 @@ instance_dispose( GObject *application )
 	static const gchar *thisfn = "nact_application_instance_dispose";
 	NactApplication *self;
 
-	g_debug( "%s: application=%p (%s)", thisfn, ( void * ) application, G_OBJECT_TYPE_NAME( application ));
 	g_return_if_fail( NACT_IS_APPLICATION( application ));
+
 	self = NACT_APPLICATION( application );
 
 	if( !self->private->dispose_has_run ){
 
+		g_debug( "%s: application=%p (%s)", thisfn, ( void * ) application, G_OBJECT_TYPE_NAME( application ));
+
 		self->private->dispose_has_run = TRUE;
 
 		if( self->private->updater ){
@@ -260,8 +264,10 @@ instance_finalize( GObject *application )
 	static const gchar *thisfn = "nact_application_instance_finalize";
 	NactApplication *self;
 
-	g_debug( "%s: application=%p", thisfn, ( void * ) application );
 	g_return_if_fail( NACT_IS_APPLICATION( application ));
+
+	g_debug( "%s: application=%p (%s)", thisfn, ( void * ) application, G_OBJECT_TYPE_NAME( application ));
+
 	self = NACT_APPLICATION( application );
 
 	g_free( self->private );
diff --git a/src/nact/nact-clipboard.c b/src/nact/nact-clipboard.c
index fc7eda4..0eb2972 100644
--- a/src/nact/nact-clipboard.c
+++ b/src/nact/nact-clipboard.c
@@ -185,9 +185,11 @@ instance_init( GTypeInstance *instance, gpointer klass )
 	NactClipboard *self;
 	GdkDisplay *display;
 
+	g_return_if_fail( NACT_IS_CLIPBOARD( instance ));
+
 	g_debug( "%s: instance=%p (%s), klass=%p",
 			thisfn, ( void * ) instance, G_OBJECT_TYPE_NAME( instance ), ( void * ) klass );
-	g_assert( NACT_IS_CLIPBOARD( instance ));
+
 	self = NACT_CLIPBOARD( instance );
 
 	self->private = g_new0( NactClipboardPrivate, 1 );
@@ -206,12 +208,14 @@ instance_dispose( GObject *object )
 	static const gchar *thisfn = "nact_clipboard_instance_dispose";
 	NactClipboard *self;
 
-	g_debug( "%s: object=%p (%s)", thisfn, ( void * ) object, G_OBJECT_TYPE_NAME( object ));
-	g_assert( NACT_IS_CLIPBOARD( object ));
+	g_return_if_fail( NACT_IS_CLIPBOARD( object ));
+
 	self = NACT_CLIPBOARD( object );
 
 	if( !self->private->dispose_has_run ){
 
+		g_debug( "%s: object=%p (%s)", thisfn, ( void * ) object, G_OBJECT_TYPE_NAME( object ));
+
 		self->private->dispose_has_run = TRUE;
 
 		gtk_clipboard_clear( self->private->dnd );
@@ -225,14 +229,16 @@ instance_dispose( GObject *object )
 }
 
 static void
-instance_finalize( GObject *window )
+instance_finalize( GObject *instance )
 {
 	static const gchar *thisfn = "nact_clipboard_instance_finalize";
 	NactClipboard *self;
 
-	g_debug( "%s: window=%p", thisfn, ( void * ) window );
-	g_assert( NACT_IS_CLIPBOARD( window ));
-	self = NACT_CLIPBOARD( window );
+	g_return_if_fail( NACT_IS_CLIPBOARD( instance ));
+
+	g_debug( "%s: instance=%p (%s)", thisfn, ( void * ) instance, G_OBJECT_TYPE_NAME( instance ));
+
+	self = NACT_CLIPBOARD( instance );
 
 	if( self->private->primary_data ){
 		clear_primary_clipboard( self );
@@ -243,7 +249,7 @@ instance_finalize( GObject *window )
 
 	/* chain call to parent class */
 	if( G_OBJECT_CLASS( st_parent_class )->finalize ){
-		G_OBJECT_CLASS( st_parent_class )->finalize( window );
+		G_OBJECT_CLASS( st_parent_class )->finalize( instance );
 	}
 }
 
diff --git a/src/nact/nact-main-window.c b/src/nact/nact-main-window.c
index c687643..876df5c 100644
--- a/src/nact/nact-main-window.c
+++ b/src/nact/nact-main-window.c
@@ -635,9 +635,11 @@ instance_init( GTypeInstance *instance, gpointer klass )
 	static const gchar *thisfn = "nact_main_window_instance_init";
 	NactMainWindow *self;
 
+	g_return_if_fail( NACT_IS_MAIN_WINDOW( instance ));
+
 	g_debug( "%s: instance=%p (%s), klass=%p",
 			thisfn, ( void * ) instance, G_OBJECT_TYPE_NAME( instance ), ( void * ) klass );
-	g_return_if_fail( NACT_IS_MAIN_WINDOW( instance ));
+
 	self = NACT_MAIN_WINDOW( instance );
 
 	self->private = g_new0( NactMainWindowPrivate, 1 );
@@ -803,8 +805,10 @@ instance_finalize( GObject *window )
 	static const gchar *thisfn = "nact_main_window_instance_finalize";
 	NactMainWindow *self;
 
-	g_debug( "%s: window=%p", thisfn, ( void * ) window );
 	g_return_if_fail( NACT_IS_MAIN_WINDOW( window ));
+
+	g_debug( "%s: window=%p (%s)", thisfn, ( void * ) window, G_OBJECT_TYPE_NAME( window ));
+
 	self = NACT_MAIN_WINDOW( window );
 
 	g_free( self->private );
diff --git a/src/nact/nact-tree-model.c b/src/nact/nact-tree-model.c
index e817530..9e67f49 100644
--- a/src/nact/nact-tree-model.c
+++ b/src/nact/nact-tree-model.c
@@ -216,9 +216,11 @@ instance_init( GTypeInstance *instance, gpointer klass )
 	static const gchar *thisfn = "nact_tree_model_instance_init";
 	NactTreeModel *self;
 
+	g_return_if_fail( NACT_IS_TREE_MODEL( instance ));
+
 	g_debug( "%s: instance=%p (%s), klass=%p",
 			thisfn, ( void * ) instance, G_OBJECT_TYPE_NAME( instance ), ( void * ) klass );
-	g_return_if_fail( NACT_IS_TREE_MODEL( instance ));
+
 	self = NACT_TREE_MODEL( instance );
 
 	self->private = g_new0( NactTreeModelPrivate, 1 );
@@ -232,8 +234,10 @@ instance_dispose( GObject *object )
 	static const gchar *thisfn = "nact_tree_model_instance_dispose";
 	NactTreeModel *self;
 
-	g_debug( "%s: object=%p (%s)", thisfn, ( void * ) object, G_OBJECT_TYPE_NAME( object ));
 	g_return_if_fail( NACT_IS_TREE_MODEL( object ));
+
+	g_debug( "%s: object=%p (%s)", thisfn, ( void * ) object, G_OBJECT_TYPE_NAME( object ));
+
 	self = NACT_TREE_MODEL( object );
 
 	if( !self->private->dispose_has_run ){
@@ -255,8 +259,10 @@ instance_finalize( GObject *object )
 	static const gchar *thisfn = "nact_tree_model_instance_finalize";
 	NactTreeModel *self;
 
-	g_debug( "%s: object=%p", thisfn, ( void * ) object );
 	g_return_if_fail( NACT_IS_TREE_MODEL( object ));
+
+	g_debug( "%s: object=%p (%s)", thisfn, ( void * ) object, G_OBJECT_TYPE_NAME( object ));
+
 	self = NACT_TREE_MODEL( object );
 
 	g_free( self->private );
diff --git a/src/nact/nact-window.c b/src/nact/nact-window.c
index f3b89c1..503b419 100644
--- a/src/nact/nact-window.c
+++ b/src/nact/nact-window.c
@@ -125,9 +125,11 @@ instance_init( GTypeInstance *instance, gpointer klass )
 	static const gchar *thisfn = "nact_window_instance_init";
 	NactWindow *self;
 
+	g_return_if_fail( NACT_IS_WINDOW( instance ));
+
 	g_debug( "%s: instance=%p (%s), klass=%p",
 			thisfn, ( void * ) instance, G_OBJECT_TYPE_NAME( instance ), ( void * ) klass );
-	g_return_if_fail( NACT_IS_WINDOW( instance ));
+
 	self = NACT_WINDOW( instance );
 
 	self->private = g_new0( NactWindowPrivate, 1 );
@@ -141,12 +143,14 @@ instance_dispose( GObject *window )
 	static const gchar *thisfn = "nact_window_instance_dispose";
 	NactWindow *self;
 
-	g_debug( "%s: window=%p (%s)", thisfn, ( void * ) window, G_OBJECT_TYPE_NAME( window ));
 	g_return_if_fail( NACT_IS_WINDOW( window ));
+
 	self = NACT_WINDOW( window );
 
 	if( !self->private->dispose_has_run ){
 
+		g_debug( "%s: window=%p (%s)", thisfn, ( void * ) window, G_OBJECT_TYPE_NAME( window ));
+
 		self->private->dispose_has_run = TRUE;
 
 		/* chain up to the parent class */
@@ -162,8 +166,10 @@ instance_finalize( GObject *window )
 	static const gchar *thisfn = "nact_window_instance_finalize";
 	NactWindow *self;
 
-	g_debug( "%s: window=%p", thisfn, ( void * ) window );
 	g_return_if_fail( NACT_IS_WINDOW( window ));
+
+	g_debug( "%s: window=%p (%s)", thisfn, ( void * ) window, G_OBJECT_TYPE_NAME( window ));
+
 	self = NACT_WINDOW( window );
 
 	g_free( self->private );



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