[evolution/kill-bonobo: 24/25] Fix similar weak pointer issues throughout.



commit f4d748a85c534cb8a693b6a1f1b3353adfd73b5b
Author: Matthew Barnes <mbarnes redhat com>
Date:   Fri Jun 19 18:43:29 2009 -0400

    Fix similar weak pointer issues throughout.

 calendar/gui/dialogs/comp-editor.c |    6 ++++++
 calendar/gui/e-calendar-table.c    |    6 ++++++
 calendar/gui/e-memo-table.c        |    6 ++++++
 mail/e-mail-reader.c               |    2 +-
 mail/em-folder-tree-model.c        |    6 ++++++
 shell/e-shell-backend.c            |    6 ++++++
 shell/e-shell-window-private.c     |    6 ++++++
 shell/e-shell.c                    |    6 ++++++
 8 files changed, 43 insertions(+), 1 deletions(-)
---
diff --git a/calendar/gui/dialogs/comp-editor.c b/calendar/gui/dialogs/comp-editor.c
index 268f61a..64f80b4 100644
--- a/calendar/gui/dialogs/comp-editor.c
+++ b/calendar/gui/dialogs/comp-editor.c
@@ -1314,6 +1314,12 @@ comp_editor_dispose (GObject *object)
 
 	priv = COMP_EDITOR_GET_PRIVATE (object);
 
+	if (priv->shell != NULL) {
+		g_object_remove_weak_pointer (
+			G_OBJECT (priv->shell), &priv->shell);
+		priv->shell = NULL;
+	}
+
 	if (priv->client) {
 		g_object_unref (priv->client);
 		priv->client = NULL;
diff --git a/calendar/gui/e-calendar-table.c b/calendar/gui/e-calendar-table.c
index 3c11aa7..7771be2 100644
--- a/calendar/gui/e-calendar-table.c
+++ b/calendar/gui/e-calendar-table.c
@@ -595,6 +595,12 @@ calendar_table_dispose (GObject *object)
 
 	priv = E_CALENDAR_TABLE_GET_PRIVATE (object);
 
+	if (priv->shell_view != NULL) {
+		g_object_remove_weak_pointer (
+			G_OBJECT (priv->shell_view), &priv->shell_view);
+		priv->shell_view = NULL;
+	}
+
 	if (priv->model != NULL) {
 		g_object_unref (priv->model);
 		priv->model = NULL;
diff --git a/calendar/gui/e-memo-table.c b/calendar/gui/e-memo-table.c
index 4ad24e5..4c6cd9b 100644
--- a/calendar/gui/e-memo-table.c
+++ b/calendar/gui/e-memo-table.c
@@ -519,6 +519,12 @@ memo_table_dispose (GObject *object)
 
 	priv = E_MEMO_TABLE_GET_PRIVATE (object);
 
+	if (priv->shell_view != NULL) {
+		g_object_remove_weak_pointer (
+			G_OBJECT (priv->shell_view), &priv->shell_view);
+		priv->shell_view = NULL;
+	}
+
 	if (priv->model != NULL) {
 		g_object_unref (priv->model);
 		priv->model = NULL;
diff --git a/mail/e-mail-reader.c b/mail/e-mail-reader.c
index edea7cf..9f07ae3 100644
--- a/mail/e-mail-reader.c
+++ b/mail/e-mail-reader.c
@@ -331,7 +331,7 @@ action_mail_flag_for_followup_cb (GtkAction *action,
 	folder = message_list->folder;
 	uids = message_list_get_selected (message_list);
 
-	em_utils_flag_for_followup (window, folder, uids);
+	em_utils_flag_for_followup (reader, folder, uids);
 }
 
 static void
diff --git a/mail/em-folder-tree-model.c b/mail/em-folder-tree-model.c
index d7c5261..9c3ef60 100644
--- a/mail/em-folder-tree-model.c
+++ b/mail/em-folder-tree-model.c
@@ -311,6 +311,12 @@ folder_tree_model_dispose (GObject *object)
 
 	priv = EM_FOLDER_TREE_MODEL_GET_PRIVATE (object);
 
+	if (priv->shell_backend != NULL) {
+		g_object_remove_weak_pointer (
+			G_OBJECT (priv->shell_backend), &priv->shell_backend);
+		priv->shell_backend = NULL;
+	}
+
 	if (priv->selection != NULL) {
 		g_object_weak_unref (
 			G_OBJECT (priv->selection), (GWeakNotify)
diff --git a/shell/e-shell-backend.c b/shell/e-shell-backend.c
index 06e1469..9ee2edb 100644
--- a/shell/e-shell-backend.c
+++ b/shell/e-shell-backend.c
@@ -116,6 +116,12 @@ shell_backend_dispose (GObject *object)
 
 	priv = E_SHELL_BACKEND_GET_PRIVATE (object);
 
+	if (priv->shell != NULL) {
+		g_object_remove_weak_pointer (
+			G_OBJECT (priv->shell), &priv->shell);
+		priv->shell = NULL;
+	}
+
 	if (priv->shell_view_class != NULL) {
 		g_type_class_unref (priv->shell_view_class);
 		priv->shell_view_class = NULL;
diff --git a/shell/e-shell-window-private.c b/shell/e-shell-window-private.c
index bb74e35..7161743 100644
--- a/shell/e-shell-window-private.c
+++ b/shell/e-shell-window-private.c
@@ -449,6 +449,12 @@ e_shell_window_private_dispose (EShellWindow *shell_window)
 		priv->signal_handler_ids = NULL;
 	}
 
+	if (priv->shell != NULL) {
+		g_object_remove_weak_pointer (
+			G_OBJECT (priv->shell), &priv->shell);
+		priv->shell = NULL;
+	}
+
 	DISPOSE (priv->ui_manager);
 
 	g_hash_table_remove_all (priv->loaded_views);
diff --git a/shell/e-shell.c b/shell/e-shell.c
index 7854853..547432b 100644
--- a/shell/e-shell.c
+++ b/shell/e-shell.c
@@ -484,6 +484,12 @@ shell_dispose (GObject *object)
 	g_list_free (priv->loaded_backends);
 	priv->loaded_backends = NULL;
 
+	if (priv->preparing_for_line_change != NULL) {
+		g_object_remove_weak_pointer (
+			G_OBJECT (priv->preparing_for_line_change),
+			&priv->preparing_for_line_change);
+	}
+
 	/* Chain up to parent's dispose() method. */
 	G_OBJECT_CLASS (parent_class)->dispose (object);
 }



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