[evolution/wip/webkit-composer] EMComposerUtils: Get EAlertSink from EMsgComposer



commit cc2beb902a17375e390d5cda6273f1ace370019c
Author: Tomas Popela <tpopela redhat com>
Date:   Fri Feb 28 11:05:43 2014 +0100

    EMComposerUtils: Get EAlertSink from EMsgComposer

 mail/em-composer-utils.c |   14 +++++++++++---
 1 files changed, 11 insertions(+), 3 deletions(-)
---
diff --git a/mail/em-composer-utils.c b/mail/em-composer-utils.c
index 4a31fe2..25c5219 100644
--- a/mail/em-composer-utils.c
+++ b/mail/em-composer-utils.c
@@ -296,9 +296,17 @@ composer_presend_check_recipients (EMsgComposer *composer,
 
        /* I'm sensing a lack of love, er, I mean recipients. */
        if (num == 0 && num_post == 0) {
-               e_alert_submit (
-                       E_ALERT_SINK (composer),
-                       "mail:send-no-recipients", NULL);
+               EEditor *editor;
+               EActivity *activity;
+               EAlertSink *alert_sink;
+
+               editor = e_msg_composer_get_editor (composer);
+               activity = e_editor_new_activity (editor);
+               alert_sink = e_activity_get_alert_sink (activity);
+
+               e_alert_submit (alert_sink, "mail:send-no-recipients", NULL);
+
+               g_object_unref (activity);
                goto finished;
        }
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]