aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
authorNot Zed <NotZed@Ximian.com>2004-10-15 16:46:23 +0800
committerMichael Zucci <zucchi@src.gnome.org>2004-10-15 16:46:23 +0800
commita0eff551fb9e4673bb3d45a5e331a0802d16aeca (patch)
tree188e9b2c39d00be80e0f8fd60a711dd4dc6bee8c /mail
parent084a2d2e3d39e7b25a6101f125a37bb05b9caf81 (diff)
downloadgsoc2013-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')
-rw-r--r--mail/ChangeLog7
-rw-r--r--mail/em-composer-utils.c26
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 <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.
+
2004-10-14 Sivaiah Nallagatla <snallagatla@novell.com>
* 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);
}