aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSrinivasa Ragavan <sragavan@novell.com>2009-06-25 13:07:10 +0800
committerSrinivasa Ragavan <sragavan@novell.com>2009-06-25 13:07:10 +0800
commit87773593220e581de841e837c29acb99a818c890 (patch)
treeeaad2d1cb43e2a64789a0b5aeae76d021b1a2472
parent741307a9309d389d3246285c985c2a68c741d6d7 (diff)
downloadgsoc2013-evolution-87773593220e581de841e837c29acb99a818c890.tar.gz
gsoc2013-evolution-87773593220e581de841e837c29acb99a818c890.tar.zst
gsoc2013-evolution-87773593220e581de841e837c29acb99a818c890.zip
Add more apis for Anjal to draft composer.
-rw-r--r--mail/em-composer-utils.c16
-rw-r--r--mail/em-composer-utils.h2
2 files changed, 12 insertions, 6 deletions
diff --git a/mail/em-composer-utils.c b/mail/em-composer-utils.c
index 7bb87222cd..d76fc4eecb 100644
--- a/mail/em-composer-utils.c
+++ b/mail/em-composer-utils.c
@@ -763,7 +763,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;
@@ -910,7 +910,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;
}
/**
@@ -921,15 +924,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)
{
+ GtkWidget *composer = NULL;
g_return_if_fail (CAMEL_IS_MIME_MESSAGE (message));
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
diff --git a/mail/em-composer-utils.h b/mail/em-composer-utils.h
index 4c916529ec..66168e3a43 100644
--- a/mail/em-composer-utils.h
+++ b/mail/em-composer-utils.h
@@ -46,7 +46,7 @@ EMsgComposer * em_utils_compose_lite_new_message (const gchar *fromuri);
/* FIXME: mailto? url? should make up its mind what its called. imho use 'uri' */
EMsgComposer * em_utils_compose_new_message_with_mailto (const gchar *url, const gchar *fromuri);
-void em_utils_edit_message (CamelMimeMessage *message, CamelFolder *folder);
+GtkWidget * em_utils_edit_message (CamelMimeMessage *message, CamelFolder *folder);
void em_utils_edit_messages (CamelFolder *folder, GPtrArray *uids, gboolean replace);
void em_utils_forward_attached (CamelFolder *folder, GPtrArray *uids, const gchar *fromuri);