Commit b69528fb authored by William Jon McCann's avatar William Jon McCann

Make stop and reload orthogonal

Don't show stop when it is ineffective and don't show reload
when stop needs to be shown.
parent 3c3d278f
......@@ -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))) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment