aboutsummaryrefslogtreecommitdiffstats
path: root/mail/mail-ops.c
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2001-12-19 07:22:36 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2001-12-19 07:22:36 +0800
commitb265717d397e190684652329e6fd28e7ae482a0d (patch)
tree900f5162f15ef8c65be7c80a4d1cc020b15441a7 /mail/mail-ops.c
parent6fe06db13a319b36aa16d1c41e0dadd426ea5034 (diff)
downloadgsoc2013-evolution-b265717d397e190684652329e6fd28e7ae482a0d.tar.gz
gsoc2013-evolution-b265717d397e190684652329e6fd28e7ae482a0d.tar.zst
gsoc2013-evolution-b265717d397e190684652329e6fd28e7ae482a0d.zip
Setup the new-mail-notification widgets. (notify_command_changed): Update
2001-12-18 Jeffrey Stedfast <fejj@ximian.com> * mail-accounts.c (construct): Setup the new-mail-notification widgets. (notify_command_changed): Update the command-line for new mail notification. (notify_radio_toggled): Update the new-mail-notification type. * mail-ops.c (filter_folder_free): See if we got any new mail and "sound the alarm" if we did. svn path=/trunk/; revision=15168
Diffstat (limited to 'mail/mail-ops.c')
-rw-r--r--mail/mail-ops.c18
1 files changed, 17 insertions, 1 deletions
diff --git a/mail/mail-ops.c b/mail/mail-ops.c
index 023d1781d1..cbccb274db 100644
--- a/mail/mail-ops.c
+++ b/mail/mail-ops.c
@@ -145,7 +145,7 @@ static void
filter_folder_free (struct _mail_msg *mm)
{
struct _filter_mail_msg *m = (struct _filter_mail_msg *)mm;
- int i;
+ int count, i;
if (m->source_folder)
camel_object_unref (CAMEL_OBJECT (m->source_folder));
@@ -163,6 +163,22 @@ filter_folder_free (struct _mail_msg *mm)
if (m->destination)
camel_object_unref (CAMEL_OBJECT (m->destination));
+ count = camel_filter_driver_get_filtered_count (m->driver);
+ camel_filter_driver_reset_filtered_count (m->driver);
+
+ if (count > 0) {
+ switch (mail_config_get_new_mail_notify ()) {
+ case MAIL_CONFIG_NOTIFY_BEEP:
+ gdk_beep ();
+ break;
+ case MAIL_CONFIG_NOTIFY_EXEC:
+ mail_execute_shell_command (m->driver, mail_config_get_new_mail_notify_command (), NULL);
+ break;
+ default:
+ break;
+ }
+ }
+
if (m->driver)
camel_object_unref (CAMEL_OBJECT (m->driver));
}