[nautilus/wip/csoriano/search-popover: 17/40] search-directory: don't reload search



commit 7946134f731ff294a5f36e05530499c581c9b291
Author: Carlos Soriano <csoriano gnome org>
Date:   Wed Jan 27 20:52:57 2016 +0100

    search-directory: don't reload search
    
    I know that it looks like it makes sense, but don't do it :)
    
    Basically, all the logic for when a the query changes and to
    load a new search directory (and therefore reload) is done outside
    of the engines or the query. So basically don't touch it here.
    
    What I believe is that reload should start the search again, not only
    stop it and invalidate the file attributes of the search directory,
    because as you could see it actually stops the search but doesn't
    restart it.
    
    I think this change of logic that makes reload not work properly on all
    cases was introduced by me when I introduced the concept of restarting
    the search engine internally, not only start and stop.
    
    I will take a deeper look in future.

 libnautilus-private/nautilus-search-directory.c |    6 ------
 1 files changed, 0 insertions(+), 6 deletions(-)
---
diff --git a/libnautilus-private/nautilus-search-directory.c b/libnautilus-private/nautilus-search-directory.c
index 769de1d..b6c3ea6 100644
--- a/libnautilus-private/nautilus-search-directory.c
+++ b/libnautilus-private/nautilus-search-directory.c
@@ -946,16 +946,10 @@ nautilus_search_directory_set_query (NautilusSearchDirectory *search,
 
                g_clear_pointer (&search->details->binding, g_binding_unbind);
 
-                /* Disconnect from the previous query changes */
-                if (old_query) {
-                        g_signal_handlers_disconnect_by_func (old_query, search_force_reload, search);
-                }
-
                 if (query) {
                        search->details->binding = g_object_bind_property (search->details->engine, "running",
                                                                           query, "searching",
                                                                           G_BINDING_DEFAULT | 
G_BINDING_SYNC_CREATE);
-                        g_signal_connect_swapped (query, "notify", G_CALLBACK (search_force_reload), search);
                 }
 
                g_object_notify_by_pspec (G_OBJECT (search), properties[PROP_QUERY]);


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