[nautilus/gnome-3-20] window-slot: fix condition for disconnecting old view



commit 4999304803ea3fdb223fc9093bbc4267b8e75564
Author: Carlos Soriano <csoriano gnome org>
Date:   Thu Apr 14 14:57:04 2016 +0200

    window-slot: fix condition for disconnecting old view
    
    We were checking for the new view instead of the old view...
    Needless to say that's wrong, and we were not disconnecting at all.
    
    It was not crashing because the view is disconnected when is going to be
    destroyed, so no more signals are done.
    
    However, when we were destroying the view, the view signals the
    end-loading signal, which forces the slot to free any change data, in
    middle of a change.
    
    "Luckely" thanks to all the safe checks in window slot, this was not
    crashing, but just misbehaving and not updating the window with the new
    view data.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=764981

 src/nautilus-window-slot.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/nautilus-window-slot.c b/src/nautilus-window-slot.c
index 5af90d6..129118b 100644
--- a/src/nautilus-window-slot.c
+++ b/src/nautilus-window-slot.c
@@ -2152,7 +2152,7 @@ nautilus_window_slot_connect_new_content_view (NautilusWindowSlot *slot)
 static void
 nautilus_window_slot_disconnect_content_view (NautilusWindowSlot *slot)
 {
-        if (slot->details->new_content_view && NAUTILUS_IS_FILES_VIEW (slot->details->new_content_view)) {
+        if (slot->details->content_view) {
                /* disconnect old view */
                 g_signal_handlers_disconnect_by_func (slot->details->content_view,
                                                       G_CALLBACK (view_is_loading_changed_cb),


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