[nautilus/wip/csoriano/search-popover: 35/43] files-view: don't remove floating bar in an idle



commit 8f5571b7a9b19d7fd11dc45f04d5ab4582767b72
Author: Carlos Soriano <csoriano gnome org>
Date:   Mon Feb 1 12:45:44 2016 +0100

    files-view: don't remove floating bar in an idle
    
    If the view is still loading.
    
    This happens when we schedule an idle to update the selection info
    to display it in the floating bar, but selection becomes null.
    Then the idle callback will remove the floating bar because the status
    is none.
    
    But that is wrong, because the floating bar is used for more than to
    display the selection. We use it for displaying whether the view is
    loading or searching, so if that happens we were removing the floating
    bar.
    
    To fix it, check in the idle callback for the other use case of the
    floating bar, that means if it's still loading, and do nothing in that
    case since that is taken care in a different code path.

 src/nautilus-files-view.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/src/nautilus-files-view.c b/src/nautilus-files-view.c
index e6058b0..cb89274 100644
--- a/src/nautilus-files-view.c
+++ b/src/nautilus-files-view.c
@@ -458,8 +458,12 @@ real_floating_bar_set_short_status (NautilusFilesView *view,
 {
         gboolean disable_chrome;
 
+        if (view->details->loading)
+          return;
+
         nautilus_floating_bar_cleanup_actions (NAUTILUS_FLOATING_BAR (view->details->floating_bar));
-        nautilus_floating_bar_set_show_spinner (NAUTILUS_FLOATING_BAR (view->details->floating_bar), 
view->details->loading);
+        nautilus_floating_bar_set_show_spinner (NAUTILUS_FLOATING_BAR (view->details->floating_bar),
+                                                FALSE);
 
         g_object_get (nautilus_files_view_get_window (view),
                       "disable-chrome", &disable_chrome,


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