[nautilus/gnome-3-20] window: use slot location instead of loading



commit f9a130e2c68d878919d7ff3eea3e125975112d24
Author: Carlos Soriano <csoriano gnome org>
Date:   Mon Feb 22 10:55:16 2016 +0100

    window: use slot location instead of loading
    
    We were changing the location of the sidebar every time the slot started
    loading.
    However, that's dangerous since the slot can start loading few times
    even with the old location.
    
    Instead of using the loading property, use the location property and
    change the sidebar only when the location actually changes on the slot.
    
    This fixes the sidebar jumping rows with gtk+ 3.20.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=762137

 src/nautilus-window.c |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/src/nautilus-window.c b/src/nautilus-window.c
index ca565f8..7082266 100644
--- a/src/nautilus-window.c
+++ b/src/nautilus-window.c
@@ -481,9 +481,9 @@ on_location_changed (NautilusWindow *window)
 }
 
 static void
-on_slot_loading_changed (NautilusWindowSlot *slot,
-                         GParamSpec         *pspec,
-                         NautilusWindow     *window)
+on_slot_location_changed (NautilusWindowSlot *slot,
+                          GParamSpec         *pspec,
+                          NautilusWindow     *window)
 {
         if (nautilus_window_get_active_slot (window) == slot)
                 on_location_changed (window);
@@ -513,8 +513,8 @@ static void
 connect_slot (NautilusWindow     *window,
               NautilusWindowSlot *slot)
 {
-        g_signal_connect (slot, "notify::loading",
-                          G_CALLBACK (on_slot_loading_changed), window);
+        g_signal_connect (slot, "notify::location",
+                          G_CALLBACK (on_slot_location_changed), window);
 }
 
 static void


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