[nautilus] list-view: Stop GtkTreeView from performing select-all action



commit 507e96aadfaaa8bba6d7e6848ded18f47d466424
Author: Ujjwal Kumar <ujjwalkumar0501 gmail com>
Date:   Tue Apr 7 05:23:25 2020 +0530

    list-view: Stop GtkTreeView from performing select-all action
    
    It is required that select-all action (application wide) is disabled
    while directory is loading because otherwise inappropriate selection
    might happen.
    
    Luckily, we can connect to the signal binding and stop its emission
    on the instance.

 src/nautilus-list-view.c | 7 +++++++
 1 file changed, 7 insertions(+)
---
diff --git a/src/nautilus-list-view.c b/src/nautilus-list-view.c
index bce65ec53..2ac0890e5 100644
--- a/src/nautilus-list-view.c
+++ b/src/nautilus-list-view.c
@@ -2133,6 +2133,13 @@ create_and_set_up_tree_view (NautilusListView *view)
     view->details->drag_dest =
         nautilus_tree_view_drag_dest_new (view->details->tree_view);
 
+    /* Stop the tree view from performing select-all actions.
+     * It is desireable that the action is disabled while directory
+     * is loading.
+     */
+    g_signal_connect (view->details->tree_view, "select-all",
+                      G_CALLBACK (g_signal_stop_emission_by_name), "select-all");
+
     g_signal_connect_object (view->details->drag_dest,
                              "get-root-uri",
                              G_CALLBACK (get_root_uri_callback),


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