[nautilus] Make stop and reload orthogonal



commit b69528fb501a1fe86ab4efa47320c055133e950c
Author: William Jon McCann <jmccann redhat com>
Date:   Mon Jul 2 11:49:47 2012 -0400

    Make stop and reload orthogonal
    
    Don't show stop when it is ineffective and don't show reload
    when stop needs to be shown.

 src/nautilus-window.c |   14 +++++++++-----
 1 files changed, 9 insertions(+), 5 deletions(-)
---
diff --git a/src/nautilus-window.c b/src/nautilus-window.c
index a35c070..99e1107 100644
--- a/src/nautilus-window.c
+++ b/src/nautilus-window.c
@@ -563,19 +563,23 @@ void
 nautilus_window_sync_allow_stop (NautilusWindow *window,
 				 NautilusWindowSlot *slot)
 {
-	GtkAction *action;
+	GtkAction *stop_action;
+	GtkAction *reload_action;
 	gboolean allow_stop, slot_is_active;
 
-	action = gtk_action_group_get_action (nautilus_window_get_main_action_group (window),
-					      NAUTILUS_ACTION_STOP);
-	allow_stop = gtk_action_get_sensitive (action);
+	stop_action = gtk_action_group_get_action (nautilus_window_get_main_action_group (window),
+						   NAUTILUS_ACTION_STOP);
+	reload_action = gtk_action_group_get_action (nautilus_window_get_main_action_group (window),
+						     NAUTILUS_ACTION_RELOAD);
+	allow_stop = gtk_action_get_sensitive (stop_action);
 
 	slot_is_active = (slot == nautilus_window_get_active_slot (window));
 
 	if (!slot_is_active ||
 	    allow_stop != slot->allow_stop) {
 		if (slot_is_active) {
-			gtk_action_set_sensitive (action, slot->allow_stop);
+			gtk_action_set_visible (stop_action, slot->allow_stop);
+			gtk_action_set_visible (reload_action, !slot->allow_stop);
 		}
 
 		if (gtk_widget_get_realized (GTK_WIDGET (window))) {



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