diff options
Diffstat (limited to 'libemail-utils')
-rw-r--r-- | libemail-utils/mail-mt.c | 14 | ||||
-rw-r--r-- | libemail-utils/mail-mt.h | 9 |
2 files changed, 21 insertions, 2 deletions
diff --git a/libemail-utils/mail-mt.c b/libemail-utils/mail-mt.c index ec2c52944a..b25257e94f 100644 --- a/libemail-utils/mail-mt.c +++ b/libemail-utils/mail-mt.c @@ -50,6 +50,7 @@ static MailMsgFreeActivityFunc free_activity = NULL; static MailMsgCompleteActivityFunc complete_activity = NULL; static MailMsgAlertErrorFunc alert_error = NULL; static MailMsgCancelActivityFunc cancel_activity = NULL; +static MailMsgGetAlertSinkFunc get_alert_sink = NULL; void mail_msg_register_activities (MailMsgCreateActivityFunc acreate, @@ -57,7 +58,8 @@ mail_msg_register_activities (MailMsgCreateActivityFunc acreate, MailMsgFreeActivityFunc freeact, MailMsgCompleteActivityFunc comp_act, MailMsgCancelActivityFunc cancel_act, - MailMsgAlertErrorFunc ealert) + MailMsgAlertErrorFunc ealert, + MailMsgGetAlertSinkFunc ealertsink) { /* XXX This is an utter hack to keep EActivity out * of EDS and still let Evolution do EActivity. */ @@ -67,6 +69,16 @@ mail_msg_register_activities (MailMsgCreateActivityFunc acreate, complete_activity = comp_act; cancel_activity = cancel_act; alert_error = ealert; + get_alert_sink = ealertsink; +} + +EAlertSink * +mail_msg_get_alert_sink () +{ + if (get_alert_sink) + return get_alert_sink (); + + return NULL; } static void diff --git a/libemail-utils/mail-mt.h b/libemail-utils/mail-mt.h index 055464b886..d2a20d273f 100644 --- a/libemail-utils/mail-mt.h +++ b/libemail-utils/mail-mt.h @@ -24,6 +24,7 @@ #define _MAIL_MT #include <camel/camel.h> +#include <libevolution-utils/e-alert-sink.h> typedef struct _MailMsg MailMsg; typedef struct _MailMsgInfo MailMsgInfo; @@ -44,6 +45,8 @@ typedef void (*MailMsgCancelActivityFunc) (GCancellable *cancellable); typedef void (*MailMsgAlertErrorFunc) (GCancellable *cancellable, const gchar *what, const gchar *message); +typedef EAlertSink * + (*MailMsgGetAlertSinkFunc) (void); struct _MailMsg { MailMsgInfo *info; @@ -62,6 +65,9 @@ struct _MailMsgInfo { MailMsgFreeFunc free; }; +/* Just till we move this out to EDS */ +EAlertSink * mail_msg_get_alert_sink (void); + /* setup ports */ void mail_msg_init (void); void mail_msg_register_activities (MailMsgCreateActivityFunc, @@ -69,7 +75,8 @@ void mail_msg_register_activities (MailMsgCreateActivityFunc, MailMsgFreeActivityFunc, MailMsgCompleteActivityFunc, MailMsgCancelActivityFunc, - MailMsgAlertErrorFunc); + MailMsgAlertErrorFunc, + MailMsgGetAlertSinkFunc); gboolean mail_in_main_thread (void); |