From ca14cc115ee90650f1546ed3d95bf1ce6010569f Mon Sep 17 00:00:00 2001
From: Matthew Barnes <mbarnes@redhat.com>
Date: Sun, 2 Jun 2013 11:07:43 -0400
Subject: em_utils_redirect_message: Return the EMsgComposer.

---
 mail/em-composer-utils.c | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

(limited to 'mail/em-composer-utils.c')

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... */
-- 
cgit