aboutsummaryrefslogtreecommitdiffstats
path: root/mail/em-composer-utils.c
diff options
context:
space:
mode:
authorSrinivasa Ragavan <sragavan@src.gnome.org>2007-07-09 04:06:54 +0800
committerSrinivasa Ragavan <sragavan@src.gnome.org>2007-07-09 04:06:54 +0800
commit301528d84bf582d956c0e9b768e4f60259f0cf88 (patch)
tree805da1fd93810067b918d8467f4b753cf9c68180 /mail/em-composer-utils.c
parent3615c9dbb4749849de6ea7d913b5c9bc73ba70ce (diff)
downloadgsoc2013-evolution-301528d84bf582d956c0e9b768e4f60259f0cf88.tar.gz
gsoc2013-evolution-301528d84bf582d956c0e9b768e4f60259f0cf88.tar.zst
gsoc2013-evolution-301528d84bf582d956c0e9b768e4f60259f0cf88.zip
Commit for tnef attachment and attachment reminder
svn path=/trunk/; revision=33769
Diffstat (limited to 'mail/em-composer-utils.c')
-rw-r--r--mail/em-composer-utils.c21
1 files changed, 20 insertions, 1 deletions
diff --git a/mail/em-composer-utils.c b/mail/em-composer-utils.c
index 942ac1e897..ca24ac3db0 100644
--- a/mail/em-composer-utils.c
+++ b/mail/em-composer-utils.c
@@ -256,6 +256,8 @@ composer_get_message (EMsgComposer *composer, gboolean save_html_object_data)
EAccount *account;
int i;
GList *postlist;
+ EMEvent *eme;
+ EMEventTargetMessage *target;
gconf = mail_config_get_gconf_client ();
@@ -355,11 +357,28 @@ composer_get_message (EMsgComposer *composer, gboolean save_html_object_data)
goto finished;
}
+ /** @Event: composer.presendchecks
+ * @Title: Composer PreSend Checks
+ * @Target: EMEventTargetMessage
+ *
+ * composer.presendchecks is emitted during pre-checks for the message just before sending.
+ * Since the e-plugin framework doesn't provide a way to return a value from the plugin,
+ * use 'presend_check_status' to set whether the check passed / failed.
+ */
+ eme = em_event_peek();
+ target = em_event_target_new_composer (eme, composer, 0);
+ g_object_set_data (composer, "presend_check_status", GINT_TO_POINTER(0));
+
+ e_event_emit((EEvent *)eme, "composer.presendchecks", (EEventTarget *)target);
+
+ if (GPOINTER_TO_INT (g_object_get_data (composer, "presend_check_status")))
+ goto finished;
+
/* actually get the message now, this will sign/encrypt etc */
message = e_msg_composer_get_message (composer, save_html_object_data);
if (message == NULL)
goto finished;
-
+
/* Add info about the sending account */
account = e_msg_composer_get_preferred_account (composer);