[nautilus-actions] Review debug messages in core library
- From: Pierre Wieser <pwieser src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus-actions] Review debug messages in core library
- Date: Sat, 3 Jul 2010 07:56:56 +0000 (UTC)
commit df773d3c3924c6d064b355f487ba7aa75763202d
Author: Pierre Wieser <pwieser trychlos org>
Date: Mon Jun 28 06:04:04 2010 +0200
Review debug messages in core library
src/core/na-data-boxed.c | 16 ++++++-----
src/core/na-export-format.c | 10 +++++--
src/core/na-exporter.c | 32 ++++++++++++----------
src/core/na-factory-object.c | 6 ++--
src/core/na-gconf-monitor.c | 10 +++++--
src/core/na-iduplicable.c | 12 +++++---
src/core/na-ifactory-provider.c | 9 ++----
src/core/na-importer-ask.c | 11 +++++---
src/core/na-importer.c | 8 +++---
src/core/na-io-provider.c | 16 ++++++++---
src/core/na-ipivot-consumer.c | 11 ++++---
src/core/na-module.c | 17 ++++++++----
src/core/na-object-action.c | 14 +++++-----
src/core/na-object-id.c | 16 +++++-----
src/core/na-object-item.c | 10 +++---
src/core/na-object-menu.c | 14 +++++-----
src/core/na-object-profile.c | 14 +++++-----
src/core/na-object.c | 39 ++++++++++-----------------
src/core/na-pivot.c | 55 ++++++++++++++++++++++++---------------
src/core/na-selected-info.c | 11 +++++---
src/core/na-tokens.c | 11 +++++---
src/core/na-updater.c | 19 ++++++++-----
22 files changed, 200 insertions(+), 161 deletions(-)
---
diff --git a/src/core/na-data-boxed.c b/src/core/na-data-boxed.c
index 44b34ef..814d621 100644
--- a/src/core/na-data-boxed.c
+++ b/src/core/na-data-boxed.c
@@ -317,11 +317,11 @@ instance_init( GTypeInstance *instance, gpointer klass )
static const gchar *thisfn = "na_data_boxed_instance_init";
NADataBoxed *self;
+ g_return_if_fail( NA_IS_DATA_BOXED( 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_DATA_BOXED( instance ));
-
self = NA_DATA_BOXED( instance );
self->private = g_new0( NADataBoxedPrivate, 1 );
@@ -335,17 +335,17 @@ instance_dispose( GObject *object )
static const gchar *thisfn = "na_data_boxed_instance_dispose";
NADataBoxed *self;
- g_debug( "%s: object=%p (%s), name=%s",
- thisfn,
- ( void * ) object, G_OBJECT_TYPE_NAME( object ),
- NA_DATA_BOXED( object )->private->def->name );
-
g_return_if_fail( NA_IS_DATA_BOXED( object ));
self = NA_DATA_BOXED( object );
if( !self->private->dispose_has_run ){
+ g_debug( "%s: object=%p (%s), name=%s",
+ thisfn,
+ ( void * ) object, G_OBJECT_TYPE_NAME( object ),
+ NA_DATA_BOXED( object )->private->def->name );
+
self->private->dispose_has_run = TRUE;
/* chain up to the parent class */
@@ -411,6 +411,8 @@ na_data_boxed_get_param_spec( const NADataDef *def )
GParamSpec *spec;
DataBoxedFn *fn;
+ g_return_val_if_fail( def != NULL, NULL );
+
spec = NULL;
fn = get_data_boxed_fn( def->type );
diff --git a/src/core/na-export-format.c b/src/core/na-export-format.c
index 73d1a2e..e932c39 100644
--- a/src/core/na-export-format.c
+++ b/src/core/na-export-format.c
@@ -117,9 +117,10 @@ instance_init( GTypeInstance *instance, gpointer klass )
static const gchar *thisfn = "na_export_format_instance_init";
NAExportFormat *self;
+ g_return_if_fail( NA_IS_EXPORT_FORMAT( 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_EXPORT_FORMAT( instance ));
self = NA_EXPORT_FORMAT( instance );
self->private = g_new0( NAExportFormatPrivate, 1 );
@@ -133,12 +134,14 @@ instance_dispose( GObject *object )
static const gchar *thisfn = "na_export_format_instance_dispose";
NAExportFormat *self;
- g_debug( "%s: object=%p (%s)", thisfn, ( void * ) object, G_OBJECT_TYPE_NAME( object ));
g_return_if_fail( NA_IS_EXPORT_FORMAT( object ));
+
self = NA_EXPORT_FORMAT( 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 */
@@ -154,8 +157,9 @@ instance_finalize( GObject *object )
static const gchar *thisfn = "na_export_format_instance_finalize";
NAExportFormat *self;
- g_debug( "%s: object=%p", thisfn, ( void * ) object );
g_return_if_fail( NA_IS_EXPORT_FORMAT( object ));
+
+ g_debug( "%s: object=%p", thisfn, ( void * ) object );
self = NA_EXPORT_FORMAT( object );
g_free( self->private );
diff --git a/src/core/na-exporter.c b/src/core/na-exporter.c
index 99598f8..4f4eb93 100644
--- a/src/core/na-exporter.c
+++ b/src/core/na-exporter.c
@@ -62,6 +62,8 @@ na_exporter_get_formats( const NAPivot *pivot )
const NAIExporterFormat *str;
NAExportFormat *format;
+ g_return_val_if_fail( NA_IS_PIVOT( pivot ), NULL );
+
formats = NULL;
if( iexporter_initialized && !iexporter_finalized ){
@@ -124,17 +126,17 @@ na_exporter_to_buffer( const NAPivot *pivot, const NAObjectItem *item, GQuark fo
g_return_val_if_fail( NA_IS_PIVOT( pivot ), NULL );
g_return_val_if_fail( NA_IS_OBJECT_ITEM( item ), NULL );
- g_debug( "%s: pivot=%p, item=%p (%s), format=%u (%s), messages=%p",
- thisfn,
- ( void * ) pivot,
- ( void * ) item, G_OBJECT_TYPE_NAME( item ),
- ( guint ) format, g_quark_to_string( format ),
- ( void * ) messages );
-
buffer = NULL;
if( iexporter_initialized && !iexporter_finalized ){
+ g_debug( "%s: pivot=%p, item=%p (%s), format=%u (%s), messages=%p",
+ thisfn,
+ ( void * ) pivot,
+ ( void * ) item, G_OBJECT_TYPE_NAME( item ),
+ ( guint ) format, g_quark_to_string( format ),
+ ( void * ) messages );
+
exporter = find_exporter_for_format( pivot, format );
g_debug( "%s: exporter=%p (%s)", thisfn, ( void * ) exporter, G_OBJECT_TYPE_NAME( exporter ));
@@ -196,18 +198,18 @@ na_exporter_to_file( const NAPivot *pivot, const NAObjectItem *item, const gchar
g_return_val_if_fail( NA_IS_PIVOT( pivot ), NULL );
g_return_val_if_fail( NA_IS_OBJECT_ITEM( item ), NULL );
- g_debug( "%s: pivot=%p, item=%p (%s), folder=%s, format=%u (%s), messages=%p",
- thisfn,
- ( void * ) pivot,
- ( void * ) item, G_OBJECT_TYPE_NAME( item ),
- folder,
- ( guint ) format, g_quark_to_string( format ),
- ( void * ) messages );
-
export_uri = NULL;
if( iexporter_initialized && !iexporter_finalized ){
+ g_debug( "%s: pivot=%p, item=%p (%s), folder=%s, format=%u (%s), messages=%p",
+ thisfn,
+ ( void * ) pivot,
+ ( void * ) item, G_OBJECT_TYPE_NAME( item ),
+ folder,
+ ( guint ) format, g_quark_to_string( format ),
+ ( void * ) messages );
+
exporter = find_exporter_for_format( pivot, format );
if( exporter ){
diff --git a/src/core/na-factory-object.c b/src/core/na-factory-object.c
index 2540b6d..0f97b33 100644
--- a/src/core/na-factory-object.c
+++ b/src/core/na-factory-object.c
@@ -607,10 +607,10 @@ na_factory_object_read_item( NAIFactoryObject *serializable, const NAIFactoryPro
{
static const gchar *thisfn = "na_factory_object_read_item";
- if( ifactory_object_initialized && !ifactory_object_finalized ){
+ g_return_if_fail( NA_IS_IFACTORY_OBJECT( serializable ));
+ g_return_if_fail( NA_IS_IFACTORY_PROVIDER( reader ));
- g_return_if_fail( NA_IS_IFACTORY_OBJECT( serializable ));
- g_return_if_fail( NA_IS_IFACTORY_PROVIDER( reader ));
+ if( ifactory_object_initialized && !ifactory_object_finalized ){
NADataGroup *groups = v_get_groups( serializable );
diff --git a/src/core/na-gconf-monitor.c b/src/core/na-gconf-monitor.c
index c527c8e..5d83a1e 100644
--- a/src/core/na-gconf-monitor.c
+++ b/src/core/na-gconf-monitor.c
@@ -123,9 +123,10 @@ instance_init( GTypeInstance *instance, gpointer klass )
static const gchar *thisfn = "na_gconf_monitor_instance_init";
NAGConfMonitor *self;
+ g_return_if_fail( NA_IS_GCONF_MONITOR( 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_GCONF_MONITOR( instance ));
self = NA_GCONF_MONITOR( instance );
self->private = g_new0( NAGConfMonitorPrivate, 1 );
@@ -141,12 +142,14 @@ instance_dispose( GObject *object )
static const gchar *thisfn = "na_gconf_monitor_instance_dispose";
NAGConfMonitor *self;
- g_debug( "%s: object=%p (%s)", thisfn, ( void * ) object, G_OBJECT_TYPE_NAME( object ));
g_return_if_fail( NA_IS_GCONF_MONITOR( object ));
+
self = NA_GCONF_MONITOR( object );
if( !self->private->dispose_has_run ){
+ g_debug( "%s: object=%p (%s)", thisfn, ( void * ) object, G_OBJECT_TYPE_NAME( object ));
+
/* release the installed monitor before setting dispose_has_run */
release_monitor( self );
@@ -269,11 +272,12 @@ release_monitor( NAGConfMonitor *monitor )
static const gchar *thisfn = "na_gconf_monitor_release_monitor";
GError *error = NULL;
- g_debug( "%s: monitor=%p", thisfn, ( void * ) monitor );
g_return_if_fail( NA_IS_GCONF_MONITOR( monitor ));
if( !monitor->private->dispose_has_run ){
+ g_debug( "%s: monitor=%p", thisfn, ( void * ) monitor );
+
if( monitor->private->monitor_id ){
gconf_client_notify_remove( monitor->private->gconf, monitor->private->monitor_id );
}
diff --git a/src/core/na-iduplicable.c b/src/core/na-iduplicable.c
index cf2212b..834a84a 100644
--- a/src/core/na-iduplicable.c
+++ b/src/core/na-iduplicable.c
@@ -255,16 +255,16 @@ na_iduplicable_duplicate( const NAIDuplicable *object )
NAIDuplicable *dup;
DuplicableStr *dup_str, *obj_str;
- g_debug( "%s: object=%p (%s)",
- thisfn,
- ( void * ) object, G_OBJECT_TYPE_NAME( object ));
-
g_return_val_if_fail( NA_IS_IDUPLICABLE( object ), NULL );
dup = NULL;
if( st_initialized && !st_finalized ){
+ g_debug( "%s: object=%p (%s)",
+ thisfn,
+ ( void * ) object, G_OBJECT_TYPE_NAME( object ));
+
dup = g_object_new( G_OBJECT_TYPE( object ), NULL );
v_copy( dup, object );
@@ -531,10 +531,12 @@ v_is_valid( const NAIDuplicable *object )
void
na_iduplicable_register_consumer( GObject *consumer )
{
+ g_return_if_fail( st_interface );
+
if( st_initialized && !st_finalized ){
- g_return_if_fail( st_interface );
g_debug( "na_iduplicable_register_consumer: consumer=%p", ( void * ) consumer );
+
st_interface->private->consumers = g_list_prepend( st_interface->private->consumers, consumer );
}
}
diff --git a/src/core/na-ifactory-provider.c b/src/core/na-ifactory-provider.c
index a28e6a8..b4f0db0 100644
--- a/src/core/na-ifactory-provider.c
+++ b/src/core/na-ifactory-provider.c
@@ -162,9 +162,6 @@ na_ifactory_provider_read_item( const NAIFactoryProvider *reader, void *reader_d
if( ifactory_provider_initialized && !ifactory_provider_finalized ){
- g_return_if_fail( NA_IS_IFACTORY_PROVIDER( reader ));
- g_return_if_fail( NA_IS_IFACTORY_OBJECT( object ));
-
v_factory_provider_read_start( reader, reader_data, object, messages );
na_factory_object_read_item( object, reader, reader_data, messages );
v_factory_provider_read_done( reader, reader_data, object, messages );
@@ -192,13 +189,13 @@ na_ifactory_provider_write_item( const NAIFactoryProvider *writer, void *writer_
g_return_val_if_fail( NA_IS_IFACTORY_PROVIDER( writer ), NA_IIO_PROVIDER_CODE_PROGRAM_ERROR );
g_return_val_if_fail( NA_IS_IFACTORY_OBJECT( object ), NA_IIO_PROVIDER_CODE_PROGRAM_ERROR );
- g_debug( "%s: writer=%p, writer_data=%p, object=%p (%s)",
- thisfn, ( void * ) writer, ( void * ) writer_data, ( void * ) object, G_OBJECT_TYPE_NAME( object ));
-
code = NA_IIO_PROVIDER_CODE_NOT_WILLING_TO_RUN;
if( ifactory_provider_initialized && !ifactory_provider_finalized ){
+ g_debug( "%s: writer=%p, writer_data=%p, object=%p (%s)",
+ thisfn, ( void * ) writer, ( void * ) writer_data, ( void * ) object, G_OBJECT_TYPE_NAME( object ));
+
code = v_factory_provider_write_start( writer, writer_data, object, messages );
if( code == NA_IIO_PROVIDER_CODE_OK ){
diff --git a/src/core/na-importer-ask.c b/src/core/na-importer-ask.c
index 4c695e9..b808c04 100644
--- a/src/core/na-importer-ask.c
+++ b/src/core/na-importer-ask.c
@@ -138,10 +138,11 @@ instance_init( GTypeInstance *instance, gpointer klass )
NAImporterAsk *self;
GError *error;
+ g_return_if_fail( NA_IS_IMPORTER_ASK( 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_IMPORTER_ASK( instance ));
self = NA_IMPORTER_ASK( instance );
self->private = g_new0( NAImporterAskPrivate, 1 );
@@ -169,13 +170,14 @@ instance_dispose( GObject *dialog )
static const gchar *thisfn = "na_importer_ask_instance_dispose";
NAImporterAsk *self;
- g_debug( "%s: dialog=%p (%s)", thisfn, ( void * ) dialog, G_OBJECT_TYPE_NAME( dialog ));
-
g_return_if_fail( NA_IS_IMPORTER_ASK( dialog ));
+
self = NA_IMPORTER_ASK( dialog );
if( !self->private->dispose_has_run ){
+ g_debug( "%s: dialog=%p (%s)", thisfn, ( void * ) dialog, G_OBJECT_TYPE_NAME( dialog ));
+
self->private->dispose_has_run = TRUE;
g_object_unref( self->private->gconf );
@@ -194,8 +196,9 @@ instance_finalize( GObject *dialog )
static const gchar *thisfn = "na_importer_ask_instance_finalize";
NAImporterAsk *self;
- g_debug( "%s: dialog=%p", thisfn, ( void * ) dialog );
g_return_if_fail( NA_IS_IMPORTER_ASK( dialog ));
+
+ g_debug( "%s: dialog=%p", thisfn, ( void * ) dialog );
self = NA_IMPORTER_ASK( dialog );
g_free( self->private );
diff --git a/src/core/na-importer.c b/src/core/na-importer.c
index 44e4dbb..cf58f56 100644
--- a/src/core/na-importer.c
+++ b/src/core/na-importer.c
@@ -59,12 +59,12 @@ na_importer_import_from_uri( const NAPivot *pivot, NAIImporterUriParms *parms )
g_return_val_if_fail( NA_IS_PIVOT( pivot ), IMPORTER_CODE_PROGRAM_ERROR );
- g_debug( "%s: pivot=%p, parms=%p", thisfn, ( void * ) pivot, ( void * ) parms );
-
code = IMPORTER_CODE_PROGRAM_ERROR;
if( iimporter_initialized && !iimporter_finalized ){
+ g_debug( "%s: pivot=%p, parms=%p", thisfn, ( void * ) pivot, ( void * ) parms );
+
code = IMPORTER_CODE_NOT_WILLING_TO;
modules = na_pivot_get_providers( pivot, NA_IIMPORTER_TYPE );
@@ -106,13 +106,13 @@ na_importer_import_from_list( const NAPivot *pivot, NAIImporterListParms *parms
g_return_val_if_fail( NA_IS_PIVOT( pivot ), IMPORTER_CODE_PROGRAM_ERROR );
- g_debug( "%s: pivot=%p, parms=%p", thisfn, ( void * ) pivot, ( void * ) parms );
-
code = IMPORTER_CODE_PROGRAM_ERROR;
parms->imported = NULL;
if( iimporter_initialized && !iimporter_finalized ){
+ g_debug( "%s: pivot=%p, parms=%p", thisfn, ( void * ) pivot, ( void * ) parms );
+
code = IMPORTER_CODE_NOT_WILLING_TO;
uri_parms.version = 1;
diff --git a/src/core/na-io-provider.c b/src/core/na-io-provider.c
index 5702c96..655262c 100644
--- a/src/core/na-io-provider.c
+++ b/src/core/na-io-provider.c
@@ -164,11 +164,13 @@ instance_init( GTypeInstance *instance, gpointer klass )
static const gchar *thisfn = "na_io_provider_instance_init";
NAIOProvider *self;
- g_debug( "%s: instance=%p (%s), klass=%p",
- thisfn, ( void * ) instance, G_OBJECT_TYPE_NAME( instance ), ( void * ) 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->private = g_new0( NAIOProviderPrivate, 1 );
self->private->dispose_has_run = FALSE;
@@ -184,12 +186,14 @@ instance_constructed( GObject *object )
static const gchar *thisfn = "na_io_provider_instance_constructed";
NAIOProvider *self;
- g_debug( "%s: object=%p", thisfn, ( void * ) object );
g_return_if_fail( NA_IS_IO_PROVIDER( object ));
+
self = NA_IO_PROVIDER( object );
if( !self->private->dispose_has_run ){
+ g_debug( "%s: object=%p", thisfn, ( void * ) object );
+
/* chain up to the parent class */
if( G_OBJECT_CLASS( st_parent_class )->constructed ){
G_OBJECT_CLASS( st_parent_class )->constructed( object );
@@ -244,12 +248,13 @@ instance_dispose( GObject *object )
static const gchar *thisfn = "na_io_provider_instance_dispose";
NAIOProvider *self;
- g_debug( "%s: object=%p (%s)", thisfn, ( void * ) object, G_OBJECT_TYPE_NAME( object ));
g_return_if_fail( NA_IS_IO_PROVIDER( object ));
self = NA_IO_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;
if( self->private->provider ){
@@ -274,10 +279,11 @@ instance_finalize( GObject *object )
static const gchar *thisfn = "na_io_provider_instance_finalize";
NAIOProvider *self;
- g_debug( "%s: object=%p", thisfn, ( void * ) object );
g_return_if_fail( NA_IS_IO_PROVIDER( object ));
self = NA_IO_PROVIDER( object );
+ g_debug( "%s: object=%p", thisfn, ( void * ) object );
+
g_free( self->private->id );
g_free( self->private->name );
diff --git a/src/core/na-ipivot-consumer.c b/src/core/na-ipivot-consumer.c
index 11cc2b9..d16b518 100644
--- a/src/core/na-ipivot-consumer.c
+++ b/src/core/na-ipivot-consumer.c
@@ -142,11 +142,12 @@ na_ipivot_consumer_delay_notify( NAIPivotConsumer *instance )
static const gchar *thisfn = "na_ipivot_consumer_delay_notify";
GTimeVal *last_delay;
- g_debug( "%s: instance=%p", thisfn, ( void * ) instance );
g_return_if_fail( NA_IS_IPIVOT_CONSUMER( instance ));
if( st_initialized && !st_finalized ){
+ g_debug( "%s: instance=%p", thisfn, ( void * ) instance );
+
last_delay = ( GTimeVal * ) g_object_get_data( G_OBJECT( instance ), "na-ipivot-consumer-delay-notify" );
if( !last_delay ){
@@ -170,12 +171,12 @@ void na_ipivot_consumer_notify_of_items_changed( NAIPivotConsumer *instance )
{
static const gchar *thisfn = "na_ipivot_consumer_notify_of_items_changed";
- g_debug( "%s: instance=%p", thisfn, ( void * ) instance );
-
g_return_if_fail( NA_IS_IPIVOT_CONSUMER( instance ));
if( st_initialized && !st_finalized ){
+ g_debug( "%s: instance=%p", thisfn, ( void * ) instance );
+
if( is_notify_allowed( instance )){
if( NA_IPIVOT_CONSUMER_GET_INTERFACE( instance )->on_items_changed ){
@@ -195,12 +196,12 @@ void na_ipivot_consumer_notify_of_mandatory_prefs_changed( NAIPivotConsumer *ins
{
static const gchar *thisfn = "na_ipivot_consumer_notify_of_mandatory_prefs_changed";
- g_debug( "%s: instance=%p", thisfn, ( void * ) instance );
-
g_return_if_fail( NA_IS_IPIVOT_CONSUMER( instance ));
if( st_initialized && !st_finalized ){
+ g_debug( "%s: instance=%p", thisfn, ( void * ) instance );
+
if( is_notify_allowed( instance )){
if( NA_IPIVOT_CONSUMER_GET_INTERFACE( instance )->on_mandatory_prefs_changed ){
diff --git a/src/core/na-module.c b/src/core/na-module.c
index 128e7ad..3602e81 100644
--- a/src/core/na-module.c
+++ b/src/core/na-module.c
@@ -144,11 +144,12 @@ instance_init( GTypeInstance *instance, gpointer klass )
static const gchar *thisfn = "na_module_instance_init";
NAModule *self;
- g_debug( "%s: instance=%p (%s), klass=%p",
- thisfn, ( void * ) instance, G_OBJECT_TYPE_NAME( instance ), ( void * ) klass );
g_return_if_fail( NA_IS_MODULE( instance ));
self = NA_MODULE( instance );
+ g_debug( "%s: instance=%p (%s), klass=%p",
+ thisfn, ( void * ) instance, G_OBJECT_TYPE_NAME( instance ), ( void * ) klass );
+
self->private = g_new0( NAModulePrivate, 1 );
self->private->dispose_has_run = FALSE;
@@ -160,12 +161,13 @@ instance_dispose( GObject *object )
static const gchar *thisfn = "na_module_instance_dispose";
NAModule *self;
- g_debug( "%s: object=%p (%s)", thisfn, ( void * ) object, G_OBJECT_TYPE_NAME( object ));
g_return_if_fail( NA_IS_MODULE( object ));
self = NA_MODULE( 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;
if( G_OBJECT_CLASS( st_parent_class )->dispose ){
@@ -180,10 +182,11 @@ instance_finalize( GObject *object )
static const gchar *thisfn = "na_module_instance_finalize";
NAModule *self;
- g_debug( "%s: object=%p", thisfn, ( void * ) object );
g_return_if_fail( NA_IS_MODULE( object ));
self = NA_MODULE( object );
+ g_debug( "%s: object=%p", thisfn, ( void * ) object );
+
g_free( self->private->path );
g_free( self->private->name );
@@ -303,9 +306,10 @@ module_load( GTypeModule *gmodule )
NAModule *module;
gboolean loaded;
- g_debug( "%s: gmodule=%p", thisfn, ( void * ) gmodule );
g_return_val_if_fail( G_IS_TYPE_MODULE( gmodule ), FALSE );
+ g_debug( "%s: gmodule=%p", thisfn, ( void * ) gmodule );
+
loaded = FALSE;
module = NA_MODULE( gmodule );
@@ -419,9 +423,10 @@ module_unload( GTypeModule *gmodule )
static const gchar *thisfn = "na_module_module_unload";
NAModule *module;
- g_debug( "%s: gmodule=%p", thisfn, ( void * ) gmodule );
g_return_if_fail( G_IS_TYPE_MODULE( gmodule ));
+ g_debug( "%s: gmodule=%p", thisfn, ( void * ) gmodule );
+
module = NA_MODULE( gmodule );
if( module->private->shutdown ){
diff --git a/src/core/na-object-action.c b/src/core/na-object-action.c
index 924d44f..efcf0ac 100644
--- a/src/core/na-object-action.c
+++ b/src/core/na-object-action.c
@@ -183,13 +183,13 @@ instance_init( GTypeInstance *instance, gpointer klass )
static const gchar *thisfn = "na_object_action_instance_init";
NAObjectAction *self;
- g_debug( "%s: instance=%p (%s), klass=%p",
- thisfn, ( void * ) instance, G_OBJECT_TYPE_NAME( instance ), ( void * ) klass );
-
g_return_if_fail( NA_IS_OBJECT_ACTION( instance ));
self = NA_OBJECT_ACTION( instance );
+ g_debug( "%s: instance=%p (%s), klass=%p",
+ thisfn, ( void * ) instance, G_OBJECT_TYPE_NAME( instance ), ( void * ) klass );
+
self->private = g_new0( NAObjectActionPrivate, 1 );
}
@@ -223,14 +223,14 @@ instance_dispose( GObject *object )
static const gchar *thisfn = "na_object_action_instance_dispose";
NAObjectAction *self;
- g_debug( "%s: object=%p (%s)", thisfn, ( void * ) object, G_OBJECT_TYPE_NAME( object ));
-
g_return_if_fail( NA_IS_OBJECT_ACTION( object ));
self = NA_OBJECT_ACTION( 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 */
@@ -246,12 +246,12 @@ instance_finalize( GObject *object )
static const gchar *thisfn = "na_object_action_instance_finalize";
NAObjectAction *self;
- g_debug( "%s: object=%p (%s)", thisfn, ( void * ) object, G_OBJECT_TYPE_NAME( object ));
-
g_return_if_fail( NA_IS_OBJECT_ACTION( object ));
self = NA_OBJECT_ACTION( object );
+ g_debug( "%s: object=%p (%s)", thisfn, ( void * ) object, G_OBJECT_TYPE_NAME( object ));
+
g_free( self->private );
/* chain call to parent class */
diff --git a/src/core/na-object-id.c b/src/core/na-object-id.c
index c49546a..ee8cb79 100644
--- a/src/core/na-object-id.c
+++ b/src/core/na-object-id.c
@@ -128,13 +128,13 @@ instance_init( GTypeInstance *instance, gpointer klass )
static const gchar *thisfn = "na_object_id_instance_init";
NAObjectId *self;
- g_debug( "%s: instance=%p (%s), klass=%p",
- thisfn, ( void * ) instance, G_OBJECT_TYPE_NAME( instance ), ( void * ) klass );
-
g_return_if_fail( NA_IS_OBJECT_ID( instance ));
self = NA_OBJECT_ID( instance );
+ g_debug( "%s: instance=%p (%s), klass=%p",
+ thisfn, ( void * ) instance, G_OBJECT_TYPE_NAME( instance ), ( void * ) klass );
+
self->private = g_new0( NAObjectIdPrivate, 1 );
}
@@ -151,14 +151,14 @@ instance_dispose( GObject *object )
NAObjectId *self;
NAObjectItem *parent;
- g_debug( "%s: object=%p (%s)", thisfn, ( void * ) object, G_OBJECT_TYPE_NAME( object ));
-
g_return_if_fail( NA_IS_OBJECT_ID( object ));
self = NA_OBJECT_ID( 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;
parent = na_object_get_parent( object );
@@ -287,14 +287,14 @@ na_object_id_prepare_for_paste( NAObjectId *object, gboolean relabel, gboolean r
static const gchar *thisfn = "na_object_id_prepare_for_paste";
GList *subitems, *it;
- g_debug( "%s: object=%p, relabel=%s, renumber=%s, parent=%p",
- thisfn, ( void * ) object, relabel ? "True":"False", renumber ? "True":"False", ( void * ) parent );
-
g_return_if_fail( NA_IS_OBJECT_ID( object ));
g_return_if_fail( !parent || NA_IS_OBJECT_ITEM( parent ));
if( !object->private->dispose_has_run ){
+ g_debug( "%s: object=%p, relabel=%s, renumber=%s, parent=%p",
+ thisfn, ( void * ) object, relabel ? "True":"False", renumber ? "True":"False", ( void * ) parent );
+
if( NA_IS_OBJECT_PROFILE( object )){
na_object_set_parent( object, parent );
na_object_set_new_id( object, parent );
diff --git a/src/core/na-object-item.c b/src/core/na-object-item.c
index c7055f9..2256a0d 100644
--- a/src/core/na-object-item.c
+++ b/src/core/na-object-item.c
@@ -147,13 +147,13 @@ instance_init( GTypeInstance *instance, gpointer klass )
static const gchar *thisfn = "na_object_item_instance_init";
NAObjectItem *self;
- g_debug( "%s: instance=%p (%s), klass=%p",
- thisfn, ( void * ) instance, G_OBJECT_TYPE_NAME( instance ), ( void * ) klass );
-
g_return_if_fail( NA_IS_OBJECT_ITEM( instance ));
self = NA_OBJECT_ITEM( instance );
+ g_debug( "%s: instance=%p (%s), klass=%p",
+ thisfn, ( void * ) instance, G_OBJECT_TYPE_NAME( instance ), ( void * ) klass );
+
self->private = g_new0( NAObjectItemPrivate, 1 );
}
@@ -164,14 +164,14 @@ instance_dispose( GObject *object )
NAObjectItem *self;
GList *children;
- g_debug( "%s: object=%p (%s)", thisfn, ( void * ) object, G_OBJECT_TYPE_NAME( object ));
-
g_return_if_fail( NA_IS_OBJECT_ITEM( object ));
self = NA_OBJECT_ITEM( 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;
children = na_object_get_items( self );
diff --git a/src/core/na-object-menu.c b/src/core/na-object-menu.c
index ce24546..0c6858b 100644
--- a/src/core/na-object-menu.c
+++ b/src/core/na-object-menu.c
@@ -176,13 +176,13 @@ instance_init( GTypeInstance *instance, gpointer klass )
static const gchar *thisfn = "na_object_menu_instance_init";
NAObjectMenu *self;
- g_debug( "%s: instance=%p (%s), klass=%p",
- thisfn, ( void * ) instance, G_OBJECT_TYPE_NAME( instance ), ( void * ) klass );
-
g_return_if_fail( NA_IS_OBJECT_MENU( instance ));
self = NA_OBJECT_MENU( instance );
+ g_debug( "%s: instance=%p (%s), klass=%p",
+ thisfn, ( void * ) instance, G_OBJECT_TYPE_NAME( instance ), ( void * ) klass );
+
self->private = g_new0( NAObjectMenuPrivate, 1 );
}
@@ -216,14 +216,14 @@ instance_dispose( GObject *object )
static const gchar *thisfn = "na_object_menu_instance_dispose";
NAObjectMenu *self;
- g_debug( "%s: object=%p (%s)", thisfn, ( void * ) object, G_OBJECT_TYPE_NAME( object ));
-
g_return_if_fail( NA_IS_OBJECT_MENU( object ));
self = NA_OBJECT_MENU( 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 */
@@ -239,12 +239,12 @@ instance_finalize( GObject *object )
static const gchar *thisfn = "na_object_menu_instance_finalize";
NAObjectMenu *self;
- g_debug( "%s: object=%p (%s)", thisfn, ( void * ) object, G_OBJECT_TYPE_NAME( object ));
-
g_return_if_fail( NA_IS_OBJECT_MENU( object ));
self = NA_OBJECT_MENU( object );
+ g_debug( "%s: object=%p (%s)", thisfn, ( void * ) object, G_OBJECT_TYPE_NAME( object ));
+
g_free( self->private );
/* chain call to parent class */
diff --git a/src/core/na-object-profile.c b/src/core/na-object-profile.c
index 42146c6..c56a330 100644
--- a/src/core/na-object-profile.c
+++ b/src/core/na-object-profile.c
@@ -182,13 +182,13 @@ instance_init( GTypeInstance *instance, gpointer klass )
static const gchar *thisfn = "na_object_profile_instance_init";
NAObjectProfile *self;
- g_debug( "%s: instance=%p (%s), klass=%p",
- thisfn, ( void * ) instance, G_OBJECT_TYPE_NAME( instance ), ( void * ) klass );
-
g_return_if_fail( NA_IS_OBJECT_PROFILE( instance ));
self = NA_OBJECT_PROFILE( instance );
+ g_debug( "%s: instance=%p (%s), klass=%p",
+ thisfn, ( void * ) instance, G_OBJECT_TYPE_NAME( instance ), ( void * ) klass );
+
self->private = g_new0( NAObjectProfilePrivate, 1 );
self->private->dispose_has_run = FALSE;
@@ -224,14 +224,14 @@ instance_dispose( GObject *object )
static const gchar *thisfn = "na_object_profile_instance_dispose";
NAObjectProfile *self;
- g_debug( "%s: object=%p (%s)", thisfn, ( void * ) object, G_OBJECT_TYPE_NAME( object ));
-
g_return_if_fail( NA_IS_OBJECT_PROFILE( object ));
self = NA_OBJECT_PROFILE( 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 */
@@ -247,12 +247,12 @@ instance_finalize( GObject *object )
static const gchar *thisfn = "na_object_profile_instance_finalize";
NAObjectProfile *self;
- g_debug( "%s: object=%p (%s)", thisfn, ( void * ) object, G_OBJECT_TYPE_NAME( object ));
-
g_return_if_fail( NA_IS_OBJECT_PROFILE( object ));
self = NA_OBJECT_PROFILE( object );
+ g_debug( "%s: object=%p (%s)", thisfn, ( void * ) object, G_OBJECT_TYPE_NAME( object ));
+
g_free( self->private );
/* chain call to parent class */
diff --git a/src/core/na-object.c b/src/core/na-object.c
index 96d8e03..d617329 100644
--- a/src/core/na-object.c
+++ b/src/core/na-object.c
@@ -167,13 +167,13 @@ instance_init( GTypeInstance *instance, gpointer klass )
static const gchar *thisfn = "na_object_instance_init";
NAObject *self;
- g_debug( "%s: instance=%p (%s), klass=%p",
- thisfn, ( void * ) instance, G_OBJECT_TYPE_NAME( instance ), ( void * ) klass );
-
g_return_if_fail( NA_IS_OBJECT( instance ));
self = NA_OBJECT( instance );
+ g_debug( "%s: instance=%p (%s), klass=%p",
+ thisfn, ( void * ) instance, G_OBJECT_TYPE_NAME( instance ), ( void * ) klass );
+
self->private = g_new0( NAObjectPrivate, 1 );
}
@@ -183,14 +183,14 @@ instance_dispose( GObject *object )
static const gchar *thisfn = "na_object_instance_dispose";
NAObject *self;
- g_debug( "%s: object=%p (%s)", thisfn, ( void * ) object, G_OBJECT_TYPE_NAME( object ));
-
g_return_if_fail( NA_IS_OBJECT( object ));
self = NA_OBJECT( 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;
na_iduplicable_dispose( NA_IDUPLICABLE( object ));
@@ -210,10 +210,10 @@ instance_finalize( GObject *object )
g_return_if_fail( NA_IS_OBJECT( object ));
- g_debug( "%s: object=%p (%s)", thisfn, ( void * ) object, G_OBJECT_TYPE_NAME( object ));
-
self = NA_OBJECT( object );
+ g_debug( "%s: object=%p (%s)", thisfn, ( void * ) object, G_OBJECT_TYPE_NAME( object ));
+
g_free( self->private );
if( NA_IS_IFACTORY_OBJECT( object )){
@@ -383,14 +383,14 @@ na_object_object_check_status( const NAObject *object )
static const gchar *thisfn = "na_object_object_check_status";
GList *children, *ic;
- g_debug( "%s: object=%p (%s)",
- thisfn,
- ( void * ) object, G_OBJECT_TYPE_NAME( object ));
-
g_return_if_fail( NA_IS_OBJECT( object ));
if( !object->private->dispose_has_run ){
+ g_debug( "%s: object=%p (%s)",
+ thisfn,
+ ( void * ) object, G_OBJECT_TYPE_NAME( object ));
+
if( NA_IS_OBJECT_ITEM( object )){
children = na_object_get_items( object );
@@ -674,13 +674,13 @@ na_object_object_ref( NAObject *object )
NAObject *ref = NULL;
GList *children, *ic;
- g_debug( "na_object_object_ref: object=%p (%s, ref_count=%d)",
- ( void * ) object, G_OBJECT_TYPE_NAME( object ), G_OBJECT( object )->ref_count );
-
g_return_val_if_fail( NA_IS_OBJECT( object ), NULL );
if( !object->private->dispose_has_run ){
+ g_debug( "na_object_object_ref: object=%p (%s, ref_count=%d)",
+ ( void * ) object, G_OBJECT_TYPE_NAME( object ), G_OBJECT( object )->ref_count );
+
if( NA_IS_OBJECT_ITEM( object )){
children = na_object_get_items( object );
@@ -721,17 +721,8 @@ na_object_object_unref( NAObject *object )
( void * ) object, G_OBJECT_TYPE_NAME( object ), G_OBJECT( object )->ref_count );
if( NA_IS_OBJECT_ITEM( object )){
-#if 0
- while( TRUE ){
- children = na_object_get_items( object );
- if( children ){
- na_object_unref( children->data );
- } else {
- break;
- }
- }
-#endif
children = na_object_get_items( object );
+
for( ic = children ; ic ; ic = icnext ){
icnext = ic->next;
g_object_unref( ic->data );
diff --git a/src/core/na-pivot.c b/src/core/na-pivot.c
index 34a2603..a531461 100644
--- a/src/core/na-pivot.c
+++ b/src/core/na-pivot.c
@@ -201,11 +201,12 @@ instance_init( GTypeInstance *instance, gpointer klass )
static const gchar *thisfn = "na_pivot_instance_init";
NAPivot *self;
- g_debug( "%s: instance=%p (%s), klass=%p",
- thisfn, ( void * ) instance, G_OBJECT_TYPE_NAME( instance ), ( void * ) klass );
g_return_if_fail( NA_IS_PIVOT( instance ));
self = NA_PIVOT( instance );
+ g_debug( "%s: instance=%p (%s), klass=%p",
+ thisfn, ( void * ) instance, G_OBJECT_TYPE_NAME( instance ), ( void * ) klass );
+
self->private = g_new0( NAPivotPrivate, 1 );
self->private->dispose_has_run = FALSE;
@@ -224,12 +225,13 @@ instance_constructed( GObject *object )
static const gchar *thisfn = "na_pivot_instance_constructed";
NAPivot *self;
- g_debug( "%s: object=%p", thisfn, ( void * ) object );
g_return_if_fail( NA_IS_PIVOT( object ));
self = NA_PIVOT( object );
if( !self->private->dispose_has_run ){
+ g_debug( "%s: object=%p", thisfn, ( void * ) object );
+
self->private->modules = na_module_load_modules();
monitor_runtime_preferences( self );
@@ -296,12 +298,13 @@ instance_dispose( GObject *object )
static const gchar *thisfn = "na_pivot_instance_dispose";
NAPivot *self;
- g_debug( "%s: object=%p (%s)", thisfn, ( void * ) object, G_OBJECT_TYPE_NAME( object ));
g_return_if_fail( NA_IS_PIVOT( object ));
self = NA_PIVOT( 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 modules */
@@ -336,10 +339,11 @@ instance_finalize( GObject *object )
static const gchar *thisfn = "na_pivot_instance_finalize";
NAPivot *self;
- g_debug( "%s: object=%p", thisfn, ( void * ) object );
g_return_if_fail( NA_IS_PIVOT( object ));
self = NA_PIVOT( object );
+ g_debug( "%s: object=%p", thisfn, ( void * ) object );
+
g_free( self->private );
/* chain call to parent class */
@@ -421,11 +425,12 @@ na_pivot_get_providers( const NAPivot *pivot, GType type )
static const gchar *thisfn = "na_pivot_get_providers";
GList *list = NULL;
- g_debug( "%s: pivot=%p, type=%lu (%s)", thisfn, ( void * ) pivot, ( unsigned long ) type, g_type_name( type ));
g_return_val_if_fail( NA_IS_PIVOT( pivot ), NULL );
if( !pivot->private->dispose_has_run ){
+ g_debug( "%s: pivot=%p, type=%lu (%s)", thisfn, ( void * ) pivot, ( unsigned long ) type, g_type_name( type ));
+
list = na_module_get_extensions_for_type( pivot->private->modules, type );
g_debug( "%s: list=%p, count=%d", thisfn, ( void * ) list, list ? g_list_length( list ) : 0 );
}
@@ -604,13 +609,13 @@ na_pivot_item_changed_handler( NAIIOProvider *provider, const gchar *id, NAPivot
{
static const gchar *thisfn = "na_pivot_item_changed_handler";
- g_debug( "%s: provider=%p, id=%s, pivot=%p", thisfn, ( void * ) provider, id, ( void * ) pivot );
-
g_return_if_fail( NA_IS_IIO_PROVIDER( provider ));
g_return_if_fail( NA_IS_PIVOT( pivot ));
if( !pivot->private->dispose_has_run ){
+ g_debug( "%s: provider=%p, id=%s, pivot=%p", thisfn, ( void * ) provider, id, ( void * ) pivot );
+
/* set a timeout to notify clients at the end of the serie */
g_get_current_time( &pivot->private->last_event );
@@ -637,9 +642,10 @@ on_item_changed_timeout( NAPivot *pivot )
gulong diff;
GList *ic;
- g_debug( "%s: pivot=%p", thisfn, pivot );
g_return_val_if_fail( NA_IS_PIVOT( pivot ), FALSE );
+ g_debug( "%s: pivot=%p", thisfn, pivot );
+
g_get_current_time( &now );
diff = time_val_diff( &now, &pivot->private->last_event );
if( diff < st_timeout_usec ){
@@ -688,14 +694,15 @@ na_pivot_write_level_zero( const NAPivot *pivot, GList *items )
gchar *id;
GSList *content;
- g_debug( "%s: pivot=%p", thisfn, ( void * ) pivot);
-
g_return_val_if_fail( NA_IS_PIVOT( pivot ), FALSE );
written = FALSE;
- if( !pivot->private->dispose_has_run &&
- na_pivot_is_level_zero_writable( pivot )){
+ if( !pivot->private->dispose_has_run ){
+
+ g_debug( "%s: pivot=%p", thisfn, ( void * ) pivot);
+
+ if( na_pivot_is_level_zero_writable( pivot )){
content = NULL;
for( it = items ; it ; it = it->next ){
@@ -710,6 +717,7 @@ na_pivot_write_level_zero( const NAPivot *pivot, GList *items )
na_core_utils_slist_free( content );
written = TRUE;
+ }
}
return( written );
@@ -729,12 +737,13 @@ na_pivot_register_consumer( NAPivot *pivot, const NAIPivotConsumer *consumer )
{
static const gchar *thisfn = "na_pivot_register_consumer";
- g_debug( "%s: pivot=%p, consumer=%p", thisfn, ( void * ) pivot, ( void * ) consumer );
g_return_if_fail( NA_IS_PIVOT( pivot ));
g_return_if_fail( NA_IS_IPIVOT_CONSUMER( consumer ));
if( !pivot->private->dispose_has_run ){
+ g_debug( "%s: pivot=%p, consumer=%p", thisfn, ( void * ) pivot, ( void * ) consumer );
+
pivot->private->consumers = g_list_prepend( pivot->private->consumers, ( gpointer ) consumer );
}
}
@@ -905,10 +914,11 @@ monitor_runtime_preferences( NAPivot *pivot )
GList *list = NULL;
gchar *path;
- g_debug( "%s: pivot=%p", thisfn, ( void * ) pivot );
g_return_if_fail( NA_IS_PIVOT( pivot ));
g_return_if_fail( !pivot->private->dispose_has_run );
+ g_debug( "%s: pivot=%p", thisfn, ( void * ) pivot );
+
list = g_list_prepend( list,
na_gconf_monitor_new(
IPREFS_GCONF_PREFS_PATH,
@@ -985,11 +995,12 @@ display_order_changed( NAPivot *pivot )
GList *ic;
gint order_mode;
- g_debug( "%s: pivot=%p", thisfn, ( void * ) pivot );
- g_assert( NA_IS_PIVOT( pivot ));
+ g_return_if_fail( NA_IS_PIVOT( pivot ));
if( !pivot->private->dispose_has_run ){
+ g_debug( "%s: pivot=%p", thisfn, ( void * ) pivot );
+
order_mode = na_iprefs_get_order_mode( NA_IPREFS( pivot ));
for( ic = pivot->private->consumers ; ic ; ic = ic->next ){
@@ -1005,11 +1016,12 @@ create_root_menu_changed( NAPivot *pivot )
GList *ic;
gboolean should_create;
- g_debug( "%s: pivot=%p", thisfn, ( void * ) pivot );
- g_assert( NA_IS_PIVOT( pivot ));
+ g_return_if_fail( NA_IS_PIVOT( pivot ));
if( !pivot->private->dispose_has_run ){
+ g_debug( "%s: pivot=%p", thisfn, ( void * ) pivot );
+
should_create = na_iprefs_read_bool( NA_IPREFS( pivot ), IPREFS_CREATE_ROOT_MENU, FALSE );
for( ic = pivot->private->consumers ; ic ; ic = ic->next ){
na_ipivot_consumer_notify_of_create_root_menu_changed( NA_IPIVOT_CONSUMER( ic->data ), should_create );
@@ -1024,11 +1036,12 @@ display_about_changed( NAPivot *pivot )
GList *ic;
gboolean display_about;
- g_debug( "%s: pivot=%p", thisfn, ( void * ) pivot );
- g_assert( NA_IS_PIVOT( pivot ));
+ g_return_if_fail( NA_IS_PIVOT( pivot ));
if( !pivot->private->dispose_has_run ){
+ g_debug( "%s: pivot=%p", thisfn, ( void * ) pivot );
+
display_about = na_iprefs_read_bool( NA_IPREFS( pivot ), IPREFS_ADD_ABOUT_ITEM, TRUE );
for( ic = pivot->private->consumers ; ic ; ic = ic->next ){
diff --git a/src/core/na-selected-info.c b/src/core/na-selected-info.c
index be0f446..5e6dec3 100644
--- a/src/core/na-selected-info.c
+++ b/src/core/na-selected-info.c
@@ -126,11 +126,12 @@ instance_init( GTypeInstance *instance, gpointer klass )
static const gchar *thisfn = "na_selected_info_instance_init";
NASelectedInfo *self;
- g_debug( "%s: instance=%p (%s), klass=%p",
- thisfn, ( void * ) instance, G_OBJECT_TYPE_NAME( instance ), ( void * ) klass );
g_return_if_fail( NA_IS_SELECTED_INFO( instance ));
self = NA_SELECTED_INFO( instance );
+ g_debug( "%s: instance=%p (%s), klass=%p",
+ thisfn, ( void * ) instance, G_OBJECT_TYPE_NAME( instance ), ( void * ) klass );
+
self->private = g_new0( NASelectedInfoPrivate, 1 );
self->private->dispose_has_run = FALSE;
@@ -143,12 +144,13 @@ instance_dispose( GObject *object )
static const gchar *thisfn = "na_selected_info_instance_dispose";
NASelectedInfo *self;
- g_debug( "%s: object=%p (%s)", thisfn, ( void * ) object, G_OBJECT_TYPE_NAME( object ));
g_return_if_fail( NA_IS_SELECTED_INFO( object ));
self = NA_SELECTED_INFO( 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;
g_object_unref( self->private->location );
@@ -167,10 +169,11 @@ instance_finalize( GObject *object )
static const gchar *thisfn = "na_selected_info_instance_finalize";
NASelectedInfo *self;
- g_debug( "%s: object=%p", thisfn, ( void * ) object );
g_return_if_fail( NA_IS_SELECTED_INFO( object ));
self = NA_SELECTED_INFO( object );
+ g_debug( "%s: object=%p", thisfn, ( void * ) object );
+
g_free( self->private->uri );
g_free( self->private->mimetype );
diff --git a/src/core/na-tokens.c b/src/core/na-tokens.c
index 54c44df..87ecad6 100644
--- a/src/core/na-tokens.c
+++ b/src/core/na-tokens.c
@@ -140,11 +140,12 @@ instance_init( GTypeInstance *instance, gpointer klass )
static const gchar *thisfn = "na_tokens_instance_init";
NATokens *self;
- g_debug( "%s: instance=%p (%s), klass=%p",
- thisfn, ( void * ) instance, G_OBJECT_TYPE_NAME( instance ), ( void * ) klass );
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->private = g_new0( NATokensPrivate, 1 );
self->private->uris = NULL;
@@ -174,12 +175,13 @@ instance_dispose( GObject *object )
static const gchar *thisfn = "na_tokens_instance_dispose";
NATokens *self;
- g_debug( "%s: object=%p (%s)", thisfn, ( void * ) object, G_OBJECT_TYPE_NAME( object ));
g_return_if_fail( NA_IS_TOKENS( object ));
self = NA_TOKENS( 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;
if( G_OBJECT_CLASS( st_parent_class )->dispose ){
@@ -194,10 +196,11 @@ instance_finalize( GObject *object )
static const gchar *thisfn = "na_tokens_instance_finalize";
NATokens *self;
- g_debug( "%s: object=%p", thisfn, ( void * ) object );
g_return_if_fail( NA_IS_TOKENS( object ));
self = NA_TOKENS( object );
+ g_debug( "%s: object=%p", thisfn, ( void * ) object );
+
g_free( self->private->scheme );
g_free( self->private->username );
g_free( self->private->hostname );
diff --git a/src/core/na-updater.c b/src/core/na-updater.c
index 1103d61..6b3b360 100644
--- a/src/core/na-updater.c
+++ b/src/core/na-updater.c
@@ -118,11 +118,12 @@ instance_init( GTypeInstance *instance, gpointer klass )
static const gchar *thisfn = "na_updater_instance_init";
NAUpdater *self;
- g_debug( "%s: instance=%p (%s), klass=%p",
- thisfn, ( void * ) instance, G_OBJECT_TYPE_NAME( instance ), ( void * ) klass );
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->private = g_new0( NAUpdaterPrivate, 1 );
self->private->dispose_has_run = FALSE;
@@ -134,12 +135,13 @@ instance_dispose( GObject *object )
static const gchar *thisfn = "na_updater_instance_dispose";
NAUpdater *self;
- g_debug( "%s: object=%p (%s)", thisfn, ( void * ) object, G_OBJECT_TYPE_NAME( object ));
g_return_if_fail( NA_IS_UPDATER( object ));
self = NA_UPDATER( 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 */
@@ -155,10 +157,11 @@ instance_finalize( GObject *object )
static const gchar *thisfn = "na_updater_instance_finalize";
NAUpdater *self;
- g_debug( "%s: object=%p", thisfn, ( void * ) object );
g_return_if_fail( NA_IS_UPDATER( object ));
self = NA_UPDATER( object );
+ g_debug( "%s: object=%p", thisfn, ( void * ) object );
+
g_free( self->private );
/* chain call to parent class */
@@ -258,14 +261,14 @@ na_updater_remove_item( NAUpdater *updater, NAObject *item )
GList *tree;
NAObjectItem *parent;
- g_debug( "na_updater_remove_item: updater=%p, item=%p (%s)",
- ( void * ) updater,
- ( void * ) item, G_IS_OBJECT( item ) ? G_OBJECT_TYPE_NAME( item ) : "(null)" );
-
g_return_if_fail( NA_IS_PIVOT( updater ));
if( !updater->private->dispose_has_run ){
+ g_debug( "na_updater_remove_item: updater=%p, item=%p (%s)",
+ ( void * ) updater,
+ ( void * ) item, G_IS_OBJECT( item ) ? G_OBJECT_TYPE_NAME( item ) : "(null)" );
+
parent = na_object_get_parent( item );
if( parent ){
tree = na_object_get_items( parent );
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]