aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2010-11-01 04:02:30 +0800
committerMatthew Barnes <mbarnes@redhat.com>2010-11-01 10:54:30 +0800
commit82925c6be94e9e48e4ef521a88a9feec24cf9eef (patch)
tree715d8578cd7b94eda1e7e0ade89057ea4fac5349 /mail
parentcce2026f452ec3171a2211fb83651c90e71182a2 (diff)
downloadgsoc2013-evolution-82925c6be94e9e48e4ef521a88a9feec24cf9eef.tar.gz
gsoc2013-evolution-82925c6be94e9e48e4ef521a88a9feec24cf9eef.tar.zst
gsoc2013-evolution-82925c6be94e9e48e4ef521a88a9feec24cf9eef.zip
Pass an EAlertSink to e_alert_sink_submit_alert().
Passing a random GtkWidget and then searching its ancestors for an EAlertSink turned out to be not as useful as I thought. Most of the time we know about and have access to the widget that implements EAlertSink, so just pass it directly as an EAlertSink.
Diffstat (limited to 'mail')
-rw-r--r--mail/e-mail-backend.c3
-rw-r--r--mail/em-composer-utils.c9
-rw-r--r--mail/mail-mt.c5
3 files changed, 10 insertions, 7 deletions
diff --git a/mail/e-mail-backend.c b/mail/e-mail-backend.c
index 36b244d8d4..09cbcae8ef 100644
--- a/mail/e-mail-backend.c
+++ b/mail/e-mail-backend.c
@@ -29,6 +29,7 @@
#include "e-util/e-account-utils.h"
#include "e-util/e-alert-dialog.h"
+#include "e-util/e-alert-sink.h"
#include "misc/e-account-combo-box.h"
@@ -637,6 +638,6 @@ e_mail_backend_submit_alert (EMailBackend *backend,
shell_content = e_shell_view_get_shell_content (shell_view);
va_start (va, tag);
- e_alert_submit_valist (GTK_WIDGET (shell_content), tag, va);
+ e_alert_submit_valist (E_ALERT_SINK (shell_content), tag, va);
va_end (va);
}
diff --git a/mail/em-composer-utils.c b/mail/em-composer-utils.c
index 6aebe52dc7..85d5bb26d4 100644
--- a/mail/em-composer-utils.c
+++ b/mail/em-composer-utils.c
@@ -39,6 +39,7 @@
#include "e-util/e-account-utils.h"
#include "e-util/e-alert-dialog.h"
+#include "e-util/e-alert-sink.h"
#include "e-util/e-util.h"
#include "shell/e-shell.h"
@@ -302,7 +303,7 @@ 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 (
- GTK_WIDGET (composer),
+ E_ALERT_SINK (composer),
"mail:send-no-recipients", NULL);
goto finished;
}
@@ -349,7 +350,7 @@ composer_presend_check_account (EMsgComposer *composer)
if (!check_passed)
e_alert_submit (
- GTK_WIDGET (composer),
+ E_ALERT_SINK (composer),
"mail:send-no-account-enabled", NULL);
return check_passed;
@@ -614,7 +615,7 @@ composer_save_to_drafts_cleanup (CamelFolder *drafts_folder,
if (error != NULL) {
g_warn_if_fail (context->message_uid == NULL);
e_alert_submit (
- GTK_WIDGET (context->composer),
+ E_ALERT_SINK (context->composer),
"mail-composer:save-to-drafts-error",
error->message, NULL);
async_context_free (context);
@@ -774,7 +775,7 @@ composer_save_to_outbox_completed (CamelFolder *outbox_folder,
if (error != NULL) {
e_alert_submit (
- GTK_WIDGET (context->composer),
+ E_ALERT_SINK (context->composer),
"mail-composer:append-to-outbox-error",
error->message, NULL);
g_error_free (error);
diff --git a/mail/mail-mt.c b/mail/mail-mt.c
index 8e507e46fc..21471c5108 100644
--- a/mail/mail-mt.c
+++ b/mail/mail-mt.c
@@ -27,6 +27,7 @@
#include <libedataserver/e-flag.h>
+#include <e-util/e-alert-sink.h>
#include <shell/e-shell-view.h>
#include "mail-mt.h"
@@ -252,13 +253,13 @@ mail_msg_check_error (gpointer msg)
if (m->info->desc && (what = m->info->desc (m))) {
e_alert_submit (
- GTK_WIDGET (shell_content),
+ E_ALERT_SINK (shell_content),
"mail:async-error", what,
m->error->message, NULL);
g_free (what);
} else
e_alert_submit (
- GTK_WIDGET (shell_content),
+ E_ALERT_SINK (shell_content),
"mail:async-error-nodescribe",
m->error->message, NULL);
}