mirror of
https://gitlab.gnome.org/GNOME/nautilus
synced 2024-10-03 22:45:26 +00:00
window-slot: disconnect from model signals before stopping
Now that stopping the view also stops the model search, make sure we disconnect from its signals before, so we don't show the no search results because we got a done-loading with an empty directory because we stopped the search. We want to let the view with it's current items, even if the directory stopped to search and it cleared its files (and therefore it reports 0 files).
This commit is contained in:
parent
7e879ca49e
commit
9e1e14db2f
|
@ -1635,9 +1635,16 @@ cancel_location_change (NautilusWindowSlot *slot)
|
|||
{
|
||||
GList *selection;
|
||||
GFile *location;
|
||||
NautilusDirectory *directory;
|
||||
|
||||
location = nautilus_window_slot_get_location (slot);
|
||||
|
||||
directory = nautilus_directory_get (slot->details->location);
|
||||
disconnect_directory_signals (slot, directory);
|
||||
/* Stops current loading or search if any, so we are not slow */
|
||||
nautilus_view_stop_loading (slot->details->content_view);
|
||||
nautilus_directory_unref (directory);
|
||||
|
||||
if (slot->details->pending_location != NULL
|
||||
&& location != NULL
|
||||
&& slot->details->content_view != NULL) {
|
||||
|
@ -2715,8 +2722,6 @@ nautilus_window_slot_set_allow_stop (NautilusWindowSlot *slot,
|
|||
void
|
||||
nautilus_window_slot_stop_loading (NautilusWindowSlot *slot)
|
||||
{
|
||||
nautilus_view_stop_loading (slot->details->content_view);
|
||||
|
||||
|
||||
cancel_location_change (slot);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue