[nautilus] slot: don't ref the NautilusWindowSlot when setting floating bar timeout



commit ab5077e0bce77af4cad87a20fec8099e3db0bcc0
Author: Michael Terry <michael terry canonical com>
Date:   Mon Mar 5 12:01:29 2012 -0500

    slot: don't ref the NautilusWindowSlot when setting floating bar timeout
    
    We cancel the timeout on destruction already, and if a destroy event
    happens in between the timeout, this would break the assumption in
    NautilusWindowPane that all its slots were removed during its
    destruction.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=670591

 src/nautilus-window-slot.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)
---
diff --git a/src/nautilus-window-slot.c b/src/nautilus-window-slot.c
index 69ccebf..b8635f9 100644
--- a/src/nautilus-window-slot.c
+++ b/src/nautilus-window-slot.c
@@ -501,7 +501,6 @@ set_status_data_free (gpointer data)
 	SetStatusData *status_data = data;
 
 	g_free (status_data->status);
-	g_object_unref (status_data->slot);
 
 	g_slice_free (SetStatusData, data);
 }
@@ -537,7 +536,7 @@ set_floating_bar_status (NautilusWindowSlot *slot,
 
 	status_data = g_slice_new0 (SetStatusData);
 	status_data->status = g_strdup (status);
-	status_data->slot = g_object_ref (slot);
+	status_data->slot = slot;
 
 	/* waiting for half of the double-click-time before setting
 	 * the status seems to be a good approximation of not setting it



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