aboutsummaryrefslogtreecommitdiffstats
path: root/mail/em-composer-utils.c
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2009-07-01 22:47:10 +0800
committerMatthew Barnes <mbarnes@redhat.com>2009-07-01 22:47:10 +0800
commit1351c8e4fb443a9705bb1225c3c574c05a36f8ca (patch)
treee049bafefac361ae66dfa43abdb956f1f3a730e0 /mail/em-composer-utils.c
parent624f48121f523101fe26c3d3a8b51a4eeda90990 (diff)
parent42e75c9162402078ac629740821c3533925ee342 (diff)
downloadgsoc2013-evolution-1351c8e4fb443a9705bb1225c3c574c05a36f8ca.tar
gsoc2013-evolution-1351c8e4fb443a9705bb1225c3c574c05a36f8ca.tar.gz
gsoc2013-evolution-1351c8e4fb443a9705bb1225c3c574c05a36f8ca.tar.bz2
gsoc2013-evolution-1351c8e4fb443a9705bb1225c3c574c05a36f8ca.tar.lz
gsoc2013-evolution-1351c8e4fb443a9705bb1225c3c574c05a36f8ca.tar.xz
gsoc2013-evolution-1351c8e4fb443a9705bb1225c3c574c05a36f8ca.tar.zst
gsoc2013-evolution-1351c8e4fb443a9705bb1225c3c574c05a36f8ca.zip
Merge branch 'master' into kill-bonobo
Diffstat (limited to 'mail/em-composer-utils.c')
-rw-r--r--mail/em-composer-utils.c24
1 files changed, 15 insertions, 9 deletions
diff --git a/mail/em-composer-utils.c b/mail/em-composer-utils.c
index 23dcd94bbe..40abdcf37d 100644
--- a/mail/em-composer-utils.c
+++ b/mail/em-composer-utils.c
@@ -760,7 +760,7 @@ em_utils_compose_new_message_with_mailto (const gchar *url, const gchar *fromuri
/* Editing messages... */
-static void
+static GtkWidget *
edit_message (CamelMimeMessage *message, CamelFolder *drafts, const gchar *uid)
{
EMsgComposer *composer;
@@ -785,7 +785,7 @@ edit_message (CamelMimeMessage *message, CamelFolder *drafts, const gchar *uid)
content = camel_medium_get_content_object ((CamelMedium *) message);
if (!content)
- return;
+ return NULL;
/*
* Get non-multipart content from multipart message.
@@ -798,11 +798,11 @@ edit_message (CamelMimeMessage *message, CamelFolder *drafts, const gchar *uid)
}
if (!mime_part)
- return;
+ return NULL;
type = camel_mime_part_get_content_type (mime_part);
if (!camel_content_type_is (type, "text", "plain"))
- return;
+ return NULL;
mem = camel_stream_mem_new ();
camel_data_wrapper_decode_to_stream (content, mem);
@@ -909,7 +909,10 @@ edit_message (CamelMimeMessage *message, CamelFolder *drafts, const gchar *uid)
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 (GtkWidget *)composer;
}
/**
@@ -920,15 +923,18 @@ edit_message (CamelMimeMessage *message, CamelFolder *drafts, const gchar *uid)
* Opens a composer filled in with the headers/mime-parts/etc of
* @message.
**/
-void
+GtkWidget *
em_utils_edit_message (CamelMimeMessage *message, CamelFolder *folder)
{
- g_return_if_fail (CAMEL_IS_MIME_MESSAGE (message));
+ GtkWidget *composer = NULL;
+ g_return_val_if_fail (CAMEL_IS_MIME_MESSAGE (message), NULL);
if (folder)
- edit_message (message, folder, NULL);
+ composer = edit_message (message, folder, NULL);
else
- edit_message (message, NULL, NULL);
+ composer = edit_message (message, NULL, NULL);
+
+ return composer;
}
static void