[nautilus-actions] Do not mark application as modified when list is empty
- From: Pierre Wieser <pwieser src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus-actions] Do not mark application as modified when list is empty
- Date: Wed, 16 Jun 2010 22:06:19 +0000 (UTC)
commit 9d92f142f529adc5aa9251a129686df2f65f51e4
Author: Pierre Wieser <pwieser trychlos org>
Date: Tue Jun 15 23:11:08 2010 +0200
Do not mark application as modified when list is empty
ChangeLog | 3 +++
src/nact/nact-main-window.c | 19 ++++++++++++++-----
2 files changed, 17 insertions(+), 5 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 42c80b0..70ee376 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
2010-06-15 Pierre Wieser <pwieser trychlos org>
+ * src/nact/nact-main-window.c:
+ Do not mark the application as modified when list is empty.
+
* src/nact/nact-iaction-tab.c:
* src/nact/nact-ibasenames-tab.c:
* src/nact/nact-icapabilities-tab.c:
diff --git a/src/nact/nact-main-window.c b/src/nact/nact-main-window.c
index 949f6df..1615a2c 100644
--- a/src/nact/nact-main-window.c
+++ b/src/nact/nact-main-window.c
@@ -1551,17 +1551,26 @@ static void
ipivot_consumer_on_display_order_changed( NAIPivotConsumer *instance, gint order_mode )
{
static const gchar *thisfn = "nact_main_window_ipivot_consumer_on_display_order_changed";
- /*NactMainWindow *self;*/
+ NactApplication *application;
+ NAUpdater *updater;
+ GList *tree;
+ g_return_if_fail( NACT_IS_MAIN_WINDOW( instance ));
g_debug( "%s: instance=%p, order_mode=%d", thisfn, ( void * ) instance, order_mode );
- g_assert( NACT_IS_MAIN_WINDOW( instance ));
- /*self = NACT_MAIN_WINDOW( instance );*/
nact_iactions_list_display_order_change( NACT_IACTIONS_LIST( instance ), order_mode );
nact_sort_buttons_display_order_change( NACT_MAIN_WINDOW( instance ), order_mode );
- g_signal_emit_by_name(
- NACT_MAIN_WINDOW( instance ), MAIN_WINDOW_SIGNAL_LEVEL_ZERO_ORDER_CHANGED, GINT_TO_POINTER( TRUE ));
+ application = NACT_APPLICATION( base_window_get_application( BASE_WINDOW( instance )));
+ updater = nact_application_get_updater( application );
+ tree = na_pivot_get_items( NA_PIVOT( updater ));
+
+ if( g_list_length( tree )){
+ g_signal_emit_by_name(
+ NACT_MAIN_WINDOW( instance ),
+ MAIN_WINDOW_SIGNAL_LEVEL_ZERO_ORDER_CHANGED,
+ GINT_TO_POINTER( TRUE ));
+ }
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]