[nautilus] view: allow copying, and not cutting, from Recent Files



commit b61e1d03b42723e13cf7dd05a26c9bd92dbac0ce
Author: Cosimo Cecchi <cosimoc gnome org>
Date:   Wed Apr 3 18:08:09 2013 -0400

    view: allow copying, and not cutting, from Recent Files
    
    Previously, we enabled the Cut action for the Recent location, and kept
    Copy and Copy To disabled. This should be the other way around, as
    copying a file from there is a valid option, whereas cutting/moving it
    doesn't make sense, being a virtual location.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=690138

 src/nautilus-view.c |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)
---
diff --git a/src/nautilus-view.c b/src/nautilus-view.c
index 6b1bed2..357da27 100644
--- a/src/nautilus-view.c
+++ b/src/nautilus-view.c
@@ -8386,6 +8386,7 @@ real_update_menus (NautilusView *view)
        gboolean selection_contains_recent;
        gboolean can_create_files;
        gboolean can_delete_files;
+       gboolean can_move_files;
        gboolean can_trash_files;
        gboolean can_copy_files;
        gboolean can_link_files;
@@ -8422,9 +8423,9 @@ real_update_menus (NautilusView *view)
                !selection_contains_special_link &&
                !selection_contains_desktop_or_home_dir;
        can_copy_files = selection_count != 0
-               && !selection_contains_recent
                && !selection_contains_special_link;
 
+       can_move_files = can_delete_files && !selection_contains_recent;
        can_link_files = can_create_files && can_copy_files;
 
        action = gtk_action_group_get_action (view->details->dir_action_group,
@@ -8717,7 +8718,7 @@ real_update_menus (NautilusView *view)
 
        action = gtk_action_group_get_action (view->details->dir_action_group,
                                              NAUTILUS_ACTION_CUT);
-       gtk_action_set_sensitive (action, can_delete_files);
+       gtk_action_set_sensitive (action, can_move_files);
        gtk_action_set_visible (action, !selection_contains_recent);
 
        action = gtk_action_group_get_action (view->details->dir_action_group,
@@ -8749,10 +8750,10 @@ real_update_menus (NautilusView *view)
        action = gtk_action_group_get_action (view->details->dir_action_group,
                                              NAUTILUS_ACTION_COPY_TO);
        gtk_action_set_sensitive (action, can_copy_files);
-       gtk_action_set_visible (action, !selection_contains_recent);
+
        action = gtk_action_group_get_action (view->details->dir_action_group,
                                              NAUTILUS_ACTION_MOVE_TO);
-       gtk_action_set_sensitive (action, can_delete_files);
+       gtk_action_set_sensitive (action, can_move_files);
        gtk_action_set_visible (action, !selection_contains_recent);
 
        action = gtk_action_group_get_action (view->details->dir_action_group, 
NAUTILUS_ACTION_SHOW_HIDDEN_FILES);


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