diff options
author | Jeffrey Stedfast <fejj@ximian.com> | 2002-10-16 12:07:31 +0800 |
---|---|---|
committer | Jeffrey Stedfast <fejj@src.gnome.org> | 2002-10-16 12:07:31 +0800 |
commit | 03224d610f89068b30571d94dee3cae77c34f221 (patch) | |
tree | 16e73291533846ba3ca1fed2c52ccbb41023e901 /mail/mail-session.c | |
parent | 151aa621b445174f006f30b6d095b7a03779a382 (diff) | |
download | gsoc2013-evolution-03224d610f89068b30571d94dee3cae77c34f221.tar.gz gsoc2013-evolution-03224d610f89068b30571d94dee3cae77c34f221.tar.zst gsoc2013-evolution-03224d610f89068b30571d94dee3cae77c34f221.zip |
Add the new-mail-notify rule to the filter driver before adding the user
2002-10-15 Jeffrey Stedfast <fejj@ximian.com>
* mail-session.c (main_get_filter_driver): Add the new-mail-notify
rule to the filter driver before adding the user defined filter
rules so that we can be sure that the new-mail-notify rule gets
invoked. Fixes bug #32328.
* mail-composer-prefs.c (mail_composer_prefs_new_signature): Make
sure that name[0] cannot ever be NULL. Should maybe fix bug
#32230.
svn path=/trunk/; revision=18374
Diffstat (limited to 'mail/mail-session.c')
-rw-r--r-- | mail/mail-session.c | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/mail/mail-session.c b/mail/mail-session.c index cb2e709a69..011f09edca 100644 --- a/mail/mail-session.c +++ b/mail/mail-session.c @@ -871,16 +871,7 @@ main_get_filter_driver (CamelSession *session, const char *type, CamelException fsearch = g_string_new (""); faction = g_string_new (""); - while ((rule = rule_context_next_rule (fc, rule, type))) { - g_string_truncate (fsearch, 0); - g_string_truncate (faction, 0); - - filter_rule_build_code (rule, fsearch); - filter_filter_build_action ((FilterFilter *)rule, faction); - - camel_filter_driver_add_rule (driver, rule->name, - fsearch->str, faction->str); - } + /* add the new-mail notification rule first to be sure that it gets invoked */ /* FIXME: we need a way to distinguish between filtering new mail and re-filtering a folder because both use the @@ -907,10 +898,23 @@ main_get_filter_driver (CamelSession *session, const char *type, CamelException camel_filter_driver_add_rule (driver, "new-mail-notification", "(begin #t)", faction->str); } + /* add the user-defined rules next */ + while ((rule = rule_context_next_rule (fc, rule, type))) { + g_string_truncate (fsearch, 0); + g_string_truncate (faction, 0); + + filter_rule_build_code (rule, fsearch); + filter_filter_build_action ((FilterFilter *)rule, faction); + + camel_filter_driver_add_rule (driver, rule->name, + fsearch->str, faction->str); + } + g_string_free (fsearch, TRUE); g_string_free (faction, TRUE); gtk_object_unref (GTK_OBJECT (fc)); + return driver; } |