diff options
author | Srinivasa Ragavan <sragavan@novell.com> | 2009-07-20 16:58:58 +0800 |
---|---|---|
committer | Srinivasa Ragavan <sragavan@novell.com> | 2009-07-20 17:00:42 +0800 |
commit | 1482abed5ec48a2b47d2f2bc17db4ad28d61d248 (patch) | |
tree | a12292ab3ea0ed7990c3d23a81242c06d31d7461 /mail/em-composer-utils.c | |
parent | 1cf9c509c155cb007ec025f3c9f6c23b678df1d4 (diff) | |
download | gsoc2013-evolution-1482abed5ec48a2b47d2f2bc17db4ad28d61d248.tar.gz gsoc2013-evolution-1482abed5ec48a2b47d2f2bc17db4ad28d61d248.tar.zst gsoc2013-evolution-1482abed5ec48a2b47d2f2bc17db4ad28d61d248.zip |
Change for Anjal to support forwarding of mails
Diffstat (limited to 'mail/em-composer-utils.c')
-rw-r--r-- | mail/em-composer-utils.c | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/mail/em-composer-utils.c b/mail/em-composer-utils.c index a97b1cc8d7..11f4272cf8 100644 --- a/mail/em-composer-utils.c +++ b/mail/em-composer-utils.c @@ -1030,14 +1030,14 @@ setup_forward_attached_callbacks (EMsgComposer *composer, CamelFolder *folder, G g_object_weak_ref ((GObject *) composer, (GWeakNotify) composer_destroy_fad_cb, fad); } -static void +static struct _EMsgComposer * forward_attached (CamelFolder *folder, GPtrArray *uids, GPtrArray *messages, CamelMimePart *part, gchar *subject, const gchar *fromuri) { EMsgComposer *composer; composer = create_new_composer (subject, fromuri, TRUE, FALSE); if (composer == NULL) - return; + return NULL; e_msg_composer_attach (composer, part); @@ -1046,7 +1046,10 @@ forward_attached (CamelFolder *folder, GPtrArray *uids, GPtrArray *messages, Cam composer_set_no_change (composer, TRUE, FALSE); - gtk_widget_show (GTK_WIDGET (composer)); + if (!e_msg_composer_get_lite()) + gtk_widget_show (GTK_WIDGET (composer)); + + return composer; } static void @@ -1192,7 +1195,7 @@ em_utils_forward_quoted (CamelFolder *folder, GPtrArray *uids, const gchar *from * * Forwards a message in the user's configured default style. **/ -void +struct _EMsgComposer * em_utils_forward_message (CamelMimeMessage *message, const gchar *fromuri) { GPtrArray *messages; @@ -1200,7 +1203,7 @@ em_utils_forward_message (CamelMimeMessage *message, const gchar *fromuri) GConfClient *gconf; gchar *subject; gint mode; - + struct _EMsgComposer *composer = NULL; messages = g_ptr_array_new (); g_ptr_array_add (messages, message); @@ -1214,7 +1217,7 @@ em_utils_forward_message (CamelMimeMessage *message, const gchar *fromuri) subject = mail_tool_generate_forward_subject (message); - forward_attached (NULL, NULL, messages, part, subject, fromuri); + composer = forward_attached (NULL, NULL, messages, part, subject, fromuri); camel_object_unref (part); g_free (subject); break; @@ -1227,6 +1230,8 @@ em_utils_forward_message (CamelMimeMessage *message, const gchar *fromuri) } g_ptr_array_free (messages, TRUE); + + return composer; } /** |