From a0eff551fb9e4673bb3d45a5e331a0802d16aeca Mon Sep 17 00:00:00 2001 From: Not Zed Date: Fri, 15 Oct 2004 08:46:23 +0000 Subject: do noting if the composer couldn't be created. We get a popup from 2004-10-15 Not Zed * em-composer-utils.c (create_new_composer): (em_utils_compose_new_message, forward_non_attached): do noting if the composer couldn't be created. We get a popup from elsewhere to let the user know. svn path=/trunk/; revision=27590 --- mail/ChangeLog | 7 +++++++ mail/em-composer-utils.c | 26 ++++++++++++++++---------- 2 files changed, 23 insertions(+), 10 deletions(-) diff --git a/mail/ChangeLog b/mail/ChangeLog index dc5238bd48..c757d464f5 100644 --- a/mail/ChangeLog +++ b/mail/ChangeLog @@ -1,3 +1,10 @@ +2004-10-15 Not Zed + + * em-composer-utils.c (create_new_composer): + (em_utils_compose_new_message, forward_non_attached): do noting if + the composer couldn't be created. We get a popup from elsewhere + to let the user know. + 2004-10-14 Sivaiah Nallagatla * mail-errors.xml : Remove Pango markup from groupwise diff --git a/mail/em-composer-utils.c b/mail/em-composer-utils.c index db5a280991..3b723643bb 100644 --- a/mail/em-composer-utils.c +++ b/mail/em-composer-utils.c @@ -630,7 +630,9 @@ create_new_composer (const char *subject, const char *fromuri) EAccount *account = NULL; composer = e_msg_composer_new (); - + if (composer == NULL) + return NULL; + if (fromuri) account = mail_config_get_account_by_source_url(fromuri); @@ -653,6 +655,8 @@ em_utils_compose_new_message (const char *fromuri) GtkWidget *composer; composer = (GtkWidget *) create_new_composer ("", fromuri); + if (composer == NULL) + return; e_msg_composer_unset_changed ((EMsgComposer *)composer); e_msg_composer_drop_editor_undo ((EMsgComposer *)composer); @@ -828,8 +832,10 @@ forward_attached (CamelFolder *folder, GPtrArray *messages, CamelMimePart *part, EMsgComposer *composer; composer = create_new_composer (subject, fromuri); + if (composer == NULL) + return; + e_msg_composer_attach (composer, part); - e_msg_composer_unset_changed (composer); e_msg_composer_drop_editor_undo (composer); @@ -892,16 +898,16 @@ forward_non_attached (GPtrArray *messages, int style, const char *fromuri) if (text) { composer = create_new_composer (subject, fromuri); - if (CAMEL_IS_MULTIPART(camel_medium_get_content_object((CamelMedium *)message))) - e_msg_composer_add_message_attachments(composer, message, FALSE); + if (composer) { + if (CAMEL_IS_MULTIPART(camel_medium_get_content_object((CamelMedium *)message))) + e_msg_composer_add_message_attachments(composer, message, FALSE); - e_msg_composer_set_body_text (composer, text, len); - - e_msg_composer_unset_changed (composer); - e_msg_composer_drop_editor_undo (composer); - - gtk_widget_show (GTK_WIDGET (composer)); + e_msg_composer_set_body_text (composer, text, len); + e_msg_composer_unset_changed (composer); + e_msg_composer_drop_editor_undo (composer); + gtk_widget_show (GTK_WIDGET (composer)); + } g_free (text); } -- cgit v1.2.3