aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
authorbertrand <bertrand@helixcode.com>2000-03-09 03:53:31 +0800
committerBertrand Guiheneuf <bertrand@src.gnome.org>2000-03-09 03:53:31 +0800
commit207a1395e10cbce4f9ec3baa33a649fb9a151a27 (patch)
tree385a02f3528a4b582c38af77c9c98f44032514a5 /mail
parent13edeabcd2978c1e7febe005cd3fb2f19c55edc1 (diff)
downloadgsoc2013-evolution-207a1395e10cbce4f9ec3baa33a649fb9a151a27.tar.gz
gsoc2013-evolution-207a1395e10cbce4f9ec3baa33a649fb9a151a27.tar.zst
gsoc2013-evolution-207a1395e10cbce4f9ec3baa33a649fb9a151a27.zip
plug mem leaks due to bad documentation of
2000-03-07 bertrand <bertrand@helixcode.com> * camel-formatter.c (handle_mime_part): plug mem leaks due to bad documentation of camel_content_field_get_mime_type (print_camel_body_part): idem (handle_multipart_alternative): idem * gmime-content-field.c (gmime_content_field_get_mime_type): documentation fix. * camel-mime-part.c (my_finalize): unref the content_input_stream if any. * shell/e-shell-shortcut.c (shortcut_bar_item_selected): removed a test that prevented the standard menu to be shown. svn path=/trunk/; revision=2089
Diffstat (limited to 'mail')
-rw-r--r--mail/mail-display.c17
-rw-r--r--mail/mail-display.h1
-rw-r--r--mail/message-list.h1
3 files changed, 14 insertions, 5 deletions
diff --git a/mail/mail-display.c b/mail/mail-display.c
index 6665d8dd48..3f5cbd2bcf 100644
--- a/mail/mail-display.c
+++ b/mail/mail-display.c
@@ -250,6 +250,12 @@ mail_display_set_message (MailDisplay *mail_display,
*/
if (CAMEL_IS_MIME_MESSAGE (medium)) {
+ /* we were given a reference to the message in the last call
+ * to mail_display_set_message, free it now. */
+ if (mail_display->current_message)
+ gtk_object_unref (GTK_OBJECT (mail_display->current_message));
+
+ mail_display->current_message = CAMEL_MIME_MESSAGE (medium);
/*
* reset the html stream to clean
* the gtkhtml widget
@@ -287,13 +293,11 @@ mail_display_set_message (MailDisplay *mail_display,
CAMEL_MIME_MESSAGE (medium),
mail_display->headers_stream,
mail_display->body_stream);
+
-
- /*camel_formatter_wrapper_to_html (camel_formatter,
- CAMEL_DATA_WRAPPER (medium),
- mail_display->body_stream);*/
+ gtk_object_unref (GTK_OBJECT (camel_formatter));
- camel_stream_write_string (mail_display->headers_stream, "
+ camel_stream_write_string (mail_display->headers_stream, "
</font>
</body>
</html>
@@ -333,6 +337,9 @@ mail_display_init (GtkObject *object)
mail_display->body_stream = html_stream_new (mail_display->body_html_widget);
gtk_widget_show (GTK_WIDGET (mail_display->body_html_widget));
+
+ /* various other initializations */
+ mail_display->current_message = NULL;
}
static void
diff --git a/mail/mail-display.h b/mail/mail-display.h
index 804be904f8..81f1bcb38f 100644
--- a/mail/mail-display.h
+++ b/mail/mail-display.h
@@ -38,6 +38,7 @@ struct _MailDisplay {
GtkHTML * body_html_widget;
CamelStream * body_stream;
+ CamelMimeMessage *current_message;
};
typedef struct {
diff --git a/mail/message-list.h b/mail/message-list.h
index 16e60c21f0..f045037313 100644
--- a/mail/message-list.h
+++ b/mail/message-list.h
@@ -59,6 +59,7 @@ struct _MessageList {
CamelFolder *folder;
CamelFolderSummary *folder_summary;
+
} ;
typedef struct {