[nautilus-actions] No more define signals for preferences management



commit c7286e23376860e929402b6fc6177e5b13d5c442
Author: Pierre Wieser <pwieser trychlos org>
Date:   Sat Sep 26 19:55:02 2009 +0200

    No more define signals for preferences management

 ChangeLog                       |   18 +++++
 src/common/na-gconf-monitor.c   |   11 ++--
 src/common/na-gconf-monitor.h   |    2 +-
 src/common/na-gconf-provider.c  |    7 +--
 src/common/na-gconf-provider.h  |   10 ++--
 src/common/na-iio-provider.h    |    5 +-
 src/common/na-ipivot-consumer.c |   26 ++++---
 src/common/na-ipivot-consumer.h |    6 +-
 src/common/na-pivot.c           |  153 +++++++++++++++++++++------------------
 src/common/na-pivot.h           |    4 +-
 src/nact/nact-main-window.c     |   17 +++++
 11 files changed, 155 insertions(+), 104 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 41567e4..94ded93 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -4,8 +4,26 @@
 	* src/common/na-iduplicable.c (na_iduplicable_dispose): New function.
 	Rewrite signal logic to avoid having to override class handler.
 
+	* src/common/na-gconf-monitor.c:
+	* src/common/na-gconf-monitor.h:
+	Embeds its own GConfClient.
+
+	* src/common/na-gconf-provider.c:
+	No more provide GConfClient from GConf provider.
+
+	* src/common/na-iio-provider.h:
+	No more define signals for preferences management.
+
+	* src/common/na-ipivot-consumer.c:
+	* src/common/na-ipivot-consumer.h:
+	Rename IPivotConsumer notification functions.
+
 	* src/common/na-object.c: Call na_iduplicable_dispose().
 
+	* src/common/na-pivot.c:
+	No more define signals for preferences management.
+	Move monitors from GSList to GList.
+
 	* src/nact/base-builder.c:
 	* src/nact/base-builder.h: New files.
 
diff --git a/src/common/na-gconf-monitor.c b/src/common/na-gconf-monitor.c
index 9043b91..9a24179 100644
--- a/src/common/na-gconf-monitor.c
+++ b/src/common/na-gconf-monitor.c
@@ -182,19 +182,18 @@ instance_finalize( GObject *object )
  * Initializes the monitoring of a GConf path.
  */
 NAGConfMonitor *
-na_gconf_monitor_new( GConfClient *client, const gchar *path, gint preload, GConfClientNotifyFunc handler, gpointer user_data )
+na_gconf_monitor_new( const gchar *path, GConfClientNotifyFunc handler, gpointer user_data )
 {
 	static const gchar *thisfn = "na_gconf_monitor_new";
 	NAGConfMonitor *monitor;
 
-	g_debug( "%s: client=%p, path=%s, preload=%d, user_data=%p",
-			thisfn, ( void * ) client, path, preload, ( void * ) user_data );
+	g_debug( "%s: path=%s, user_data=%p", thisfn, path, ( void * ) user_data );
 
 	monitor = g_object_new( NA_GCONF_MONITOR_TYPE, NULL );
 
-	monitor->private->gconf = client;
+	monitor->private->gconf = gconf_client_get_default();
 	monitor->private->path = g_strdup( path );
-	monitor->private->preload = preload;
+	monitor->private->preload = GCONF_CLIENT_PRELOAD_RECURSIVE;
 	monitor->private->handler = handler;
 	monitor->private->user_data = user_data;
 
@@ -278,4 +277,6 @@ release_monitor( NAGConfMonitor *monitor )
 		g_warning( "%s: path=%s, error=%s", thisfn, monitor->private->path, error->message );
 		g_error_free( error );
 	}
+
+	g_object_unref( monitor->private->gconf );
 }
diff --git a/src/common/na-gconf-monitor.h b/src/common/na-gconf-monitor.h
index 096cd36..b597f31 100644
--- a/src/common/na-gconf-monitor.h
+++ b/src/common/na-gconf-monitor.h
@@ -68,7 +68,7 @@ typedef struct {
 
 GType           na_gconf_monitor_get_type( void );
 
-NAGConfMonitor *na_gconf_monitor_new( GConfClient *client, const gchar *path, gint preload, GConfClientNotifyFunc handler, gpointer user_data );
+NAGConfMonitor *na_gconf_monitor_new( const gchar *path, GConfClientNotifyFunc handler, gpointer user_data );
 
 void            na_gconf_monitor_release_monitors( GList *monitors );
 
diff --git a/src/common/na-gconf-provider.c b/src/common/na-gconf-provider.c
index 0608908..c1f87f5 100644
--- a/src/common/na-gconf-provider.c
+++ b/src/common/na-gconf-provider.c
@@ -246,7 +246,7 @@ instance_finalize( GObject *object )
  * Allocates a new #NAGConfProvider object.
  *
  * The specified #NAPivot object will receive a
- * "notify_pivot_of_action_changed" message for each detected
+ * "notify-consumer-of-action-change" message for each detected
  * modification, with a pointer to a newly allocated #NAPivotNotify
  * structure describing the change.
  */
@@ -282,13 +282,10 @@ install_monitors( NAGConfProvider *provider )
 	 * actions and profiles definitions
 	 */
 	list = g_list_prepend( list,
-
 			na_gconf_monitor_new(
-					provider->private->gconf,
 					NA_GCONF_CONFIG_PATH,
-					GCONF_CLIENT_PRELOAD_RECURSIVE,
 					( GConfClientNotifyFunc ) config_path_changed_cb,
-					provider));
+					provider ));
 
 	provider->private->monitors = list;
 }
diff --git a/src/common/na-gconf-provider.h b/src/common/na-gconf-provider.h
index 78f7adf..86b64a3 100644
--- a/src/common/na-gconf-provider.h
+++ b/src/common/na-gconf-provider.h
@@ -32,17 +32,17 @@
 #define __NA_GCONF_PROVIDER_H__
 
 /**
- * SECTION: na_gconf_provider_provider
- * @short_description: #NAGConfProviderProvider class definition.
+ * SECTION: na_gconf_provider
+ * @short_description: #NAGConfProvider class definition.
  * @include: common/na-gconf-provider.h
  *
  * This class manages the GConf I/O storage subsystem, or, in other words,
  * the GConf subsystem as an NAIIOProvider. As this, it should only be
  * used through the NAIIOProvider interface.
  *
- * #NAGConfProviderProvider monitors the configuration tree. When something is
- * modified, it sends the appropriate signal to the #NAPivot object it
- * was created against.
+ * #NAGConfProvider uses NAGConfMonitor to watch at the configuration
+ * tree. When something is modified, it sends the appropriate signal to
+ * the #NAPivot object it was created against.
  */
 
 #include "na-pivot.h"
diff --git a/src/common/na-iio-provider.h b/src/common/na-iio-provider.h
index 5f81ac4..c535243 100644
--- a/src/common/na-iio-provider.h
+++ b/src/common/na-iio-provider.h
@@ -130,15 +130,12 @@ typedef struct {
 GType  na_iio_provider_get_type( void );
 
 GList *na_iio_provider_get_items_tree( const NAPivot *pivot );
-/*GSList *na_iio_provider_sort_tree( const NAPivot *pivot, GSList *tree );*/
 guint  na_iio_provider_write_item( const NAPivot *pivot, NAObject *item, gchar **message );
 guint  na_iio_provider_delete_item( const NAPivot *pivot, const NAObject *item, gchar **message );
 
-/* modification notification message to NAPivot
+/* notification message to NAPivot
  */
 #define NA_IIO_PROVIDER_SIGNAL_ACTION_CHANGED			"notify-consumer-of-action-change"
-#define NA_IIO_PROVIDER_SIGNAL_DISPLAY_ORDER_CHANGED	"notify-consumer-of-display-order-change"
-#define NA_IIO_PROVIDER_SIGNAL_DISPLAY_ABOUT_CHANGED	"notify-consumer-of-display-about-change"
 
 /* return code of update/write/delete operations
  */
diff --git a/src/common/na-ipivot-consumer.c b/src/common/na-ipivot-consumer.c
index 10b1118..0a8e08f 100644
--- a/src/common/na-ipivot-consumer.c
+++ b/src/common/na-ipivot-consumer.c
@@ -158,14 +158,14 @@ na_ipivot_consumer_delay_notify( NAIPivotConsumer *instance )
 }
 
 /**
- * na_ipivot_consumer_notify:
+ * na_ipivot_consumer_notify_actions_changed:
  * @instance: the #NAIPivotConsumer instance to be notified of the end
  * of the modifications.
  *
  * Notifies the consumers that the actions have been modified on one of
  * the underlying storage subsystems.
  */
-void na_ipivot_consumer_notify( NAIPivotConsumer *instance )
+void na_ipivot_consumer_notify_actions_changed( NAIPivotConsumer *instance )
 {
 	static const gchar *thisfn = "na_ipivot_consumer_notify";
 
@@ -185,27 +185,30 @@ void na_ipivot_consumer_notify( NAIPivotConsumer *instance )
 }
 
 /**
- * na_ipivot_consumer_notify:
+ * na_ipivot_consumer_notify_of_display_order_change:
  * @instance: the #NAIPivotConsumer instance to be notified of the end
  * of the modifications.
  *
  * Notifies the consumers that the display order has been changed.
  */
 void
-na_ipivot_consumer_notify_display_order_change( NAIPivotConsumer *instance )
+na_ipivot_consumer_notify_of_display_order_change( NAIPivotConsumer *instance )
 {
 	g_return_if_fail( NA_IS_IPIVOT_CONSUMER( instance ));
 
 	if( st_initialized && !st_finalized ){
 
-		if( NA_IPIVOT_CONSUMER_GET_INTERFACE( instance )->on_display_order_changed ){
-			NA_IPIVOT_CONSUMER_GET_INTERFACE( instance )->on_display_order_changed( instance, NULL );
+		if( is_notify_allowed( instance )){
+
+			if( NA_IPIVOT_CONSUMER_GET_INTERFACE( instance )->on_display_order_changed ){
+				NA_IPIVOT_CONSUMER_GET_INTERFACE( instance )->on_display_order_changed( instance, NULL );
+			}
 		}
 	}
 }
 
 /**
- * na_ipivot_consumer_notify:
+ * na_ipivot_consumer_notify_of_display_about_change:
  * @instance: the #NAIPivotConsumer instance to be notified of the end
  * of the modifications.
  *
@@ -213,14 +216,17 @@ na_ipivot_consumer_notify_display_order_change( NAIPivotConsumer *instance )
  * item in the Nautilus context menu has been changed.
  */
 void
-na_ipivot_consumer_notify_display_about_change( NAIPivotConsumer *instance )
+na_ipivot_consumer_notify_of_display_about_change( NAIPivotConsumer *instance )
 {
 	g_return_if_fail( NA_IS_IPIVOT_CONSUMER( instance ));
 
 	if( st_initialized && !st_finalized ){
 
-		if( NA_IPIVOT_CONSUMER_GET_INTERFACE( instance )->on_display_about_changed ){
-			NA_IPIVOT_CONSUMER_GET_INTERFACE( instance )->on_display_about_changed( instance, NULL );
+		if( is_notify_allowed( instance )){
+
+			if( NA_IPIVOT_CONSUMER_GET_INTERFACE( instance )->on_display_about_changed ){
+				NA_IPIVOT_CONSUMER_GET_INTERFACE( instance )->on_display_about_changed( instance, NULL );
+			}
 		}
 	}
 }
diff --git a/src/common/na-ipivot-consumer.h b/src/common/na-ipivot-consumer.h
index 5d27b3b..991271b 100644
--- a/src/common/na-ipivot-consumer.h
+++ b/src/common/na-ipivot-consumer.h
@@ -101,9 +101,9 @@ GType na_ipivot_consumer_get_type( void );
 
 void  na_ipivot_consumer_delay_notify( NAIPivotConsumer *instance );
 
-void  na_ipivot_consumer_notify( NAIPivotConsumer *instance );
-void  na_ipivot_consumer_notify_display_order_change( NAIPivotConsumer *instance );
-void  na_ipivot_consumer_notify_display_about_change( NAIPivotConsumer *instance );
+void  na_ipivot_consumer_notify_actions_changed( NAIPivotConsumer *instance );
+void  na_ipivot_consumer_notify_of_display_order_change( NAIPivotConsumer *instance );
+void  na_ipivot_consumer_notify_of_display_about_change( NAIPivotConsumer *instance );
 
 G_END_DECLS
 
diff --git a/src/common/na-pivot.c b/src/common/na-pivot.c
index b7e1dff..5cb13cc 100644
--- a/src/common/na-pivot.c
+++ b/src/common/na-pivot.c
@@ -38,6 +38,7 @@
 #include "na-object-api.h"
 #include "na-object-item-class.h"
 #include "na-iio-provider.h"
+#include "na-gconf-monitor.h"
 #include "na-gconf-provider.h"
 #include "na-iprefs.h"
 #include "na-pivot.h"
@@ -57,7 +58,7 @@ struct NAPivotPrivate {
 	/* list of instances to be notified of repository updates
 	 * these are called 'consumers' of NAPivot
 	 */
-	GSList  *consumers;
+	GList   *consumers;
 
 	/* list of NAIIOProvider interface providers
 	 * needs to be in the instance rather than in the class to be able
@@ -76,13 +77,14 @@ struct NAPivotPrivate {
 	 * defaults to FALSE
 	 */
 	gboolean automatic_reload;
+
+	/* list of monitoring objects on runtime preferences
+	 */
+	GList   *monitors;
 };
 
 enum {
 	ACTION_CHANGED,
-	LEVEL_ZERO_CHANGED,
-	DISPLAY_ORDER_CHANGED,
-	DISPLAY_ABOUT_CHANGED,
 	LAST_SIGNAL
 };
 
@@ -103,20 +105,20 @@ static void      instance_finalize( GObject *object );
 static NAObject *get_item_from_tree( const NAPivot *pivot, GList *tree, uuid_t uuid );
 
 /* NAIPivotConsumer management */
-static void      free_consumers( GSList *list );
+static void      free_consumers( GList *list );
 
 /* NAIIOProvider management */
 static void      register_io_providers( NAPivot *pivot );
-
-/* NAGConf runtime preferences management */
-static void      read_runtime_preferences( NAPivot *pivot );
-
 static void      action_changed_handler( NAPivot *pivot, gpointer user_data );
 static gboolean  on_actions_changed_timeout( gpointer user_data );
 static gulong    time_val_diff( const GTimeVal *recent, const GTimeVal *old );
 
-static void      on_display_order_change( NAPivot *pivot, gpointer user_data );
-static void      on_display_about_change( NAPivot *pivot, gpointer user_data );
+/* NAGConf runtime preferences management */
+static void      monitor_runtime_preferences( NAPivot *pivot );
+
+static void      on_preferences_change( GConfClient *client, guint cnxn_id, GConfEntry *entry, NAPivot *pivot );
+static void      display_order_changed( NAPivot *pivot );
+static void      display_about_changed( NAPivot *pivot );
 
 GType
 na_pivot_get_type( void )
@@ -193,32 +195,7 @@ class_init( NAPivotClass *klass )
 				g_cclosure_marshal_VOID__POINTER,
 				G_TYPE_NONE,
 				1,
-				G_TYPE_POINTER
-	);
-	st_signals[ DISPLAY_ORDER_CHANGED ] = g_signal_new_class_handler(
-				NA_IIO_PROVIDER_SIGNAL_DISPLAY_ORDER_CHANGED,
-				G_TYPE_FROM_CLASS( klass ),
-				G_SIGNAL_RUN_LAST | G_SIGNAL_NO_RECURSE | G_SIGNAL_NO_HOOKS,
-				( GCallback ) on_display_order_change,
-				NULL,
-				NULL,
-				g_cclosure_marshal_VOID__POINTER,
-				G_TYPE_NONE,
-				1,
-				G_TYPE_POINTER
-	);
-	st_signals[ DISPLAY_ABOUT_CHANGED ] = g_signal_new_class_handler(
-				NA_IIO_PROVIDER_SIGNAL_DISPLAY_ABOUT_CHANGED,
-				G_TYPE_FROM_CLASS( klass ),
-				G_SIGNAL_RUN_LAST | G_SIGNAL_NO_RECURSE | G_SIGNAL_NO_HOOKS,
-				( GCallback ) on_display_about_change,
-				NULL,
-				NULL,
-				g_cclosure_marshal_VOID__POINTER,
-				G_TYPE_NONE,
-				1,
-				G_TYPE_POINTER
-	);
+				G_TYPE_POINTER );
 }
 
 static void
@@ -274,6 +251,9 @@ instance_dispose( GObject *object )
 		na_object_free_items( self->private->tree );
 		self->private->tree = NULL;
 
+		/* release the GConf monitoring */
+		na_gconf_monitor_release_monitors( self->private->monitors );
+
 		/* chain up to the parent class */
 		if( G_OBJECT_CLASS( st_parent_class )->dispose ){
 			G_OBJECT_CLASS( st_parent_class )->dispose( object );
@@ -306,8 +286,9 @@ instance_finalize( GObject *object )
  *
  * Allocates a new #NAPivot object.
  *
- * The target object will receive a "notify_nautilus_of_action_changed"
- * message, without any parameter.
+ * The target object should implement NAIPivotConsumer interface.
+ * It will be triggered on changes on IIOProviders and runtime
+ * preferences.
  */
 NAPivot *
 na_pivot_new( const NAIPivotConsumer *target )
@@ -326,7 +307,7 @@ na_pivot_new( const NAIPivotConsumer *target )
 		na_pivot_register_consumer( pivot, target );
 	}
 
-	read_runtime_preferences( pivot );
+	monitor_runtime_preferences( pivot );
 
 	pivot->private->tree = na_iio_provider_get_items_tree( pivot );
 
@@ -348,7 +329,7 @@ na_pivot_dump( const NAPivot *pivot )
 
 	if( !pivot->private->dispose_has_run ){
 
-		g_debug( "%s: consumers=%p (%d elts)", thisfn, ( void * ) pivot->private->consumers, g_slist_length( pivot->private->consumers ));
+		g_debug( "%s: consumers=%p (%d elts)", thisfn, ( void * ) pivot->private->consumers, g_list_length( pivot->private->consumers ));
 		g_debug( "%s: providers=%p (%d elts)", thisfn, ( void * ) pivot->private->providers, g_slist_length( pivot->private->providers ));
 		g_debug( "%s:      tree=%p (%d elts)", thisfn, ( void * ) pivot->private->tree, g_list_length( pivot->private->tree ));
 
@@ -606,7 +587,7 @@ na_pivot_register_consumer( NAPivot *pivot, const NAIPivotConsumer *consumer )
 	g_return_if_fail( NA_IS_IPIVOT_CONSUMER( consumer ));
 
 	if( !pivot->private->dispose_has_run ){
-		pivot->private->consumers = g_slist_prepend( pivot->private->consumers, ( gpointer ) consumer );
+		pivot->private->consumers = g_list_prepend( pivot->private->consumers, ( gpointer ) consumer );
 	}
 }
 
@@ -682,10 +663,10 @@ get_item_from_tree( const NAPivot *pivot, GList *tree, uuid_t uuid )
 }
 
 static void
-free_consumers( GSList *consumers )
+free_consumers( GList *consumers )
 {
-	/*g_slist_foreach( consumers, ( GFunc ) g_object_unref, NULL );*/
-	g_slist_free( consumers );
+	/*g_list_foreach( consumers, ( GFunc ) g_object_unref, NULL );*/
+	g_list_free( consumers );
 }
 
 /*
@@ -711,12 +692,6 @@ register_io_providers( NAPivot *pivot )
 	pivot->private->providers = list;
 }
 
-static void
-read_runtime_preferences( NAPivot *pivot )
-{
-	/*pivot->private->gconf = na_gconf_new();*/
-}
-
 /*
  * this handler is trigerred by IIOProviders when an action is changed
  * in the underlying storage subsystems
@@ -762,7 +737,7 @@ on_actions_changed_timeout( gpointer user_data )
 	GTimeVal now;
 	NAPivot *pivot;
 	gulong diff;
-	GSList *ic;
+	GList *ic;
 
 	g_return_val_if_fail( NA_IS_PIVOT( user_data ), FALSE );
 	pivot = NA_PIVOT( user_data );
@@ -778,7 +753,7 @@ on_actions_changed_timeout( gpointer user_data )
 	}
 
 	for( ic = pivot->private->consumers ; ic ; ic = ic->next ){
-		na_ipivot_consumer_notify( NA_IPIVOT_CONSUMER( ic->data ));
+		na_ipivot_consumer_notify_actions_changed( NA_IPIVOT_CONSUMER( ic->data ));
 	}
 
 	st_event_source_id = 0;
@@ -835,34 +810,74 @@ na_pivot_free_notify( NAPivotNotify *npn )
 }
 
 static void
-on_display_order_change( NAPivot *self, gpointer user_data  )
+monitor_runtime_preferences( NAPivot *pivot )
 {
-	static const gchar *thisfn = "na_pivot_on_display_order_change";
-	GSList *ic;
+	GList *list = NULL;
 
-	g_debug( "%s: self=%p, data=%p", thisfn, ( void * ) self, ( void * ) user_data );
-	g_assert( NA_IS_PIVOT( self ));
-	g_assert( user_data );
+	g_return_if_fail( NA_IS_PIVOT( pivot ));
+	g_return_if_fail( !pivot->private->dispose_has_run );
 
-	if( self->private->dispose_has_run ){
-		return;
+	list = g_list_prepend( list,
+			na_gconf_monitor_new(
+					NA_GCONF_PREFS_PATH,
+					( GConfClientNotifyFunc ) on_preferences_change,
+					pivot ));
+
+	pivot->private->monitors = list;
+}
+
+static void
+on_preferences_change( GConfClient *client, guint cnxn_id, GConfEntry *entry, NAPivot *pivot )
+{
+	const gchar *key;
+	gchar *key_entry;
+
+	g_return_if_fail( NA_IS_PIVOT( pivot ));
+
+	key = gconf_entry_get_key( entry );
+	key_entry = na_utils_path_extract_last_dir( key );
+
+	if( !g_ascii_strcasecmp( key_entry, PREFS_ADD_ABOUT_ITEM )){
+		display_about_changed( pivot );
 	}
 
-	for( ic = self->private->consumers ; ic ; ic = ic->next ){
-		na_ipivot_consumer_notify( NA_IPIVOT_CONSUMER( ic->data ));
+	if( !g_ascii_strcasecmp( key_entry, PREFS_DISPLAY_ALPHABETICAL_ORDER )){
+		display_order_changed( pivot );
 	}
+
+	g_free( key_entry );
 }
 
 static void
-on_display_about_change( NAPivot *self, gpointer user_data  )
+display_order_changed( NAPivot *pivot )
 {
 	static const gchar *thisfn = "na_pivot_on_display_order_change";
+	GList *ic;
 
-	g_debug( "%s: self=%p, data=%p", thisfn, ( void * ) self, ( void * ) user_data );
-	g_assert( NA_IS_PIVOT( self ));
-	g_assert( user_data );
+	g_debug( "%s: pivot=%p", thisfn, ( void * ) pivot );
+	g_assert( NA_IS_PIVOT( pivot ));
 
-	if( self->private->dispose_has_run ){
-		return;
+	if( !pivot->private->dispose_has_run ){
+
+		for( ic = pivot->private->consumers ; ic ; ic = ic->next ){
+			na_ipivot_consumer_notify_of_display_order_change( NA_IPIVOT_CONSUMER( ic->data ));
+		}
+	}
+}
+
+static void
+display_about_changed( NAPivot *pivot )
+{
+	static const gchar *thisfn = "na_pivot_on_display_order_change";
+	GList *ic;
+
+	g_debug( "%s: pivot=%p", thisfn, ( void * ) pivot );
+	g_assert( NA_IS_PIVOT( pivot ));
+
+	if( !pivot->private->dispose_has_run ){
+
+		for( ic = pivot->private->consumers ; ic ; ic = ic->next ){
+			na_ipivot_consumer_notify_of_display_order_change( NA_IPIVOT_CONSUMER( ic->data ));
+		}
 	}
 }
diff --git a/src/common/na-pivot.h b/src/common/na-pivot.h
index fbc9ba7..d02ecba 100644
--- a/src/common/na-pivot.h
+++ b/src/common/na-pivot.h
@@ -50,8 +50,8 @@
  * This notification system is so a double-stage one :
  *
  * 1. When an I/O storage subsystem detects a change on an action, it
- *    should emit the "notify_pivot_of_action_changed" signal to notify
- *    #NAPivot of this change. The user data associated with the
+ *    should emit the "notify-consumer-of-action-change" signal to
+ *    notify #NAPivot of this change. The user data associated with the
  *    message should be a #gpointer to a #NAPivotNotify structure.
  *
  *    When this signal is received, #NAPivot updates accordingly the
diff --git a/src/nact/nact-main-window.c b/src/nact/nact-main-window.c
index edc2022..ce652e8 100644
--- a/src/nact/nact-main-window.c
+++ b/src/nact/nact-main-window.c
@@ -148,6 +148,7 @@ static void     on_tab_updatable_item_updated( NactMainWindow *window, gpointer
 static gboolean confirm_for_giveup_from_menu( NactMainWindow *window );
 static gboolean confirm_for_giveup_from_pivot( NactMainWindow *window );
 static void     ipivot_consumer_on_actions_changed( NAIPivotConsumer *instance, gpointer user_data );
+static void     ipivot_consumer_on_display_about_changed( NAIPivotConsumer *instance, gpointer user_data );
 static void     ipivot_consumer_on_display_order_changed( NAIPivotConsumer *instance, gpointer user_data );
 static void     reload( NactMainWindow *window );
 
@@ -381,6 +382,7 @@ ipivot_consumer_iface_init( NAIPivotConsumerInterface *iface )
 	g_debug( "%s: iface=%p", thisfn, ( void * ) iface );
 
 	iface->on_actions_changed = ipivot_consumer_on_actions_changed;
+	iface->on_display_about_changed = ipivot_consumer_on_display_about_changed;
 	iface->on_display_order_changed = ipivot_consumer_on_display_order_changed;
 }
 
@@ -1104,6 +1106,21 @@ reload( NactMainWindow *window )
 
 /*
  * called by NAPivot via NAIPivotConsumer whenever the
+ * "display 'about' item" preference is modified.
+ */
+static void
+ipivot_consumer_on_display_about_changed( NAIPivotConsumer *instance, gpointer user_data )
+{
+	static const gchar *thisfn = "nact_main_window_ipivot_consumer_on_display_about_changed";
+	/*NactMainWindow *self;*/
+
+	g_debug( "%s: instance=%p, user_data=%p", thisfn, ( void * ) instance, ( void * ) user_data );
+	g_assert( NACT_IS_MAIN_WINDOW( instance ));
+	/*self = NACT_MAIN_WINDOW( instance );*/
+}
+
+/*
+ * called by NAPivot via NAIPivotConsumer whenever the
  * "sort in alphabetical order" preference is modified.
  */
 static void



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