aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mail/em-composer-utils.c10
-rw-r--r--mail/em-composer-utils.h2
2 files changed, 8 insertions, 4 deletions
diff --git a/mail/em-composer-utils.c b/mail/em-composer-utils.c
index 1ade12f738..cc8c1e33d6 100644
--- a/mail/em-composer-utils.c
+++ b/mail/em-composer-utils.c
@@ -2206,21 +2206,25 @@ redirect_get_composer (EShell *shell,
*
* Opens a composer to redirect @message (Note: only headers will be
* editable). Adds Resent-From/Resent-To/etc headers.
+ *
+ * Returns: the resulting #EMsgComposer
**/
-void
+EMsgComposer *
em_utils_redirect_message (EShell *shell,
CamelMimeMessage *message)
{
EMsgComposer *composer;
- g_return_if_fail (E_IS_SHELL (shell));
- g_return_if_fail (CAMEL_IS_MIME_MESSAGE (message));
+ g_return_val_if_fail (E_IS_SHELL (shell), NULL);
+ g_return_val_if_fail (CAMEL_IS_MIME_MESSAGE (message), NULL);
composer = redirect_get_composer (shell, message);
gtk_widget_show (GTK_WIDGET (composer));
composer_set_no_change (composer);
+
+ return composer;
}
/* Replying to messages... */
diff --git a/mail/em-composer-utils.h b/mail/em-composer-utils.h
index 56555e97e7..5c3eb73889 100644
--- a/mail/em-composer-utils.h
+++ b/mail/em-composer-utils.h
@@ -58,7 +58,7 @@ void em_utils_forward_messages (EMailReader *reader,
GPtrArray *uids,
EMailForwardStyle style,
GtkWidget *destroy_when_done);
-void em_utils_redirect_message (EShell *shell,
+EMsgComposer * em_utils_redirect_message (EShell *shell,
CamelMimeMessage *message);
gchar * em_utils_construct_composer_text
(CamelSession *session,