[nautilus/gnome-3-0] places-sidebar: disconnect from bookmark list changed signal on dispose
- From: Cosimo Cecchi <cosimoc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus/gnome-3-0] places-sidebar: disconnect from bookmark list changed signal on dispose
- Date: Mon, 2 May 2011 03:50:00 +0000 (UTC)
commit 01ed53f313832d7e8b6395d47022741e94820d38
Author: Cosimo Cecchi <cosimoc gnome org>
Date: Sun May 1 18:52:55 2011 -0400
places-sidebar: disconnect from bookmark list changed signal on dispose
This should hopefully fix this crash
https://bugzilla.redhat.com/show_bug.cgi?id=699184
src/nautilus-places-sidebar.c | 15 ++++++++++++---
1 files changed, 12 insertions(+), 3 deletions(-)
---
diff --git a/src/nautilus-places-sidebar.c b/src/nautilus-places-sidebar.c
index 56216ab..aa08f14 100644
--- a/src/nautilus-places-sidebar.c
+++ b/src/nautilus-places-sidebar.c
@@ -97,6 +97,8 @@ typedef struct {
NautilusWindowOpenFlags go_to_after_mount_flags;
GtkTreePath *eject_highlight_path;
+
+ guint bookmarks_changed_id;
} NautilusPlacesSidebar;
typedef struct {
@@ -3248,6 +3250,12 @@ nautilus_places_sidebar_dispose (GObject *object)
sidebar->eject_highlight_path = NULL;
}
+ if (sidebar->bookmarks_changed_id != 0) {
+ g_signal_handler_disconnect (sidebar->bookmarks,
+ sidebar->bookmarks_changed_id);
+ sidebar->bookmarks_changed_id = 0;
+ }
+
g_clear_object (&sidebar->store);
g_clear_object (&sidebar->volume_monitor);
g_clear_object (&sidebar->bookmarks);
@@ -3291,9 +3299,10 @@ nautilus_places_sidebar_set_parent_window (NautilusPlacesSidebar *sidebar,
sidebar->bookmarks = nautilus_bookmark_list_new ();
sidebar->uri = nautilus_window_slot_get_current_uri (slot);
- g_signal_connect_object (sidebar->bookmarks, "changed",
- G_CALLBACK (update_places),
- sidebar, G_CONNECT_SWAPPED);
+ sidebar->bookmarks_changed_id =
+ g_signal_connect_swapped (sidebar->bookmarks, "changed",
+ G_CALLBACK (update_places),
+ sidebar);
g_signal_connect_object (window, "loading_uri",
G_CALLBACK (loading_uri_callback),
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]