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



commit 5b41b4a5f86adba25b39aaf632414d227af2a041
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 7ffceb3..59b5acc 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]