[nautilus-actions] display items count in the statusbar



commit acbeab7398f368c85f554af94baedd5b9f525067
Author: Pierre Wieser <pwieser trychlos org>
Date:   Sun Oct 18 02:59:43 2009 +0200

    display items count in the statusbar

 ChangeLog                    |    3 +++
 src/nact/nact-main-menubar.c |   14 ++++++++++----
 2 files changed, 13 insertions(+), 4 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 47d229b..e7ae1bd 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2009-10-17 Pierre Wieser <pwieser trychlos org>
 
+	* src/nact/nact-main-menubar.c (on_iactions_list_count_updated):
+	Display the count of items in the statusbar.
+
 	* src/nact/nact-iactions-list.c
 	(collapse_to_parent, expand_to_first_child):
 	Make left and right arrows accelerators to collapse/expand trees.
diff --git a/src/nact/nact-main-menubar.c b/src/nact/nact-main-menubar.c
index a03308a..02a2c8c 100644
--- a/src/nact/nact-main-menubar.c
+++ b/src/nact/nact-main-menubar.c
@@ -50,9 +50,10 @@
 #include "nact-main-tab.h"
 #include "nact-main-menubar.h"
 
-#define MENUBAR_PROP_STATUS_CONTEXT		"nact-menubar-status-context"
-#define MENUBAR_PROP_UI_MANAGER			"nact-menubar-ui-manager"
-#define MENUBAR_PROP_ACTIONS_GROUP		"nact-menubar-actions-group"
+#define MENUBAR_PROP_STATUS_CONTEXT			"nact-menubar-status-context"
+#define MENUBAR_PROP_MAIN_STATUS_CONTEXT	"nact-menubar-main-status-context"
+#define MENUBAR_PROP_UI_MANAGER				"nact-menubar-ui-manager"
+#define MENUBAR_PROP_ACTIONS_GROUP			"nact-menubar-actions-group"
 
 /* GtkActivatable
  * gtk_action_get_tooltip are only available starting with Gtk 2.16
@@ -65,7 +66,7 @@
 #endif
 
 #ifndef GTK_HAS_ACTIVATABLE
-#define MENUBAR_PROP_ITEM_ACTION		"nact-menubar-item-action"
+#define MENUBAR_PROP_ITEM_ACTION			"nact-menubar-item-action"
 #endif
 
 /* this structure is updated each time the user interacts in the
@@ -397,6 +398,7 @@ static void
 on_iactions_list_count_updated( NactMainWindow *window, gint menus, gint actions, gint profiles )
 {
 	MenubarIndicatorsStruct *mis;
+	gchar *status;
 
 	g_debug( "nact_main_menubar_on_iactions_list_count_updated: menus=%u, actions=%u, profiles=%u", menus, actions, profiles );
 	g_return_if_fail( NACT_IS_MAIN_WINDOW( window ));
@@ -407,6 +409,10 @@ on_iactions_list_count_updated( NactMainWindow *window, gint menus, gint actions
 	mis->list_profiles = profiles;
 	mis->have_exportables = ( mis->list_actions > 0 );
 
+	status = g_strdup_printf( _( " %d menus, %d actions, %d profiles are currently displayed" ), menus, actions, profiles );
+	nact_main_statusbar_display_status( window, MENUBAR_PROP_MAIN_STATUS_CONTEXT, status );
+	g_free( status );
+
 	g_signal_emit_by_name( window, MAIN_WINDOW_SIGNAL_UPDATE_ACTION_SENSITIVITIES, NULL );
 }
 



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