[nautilus] nautilus-view: disable open with app for multiple selection



commit 52e534e1ee04dc08cd0fa48db83ade237bc5568a
Author: acgtyrant <acgtyrant gmail com>
Date:   Wed Mar 11 22:34:43 2015 +0800

    nautilus-view: disable open with app for multiple selection
    
    In 3.15.90, selecting two (or more) files and right-click > “Open with another
    application” silently fails to open the application-chooser dialog. So what we
    want here is hide that menu item when the selection is bigger than 1 item.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=745898
    
    Signed-off-by: acgtyrant <acgtyrant gmail com>

 src/nautilus-view.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/src/nautilus-view.c b/src/nautilus-view.c
index 777d29f..1e28f16 100644
--- a/src/nautilus-view.c
+++ b/src/nautilus-view.c
@@ -5987,7 +5987,8 @@ real_update_actions_state (NautilusView *view)
        /* Allow to select a different application to open the item */
        action = g_action_map_lookup_action (G_ACTION_MAP (view_action_group),
                                             "open-with-other-application");
-       g_simple_action_set_enabled (G_SIMPLE_ACTION (action), app != NULL);
+       g_simple_action_set_enabled (G_SIMPLE_ACTION (action),
+                                    app != NULL && selection_count == 1);
 
        action = g_action_map_lookup_action (G_ACTION_MAP (view_action_group),
                                             "open-item-new-tab");


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