[nautilus/wip/antoniof/templates-submenu-fix] files-view: Hide Properties of Starred and Recent



commit 920e81f945c22f68a3edb045e379e33f68326020
Author: António Fernandes <antoniof gnome org>
Date:   Tue Aug 23 20:54:28 2022 +0100

    files-view: Hide Properties of Starred and Recent
    
    The Properties of these places are broken and unnecessary.
    
    Also, disable copying the URI of these locations, because it's also
    useless.

 src/nautilus-files-view.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/src/nautilus-files-view.c b/src/nautilus-files-view.c
index b05499759..e207046a3 100644
--- a/src/nautilus-files-view.c
+++ b/src/nautilus-files-view.c
@@ -7729,7 +7729,9 @@ real_update_actions_state (NautilusFilesView *view)
     action = g_action_map_lookup_action (G_ACTION_MAP (view_action_group),
                                          "copy-current-location");
     g_simple_action_set_enabled (G_SIMPLE_ACTION (action),
-                                 !selection_contains_search);
+                                 !selection_contains_recent &&
+                                 !selection_contains_search &&
+                                 !selection_contains_starred);
 
     /* Drive menu */
     show_mount = (selection != NULL);
@@ -7843,7 +7845,9 @@ real_update_actions_state (NautilusFilesView *view)
     action = g_action_map_lookup_action (G_ACTION_MAP (view_action_group),
                                          "current-directory-properties");
     g_simple_action_set_enabled (G_SIMPLE_ACTION (action),
-                                 !selection_contains_search);
+                                 !selection_contains_recent &&
+                                 !selection_contains_search &&
+                                 !selection_contains_starred);
 
     /* Actions that are related to the clipboard need request, request the data
      * and update them once we have the data */


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