aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2013-06-02 23:48:46 +0800
committerMatthew Barnes <mbarnes@redhat.com>2013-06-02 23:58:08 +0800
commit1b7fc9224b7107361282904483805c67d4980586 (patch)
treec2d935d29fdf9ce68cda634d2fd9a74616062c13 /mail
parent540acdbfa95d29a66ad94bad68222b5ae9c98720 (diff)
downloadgsoc2013-evolution-1b7fc9224b7107361282904483805c67d4980586.tar.gz
gsoc2013-evolution-1b7fc9224b7107361282904483805c67d4980586.tar.zst
gsoc2013-evolution-1b7fc9224b7107361282904483805c67d4980586.zip
em_utils_compose_new_message(): Return the EMsgComposer.
Diffstat (limited to 'mail')
-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 8f7bde48d2..1ade12f738 100644
--- a/mail/em-composer-utils.c
+++ b/mail/em-composer-utils.c
@@ -1100,22 +1100,26 @@ create_new_composer (EShell *shell,
*
* Opens a new composer window as a child window of @parent's toplevel
* window.
+ *
+ * Returns: the resulting #EMsgComposer
**/
-void
+EMsgComposer *
em_utils_compose_new_message (EShell *shell,
CamelFolder *folder)
{
EMsgComposer *composer;
- g_return_if_fail (E_IS_SHELL (shell));
+ g_return_val_if_fail (E_IS_SHELL (shell), NULL);
if (folder != NULL)
- g_return_if_fail (CAMEL_IS_FOLDER (folder));
+ g_return_val_if_fail (CAMEL_IS_FOLDER (folder), NULL);
composer = create_new_composer (shell, "", folder);
composer_set_no_change (composer);
gtk_widget_show (GTK_WIDGET (composer));
+
+ return composer;
}
/**
diff --git a/mail/em-composer-utils.h b/mail/em-composer-utils.h
index 3ab4c178fc..56555e97e7 100644
--- a/mail/em-composer-utils.h
+++ b/mail/em-composer-utils.h
@@ -32,7 +32,7 @@
G_BEGIN_DECLS
-void em_utils_compose_new_message (EShell *shell,
+EMsgComposer * em_utils_compose_new_message (EShell *shell,
CamelFolder *folder);
EMsgComposer * em_utils_compose_new_message_with_mailto
(EShell *shell,