From b863a7b2772d17f31fef3febaa2967be632190c0 Mon Sep 17 00:00:00 2001 From: Jeffrey Stedfast Date: Wed, 23 Jan 2002 00:13:08 +0000 Subject: Now takes a boolean notify argument. If this is *not* set, then remove the 2002-01-22 Jeffrey Stedfast * mail-ops.c (mail_filter_folder): Now takes a boolean notify argument. If this is *not* set, then remove the sound-notify filter rule that mail-session adds. Kinda kludgy, but good enough for the moment. * mail-callbacks.c (guess_me): Simplified. svn path=/trunk/; revision=15426 --- mail/ChangeLog | 5 +++++ mail/mail-ops.c | 11 +++++++++-- mail/mail-ops.h | 3 ++- 3 files changed, 16 insertions(+), 3 deletions(-) diff --git a/mail/ChangeLog b/mail/ChangeLog index bb96c9d103..6b88363369 100644 --- a/mail/ChangeLog +++ b/mail/ChangeLog @@ -1,5 +1,10 @@ 2002-01-22 Jeffrey Stedfast + * mail-ops.c (mail_filter_folder): Now takes a boolean notify + argument. If this is *not* set, then remove the sound-notify + filter rule that mail-session adds. Kinda kludgy, but good enough + for the moment. + * mail-callbacks.c (guess_me): Simplified. 2002-01-21 Jeffrey Stedfast diff --git a/mail/mail-ops.c b/mail/mail-ops.c index a8b515c832..fa43d361f3 100644 --- a/mail/mail-ops.c +++ b/mail/mail-ops.c @@ -177,7 +177,8 @@ static struct _mail_msg_op filter_folder_op = { void mail_filter_folder (CamelFolder *source_folder, GPtrArray *uids, - const char *type, CamelOperation *cancel) + const char *type, gboolean notify, + CamelOperation *cancel) { struct _filter_mail_msg *m; @@ -194,6 +195,12 @@ mail_filter_folder (CamelFolder *source_folder, GPtrArray *uids, m->driver = camel_session_get_filter_driver (session, type, NULL); + if (!notify) { + /* FIXME: have a #define NOTIFY_FILTER_NAME macro? */ + /* the filter name has to stay in sync with mail-session::get_filter_driver */ + camel_filter_driver_remove_rule_by_name (m->driver, "new-mail-notification"); + } + e_thread_put (mail_thread_new, (EMsg *)m); } @@ -201,7 +208,7 @@ mail_filter_folder (CamelFolder *source_folder, GPtrArray *uids, void mail_filter_on_demand (CamelFolder *folder, GPtrArray *uids) { - mail_filter_folder (folder, uids, FILTER_SOURCE_INCOMING, NULL); + mail_filter_folder (folder, uids, FILTER_SOURCE_INCOMING, FALSE, NULL); } /* ********************************************************************** */ diff --git a/mail/mail-ops.h b/mail/mail-ops.h index 262515501b..e9c9caa91a 100644 --- a/mail/mail-ops.h +++ b/mail/mail-ops.h @@ -140,7 +140,8 @@ void mail_fetch_mail (const char *source, int keep, void *data); void mail_filter_folder (CamelFolder *source_folder, GPtrArray *uids, - const char *type, CamelOperation *cancel); + const char *type, gboolean notify, + CamelOperation *cancel); /* convenience function for above */ void mail_filter_on_demand (CamelFolder *folder, GPtrArray *uids); -- cgit v1.2.3