[nautilus/wip/oholy/pattern-clear-selection] files-view: Clear selection if any files don't match the pattern



commit e04e1570c4542fb519514b68cf10006dc23c6d4a
Author: Ondrej Holy <oholy redhat com>
Date:   Wed Feb 26 12:56:39 2020 +0100

    files-view: Clear selection if any files don't match the pattern
    
    The Select items matching (Ctrl + S) feature allows to select files
    which match the pattern. However, it is confusing that current selection
    is not cleared when any files don't match the pattern.

 src/nautilus-files-view.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/src/nautilus-files-view.c b/src/nautilus-files-view.c
index 427ac08c5..7b31dfcd9 100644
--- a/src/nautilus-files-view.c
+++ b/src/nautilus-files-view.c
@@ -1718,12 +1718,12 @@ pattern_select_response_cb (GtkWidget *dialog,
             selection = nautilus_directory_match_pattern (directory,
                                                           gtk_entry_get_text (GTK_ENTRY (entry)));
 
+            nautilus_files_view_call_set_selection (view, selection);
+            nautilus_files_view_reveal_selection (view);
+
             if (selection)
             {
-                nautilus_files_view_call_set_selection (view, selection);
                 nautilus_file_list_free (selection);
-
-                nautilus_files_view_reveal_selection (view);
             }
             /* fall through */
         }


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