aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2002-07-11 06:49:14 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2002-07-11 06:49:14 +0800
commit740bddaf619c705fe421c295a5451ad7a2422cc8 (patch)
tree1c2d491ece2ff0e2b84eae1099e2b58357d0c2d9 /mail
parent4a0a53ce2da2d4d8c5d9949102670f1642e614d2 (diff)
downloadgsoc2013-evolution-740bddaf619c705fe421c295a5451ad7a2422cc8.tar.gz
gsoc2013-evolution-740bddaf619c705fe421c295a5451ad7a2422cc8.tar.zst
gsoc2013-evolution-740bddaf619c705fe421c295a5451ad7a2422cc8.zip
If we unref'd a current_message, clear the datalist. Don't bother
2002-07-10 Jeffrey Stedfast <fejj@ximian.com> * mail-display.c (mail_display_set_message): If we unref'd a current_message, clear the datalist. Don't bother connecting to the message's finalise signal because something else may own a ref to the original message when we replace it with a new one. (mail_display_destroy): Only clear the datalist if we have a current_message, otherwise it's safe to assume that it is already cleared. svn path=/trunk/; revision=17413
Diffstat (limited to 'mail')
-rw-r--r--mail/ChangeLog10
-rw-r--r--mail/mail-display.c21
2 files changed, 16 insertions, 15 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index ff9f00b287..c2717da744 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,3 +1,13 @@
+2002-07-10 Jeffrey Stedfast <fejj@ximian.com>
+
+ * mail-display.c (mail_display_set_message): If we unref'd a
+ current_message, clear the datalist. Don't bother connecting to
+ the message's finalise signal because something else may own a ref
+ to the original message when we replace it with a new one.
+ (mail_display_destroy): Only clear the datalist if we have a
+ current_message, otherwise it's safe to assume that it is already
+ cleared.
+
2002-07-08 Peter Williams <peterw@ximian.com>
* Makefile.am (INCLUDES): Add -I flags to get the ebook headers.
diff --git a/mail/mail-display.c b/mail/mail-display.c
index b5e57f6015..ca896234ff 100644
--- a/mail/mail-display.c
+++ b/mail/mail-display.c
@@ -1477,14 +1477,6 @@ mail_error_printf (GtkHTML *html, GtkHTMLStream *stream,
g_free (htmltext);
}
-static void
-clear_data (CamelObject *object, gpointer event_data, gpointer user_data)
-{
- GData *data = user_data;
-
- g_datalist_clear (&data);
-}
-
#define COLOR_IS_LIGHT(r, g, b) ((r + g + b) > (128 * 3))
@@ -1621,8 +1613,10 @@ mail_display_set_message (MailDisplay *md, CamelMedium *medium, const char *foll
return;
/* Clean up from previous message. */
- if (md->current_message)
+ if (md->current_message) {
camel_object_unref (CAMEL_OBJECT (md->current_message));
+ g_datalist_clear (md->data);
+ }
g_free (md->followup);
@@ -1636,10 +1630,6 @@ mail_display_set_message (MailDisplay *md, CamelMedium *medium, const char *foll
g_datalist_init (md->data);
mail_display_redisplay (md, TRUE);
- if (medium) {
- camel_object_hook_event (CAMEL_OBJECT (medium), "finalize",
- clear_data, *(md->data));
- }
}
/**
@@ -1706,14 +1696,15 @@ mail_display_destroy (GtkObject *object)
gtk_object_unref (GTK_OBJECT (mail_display->html));
- if (mail_display->current_message)
+ if (mail_display->current_message) {
camel_object_unref (mail_display->current_message);
+ g_datalist_clear (mail_display->data);
+ }
g_free (mail_display->charset);
g_free (mail_display->selection);
g_free (mail_display->followup);
- g_datalist_clear (mail_display->data);
g_free (mail_display->data);
mail_display->data = NULL;