From 1fcc2835b5a466d11c29299e3ae20919e37bce52 Mon Sep 17 00:00:00 2001 From: Jeffrey Stedfast Date: Tue, 19 Aug 2003 17:59:34 +0000 Subject: Removed the new-mail-notification mess. 2003-08-18 Jeffrey Stedfast * mail-session.c (main_get_filter_driver): Removed the new-mail-notification mess. * mail-folder-cache.c (notify_idle_cb): New idle callback to alert the user about new mail. (notify_type_changed): New function to intercept user changes to his/her notification settings changes. (real_flush_updates): Initialise new mail notification if not yet initialised and setup an idle callback if none is already set. (update_1folder): Now takes an additional argument `new' which states whether or not the fodler got any new mail so that we may handle notify the user (if needed). (folder_changed): Pass in the number of new messages received. svn path=/trunk/; revision=22290 --- mail/mail-session.c | 34 ---------------------------------- 1 file changed, 34 deletions(-) (limited to 'mail/mail-session.c') diff --git a/mail/mail-session.c b/mail/mail-session.c index a411d3756d..66a41099b9 100644 --- a/mail/mail-session.c +++ b/mail/mail-session.c @@ -616,40 +616,6 @@ main_get_filter_driver (CamelSession *session, const char *type, CamelException fsearch = g_string_new (""); faction = g_string_new (""); - /* 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 - "incoming" filter type */ - notify = gconf_client_get_int (gconf, "/apps/evolution/mail/notify/type", NULL); - if (notify != MAIL_CONFIG_NOTIFY_NOT && !strcmp (type, "incoming")) { - char *filename; - - g_string_truncate (faction, 0); - - g_string_append (faction, "(only-once \"new-mail-notification\" "); - - switch (notify) { - case MAIL_CONFIG_NOTIFY_PLAY_SOUND: - filename = gconf_client_get_string (gconf, "/apps/evolution/mail/notify/sound", NULL); - if (filename) { - g_string_append_printf (faction, "\"(play-sound \\\"%s\\\")\"", filename); - g_free (filename); - break; - } - /* fall through */ - case MAIL_CONFIG_NOTIFY_BEEP: - g_string_append (faction, "\"(beep)\""); - break; - default: - break; - } - - g_string_append (faction, ")"); - - 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); -- cgit