diff options
author | Jeffrey Stedfast <fejj@ximian.com> | 2001-09-17 04:54:07 +0800 |
---|---|---|
committer | Jeffrey Stedfast <fejj@src.gnome.org> | 2001-09-17 04:54:07 +0800 |
commit | 7054bd6586285a9d8c8e7b3e02c67c5c69bc85e7 (patch) | |
tree | cefe53d5196057e5a452d7293253294ccd627746 | |
parent | 01435199611a59f028c9093ab0cc476bad70fcc5 (diff) | |
download | gsoc2013-evolution-7054bd6586285a9d8c8e7b3e02c67c5c69bc85e7.tar.gz gsoc2013-evolution-7054bd6586285a9d8c8e7b3e02c67c5c69bc85e7.tar.zst gsoc2013-evolution-7054bd6586285a9d8c8e7b3e02c67c5c69bc85e7.zip |
Don't gtk_object_destroy() the pixbuf loader, unref it instead.
2001-09-16 Jeffrey Stedfast <fejj@ximian.com>
* e-msg-composer-attachment-bar.c (update): Don't
gtk_object_destroy() the pixbuf loader, unref it instead.
* e-msg-composer-hdrs.c (destroy): Don't forget to free the
private structure.
svn path=/trunk/; revision=12862
-rw-r--r-- | composer/ChangeLog | 8 | ||||
-rw-r--r-- | composer/e-msg-composer-attachment-bar.c | 2 | ||||
-rw-r--r-- | composer/e-msg-composer-hdrs.c | 18 | ||||
-rw-r--r-- | composer/e-msg-composer.c | 7 |
4 files changed, 22 insertions, 13 deletions
diff --git a/composer/ChangeLog b/composer/ChangeLog index 6e11fee62e..5703d17db0 100644 --- a/composer/ChangeLog +++ b/composer/ChangeLog @@ -1,3 +1,11 @@ +2001-09-16 Jeffrey Stedfast <fejj@ximian.com> + + * e-msg-composer-attachment-bar.c (update): Don't + gtk_object_destroy() the pixbuf loader, unref it instead. + + * e-msg-composer-hdrs.c (destroy): Don't forget to free the + private structure. + 2001-09-14 Ettore Perazzoli <ettore@ximian.com> [Automake 1.5 fixes pointed out by Richard Boulton diff --git a/composer/e-msg-composer-attachment-bar.c b/composer/e-msg-composer-attachment-bar.c index 3e454cd8b8..d5ae665af1 100644 --- a/composer/e-msg-composer-attachment-bar.c +++ b/composer/e-msg-composer-attachment-bar.c @@ -324,7 +324,7 @@ update (EMsgComposerAttachmentBar *bar) /* Destroy everything */ gdk_pixbuf_loader_close (loader); - gtk_object_destroy (GTK_OBJECT (loader)); + gtk_object_unref (GTK_OBJECT (loader)); camel_stream_close (mstream); } diff --git a/composer/e-msg-composer-hdrs.c b/composer/e-msg-composer-hdrs.c index 231c036e90..90bbddd941 100644 --- a/composer/e-msg-composer-hdrs.c +++ b/composer/e-msg-composer-hdrs.c @@ -517,6 +517,8 @@ destroy (GtkObject *object) } g_slist_free (priv->from_options); + g_free (priv); + if (GTK_OBJECT_CLASS (parent_class)->destroy != NULL) (* GTK_OBJECT_CLASS (parent_class)->destroy) (object); } @@ -963,7 +965,7 @@ e_msg_composer_hdrs_get_recipients (EMsgComposerHdrs *hdrs) EDestination **cc_destv; EDestination **bcc_destv; EDestination **recip_destv; - gint i, j, N; + gint i, j, n; g_return_val_if_fail (E_IS_MSG_COMPOSER_HDRS (hdrs), NULL); @@ -971,16 +973,16 @@ e_msg_composer_hdrs_get_recipients (EMsgComposerHdrs *hdrs) cc_destv = e_msg_composer_hdrs_get_cc (hdrs); bcc_destv = e_msg_composer_hdrs_get_bcc (hdrs); - N = 0; + n = 0; - for (i = 0; to_destv && to_destv[i] != NULL; ++i, ++N); - for (i = 0; cc_destv && cc_destv[i] != NULL; ++i, ++N); - for (i = 0; bcc_destv && bcc_destv[i] != NULL; ++i, ++N); + for (i = 0; to_destv && to_destv[i] != NULL; ++i, ++n); + for (i = 0; cc_destv && cc_destv[i] != NULL; ++i, ++n); + for (i = 0; bcc_destv && bcc_destv[i] != NULL; ++i, ++n); - if (N == 0) + if (n == 0) return NULL; - recip_destv = g_new (EDestination *, N+1); + recip_destv = g_new (EDestination *, n+1); j = 0; @@ -991,7 +993,7 @@ e_msg_composer_hdrs_get_recipients (EMsgComposerHdrs *hdrs) for (i = 0; bcc_destv && bcc_destv[i] != NULL; ++i, ++j) recip_destv[j] = bcc_destv[i]; - g_assert (j == N); + g_assert (j == n); recip_destv[j] = NULL; g_free (to_destv); diff --git a/composer/e-msg-composer.c b/composer/e-msg-composer.c index 62235127a7..e8ce7d6844 100644 --- a/composer/e-msg-composer.c +++ b/composer/e-msg-composer.c @@ -2631,10 +2631,9 @@ e_msg_composer_new_with_message (CamelMimeMessage *msg) Bcc = g_list_append (Bcc, dest); } } - + Bccv = e_destination_list_to_vector (Bcc); g_list_free (Bcc); - /* Restore the Account preference */ account_name = camel_medium_get_header (CAMEL_MEDIUM (msg), "X-Evolution-Account"); @@ -2645,7 +2644,7 @@ e_msg_composer_new_with_message (CamelMimeMessage *msg) } e_msg_composer_set_headers (new, account_name, Tov, Ccv, Bccv, subject); - + e_destination_freev (Tov); e_destination_freev (Ccv); e_destination_freev (Bccv); @@ -2712,7 +2711,7 @@ e_msg_composer_new_with_message (CamelMimeMessage *msg) g_free (text); } } - + return new; } |