diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2010-10-17 21:40:36 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2010-10-19 00:32:37 +0800 |
commit | 35e55a8d6e3455efa92abd669680d191e3e4cbac (patch) | |
tree | 303d479aaaf12538d73f611f52db1157da64549b /mail/mail-autofilter.c | |
parent | b674a37a381d0328a7273bafa62d80203c8cdf70 (diff) | |
download | gsoc2013-evolution-35e55a8d6e3455efa92abd669680d191e3e4cbac.tar.gz gsoc2013-evolution-35e55a8d6e3455efa92abd669680d191e3e4cbac.tar.zst gsoc2013-evolution-35e55a8d6e3455efa92abd669680d191e3e4cbac.zip |
Send errors to an EAlertSink instead of the task bar.
This marks the end of unintrusive error dialogs, which were too
unintrusive. We now show errors directly in the main window using
the EAlert / EAlertSink framework.
Diffstat (limited to 'mail/mail-autofilter.c')
-rw-r--r-- | mail/mail-autofilter.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/mail/mail-autofilter.c b/mail/mail-autofilter.c index 566369a3b5..aac7deb49a 100644 --- a/mail/mail-autofilter.c +++ b/mail/mail-autofilter.c @@ -385,12 +385,13 @@ filter_gui_add_from_message (EMailSession *session, } void -mail_filter_rename_uri (EMailSession *session, +mail_filter_rename_uri (EMailBackend *backend, CamelStore *store, const gchar *olduri, const gchar *newuri) { EMFilterContext *fc; + EMailSession *session; const gchar *config_dir; gchar *user, *system; GList *changed; @@ -399,6 +400,8 @@ mail_filter_rename_uri (EMailSession *session, eolduri = em_uri_from_camel (olduri); enewuri = em_uri_from_camel (newuri); + session = e_mail_backend_get_session (backend); + fc = em_filter_context_new (session); config_dir = mail_session_get_config_dir (); user = g_build_filename (config_dir, "filters.xml", NULL); @@ -422,11 +425,12 @@ mail_filter_rename_uri (EMailSession *session, } void -mail_filter_delete_uri (EMailSession *session, +mail_filter_delete_uri (EMailBackend *backend, CamelStore *store, const gchar *uri) { EMFilterContext *fc; + EMailSession *session; const gchar *config_dir; gchar *user, *system; GList *deleted; @@ -434,6 +438,8 @@ mail_filter_delete_uri (EMailSession *session, euri = em_uri_from_camel (uri); + session = e_mail_backend_get_session (backend); + fc = em_filter_context_new (session); config_dir = mail_session_get_config_dir (); user = g_build_filename (config_dir, "filters.xml", NULL); @@ -443,7 +449,6 @@ mail_filter_delete_uri (EMailSession *session, deleted = e_rule_context_delete_uri ((ERuleContext *) fc, euri, g_str_equal); if (deleted) { - GtkWidget *dialog; GString *s; guint s_count; gchar *info; @@ -477,8 +482,8 @@ mail_filter_delete_uri (EMailSession *session, "The following filter rules\n%s have been modified " "to account for the deleted folder\n\"%s\".", s_count), s->str, euri); - dialog = e_alert_dialog_new_for_args (e_shell_get_active_window (NULL), "mail:filter-updated", info, NULL); - em_utils_show_info_silent (dialog); + e_mail_backend_submit_alert ( + backend, "mail:filter-updated", info, NULL); g_string_free (s, TRUE); g_free (info); |