[nautilus-actions] Radio buttons are inconsistent if and only if there is no context



commit b6774052b303bc5449436eecb282e496595b82f3
Author: Pierre Wieser <pwieser trychlos org>
Date:   Thu Jun 24 17:23:18 2010 +0200

    Radio buttons are inconsistent if and only if there is no context

 ChangeLog                        |    4 ++++
 src/nact/nact-ienvironment-tab.c |    2 +-
 src/nact/nact-iexecution-tab.c   |    4 +++-
 3 files changed, 8 insertions(+), 2 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index be3a062..44e8eeb 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2010-06-23 Pierre Wieser <pwieser trychlos org>
 
+	* src/nact/nact-ienvironment-tab.c (on_tab_updatable_selection_changed):
+	* src/nact/nact-iexecution-tab.c (on_tab_updatable_selection_changed):
+	Radio buttons are inconsistent if and only if there is no context.
+
 	* src/nact/nact-tree-model.c (dump_store): Also dumps origin.
 
 	* src/core/na-updater.c (na_updater_remove_item):
diff --git a/src/nact/nact-ienvironment-tab.c b/src/nact/nact-ienvironment-tab.c
index 21be8c5..5d25448 100644
--- a/src/nact/nact-ienvironment-tab.c
+++ b/src/nact/nact-ienvironment-tab.c
@@ -450,6 +450,7 @@ on_tab_updatable_selection_changed( NactIEnvironmentTab *instance, gint count_se
 
 		desktops = context ? na_object_get_only_show_in( context ) : NULL;
 		listview = GTK_TREE_VIEW( base_window_get_widget( BASE_WINDOW( instance ), "EnvironmentsDesktopTreeView" ));
+		gtk_toggle_button_set_inconsistent( GTK_TOGGLE_BUTTON( always_button ), context == NULL );
 
 		if( desktops && g_slist_length( desktops )){
 			gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( show_button ), TRUE );
@@ -464,7 +465,6 @@ on_tab_updatable_selection_changed( NactIEnvironmentTab *instance, gint count_se
 
 			} else {
 				gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( always_button ), context != NULL );
-				gtk_toggle_button_set_inconsistent( GTK_TOGGLE_BUTTON( always_button ), context == NULL );
 				gtk_widget_set_sensitive( GTK_WIDGET( listview ), FALSE );
 				desktops = NULL;
 			}
diff --git a/src/nact/nact-iexecution-tab.c b/src/nact/nact-iexecution-tab.c
index e922cb8..a97be8f 100644
--- a/src/nact/nact-iexecution-tab.c
+++ b/src/nact/nact-iexecution-tab.c
@@ -305,9 +305,10 @@ on_tab_updatable_selection_changed( NactIExecutionTab *instance, gint count_sele
 		nact_gtk_utils_set_editable( GTK_OBJECT( display_toggle ), editable );
 
 		mode = profile ? na_object_get_execution_mode( profile ) : g_strdup( "Normal" );
+		gtk_toggle_button_set_inconsistent( GTK_TOGGLE_BUTTON( normal_toggle ), profile == NULL );
+
 		if( !strcmp( mode, "Normal" )){
 			gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( normal_toggle ), TRUE );
-			gtk_toggle_button_set_inconsistent( GTK_TOGGLE_BUTTON( normal_toggle ), profile == NULL );
 		} else if( !strcmp( mode, "Terminal" )){
 			gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( terminal_toggle ), TRUE );
 		} else if( !strcmp( mode, "Embedded" )){
@@ -317,6 +318,7 @@ on_tab_updatable_selection_changed( NactIExecutionTab *instance, gint count_sele
 		} else {
 			g_warning( "%s: unable to setup execution mode '%s'", thisfn, mode );
 		}
+
 		g_free( mode );
 
 		notify = profile ? na_object_get_startup_notify( profile ) : FALSE;



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