diff options
author | Not Zed <NotZed@Ximian.com> | 2004-10-15 16:46:23 +0800 |
---|---|---|
committer | Michael Zucci <zucchi@src.gnome.org> | 2004-10-15 16:46:23 +0800 |
commit | a0eff551fb9e4673bb3d45a5e331a0802d16aeca (patch) | |
tree | 188e9b2c39d00be80e0f8fd60a711dd4dc6bee8c /mail/em-composer-utils.c | |
parent | 084a2d2e3d39e7b25a6101f125a37bb05b9caf81 (diff) | |
download | gsoc2013-evolution-a0eff551fb9e4673bb3d45a5e331a0802d16aeca.tar.gz gsoc2013-evolution-a0eff551fb9e4673bb3d45a5e331a0802d16aeca.tar.zst gsoc2013-evolution-a0eff551fb9e4673bb3d45a5e331a0802d16aeca.zip |
do noting if the composer couldn't be created. We get a popup from
2004-10-15 Not Zed <NotZed@Ximian.com>
* 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
Diffstat (limited to 'mail/em-composer-utils.c')
-rw-r--r-- | mail/em-composer-utils.c | 26 |
1 files changed, 16 insertions, 10 deletions
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); } |