aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2001-12-19 07:54:13 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2001-12-19 07:54:13 +0800
commitc7702f6292a047a73b2a8349b88a2ca46a2072b7 (patch)
tree4bfa69ad9b8f5f4664f7aa9ae8a8a40a42f63dce
parent6ff38bae5d1c7efaa874ab44e6e5eb5ad1b42b94 (diff)
downloadgsoc2013-evolution-c7702f6292a047a73b2a8349b88a2ca46a2072b7.tar
gsoc2013-evolution-c7702f6292a047a73b2a8349b88a2ca46a2072b7.tar.gz
gsoc2013-evolution-c7702f6292a047a73b2a8349b88a2ca46a2072b7.tar.bz2
gsoc2013-evolution-c7702f6292a047a73b2a8349b88a2ca46a2072b7.tar.lz
gsoc2013-evolution-c7702f6292a047a73b2a8349b88a2ca46a2072b7.tar.xz
gsoc2013-evolution-c7702f6292a047a73b2a8349b88a2ca46a2072b7.tar.zst
gsoc2013-evolution-c7702f6292a047a73b2a8349b88a2ca46a2072b7.zip
Argh, don't notify about new mail here. (fetch_mail_fetch): Notify about
2001-12-18 Jeffrey Stedfast <fejj@ximian.com> * mail-ops.c (filter_folder_free): Argh, don't notify about new mail here. (fetch_mail_fetch): Notify about new mail here instead. svn path=/trunk/; revision=15170
-rw-r--r--mail/ChangeLog4
-rw-r--r--mail/mail-ops.c36
2 files changed, 22 insertions, 18 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index ece98ae751..ccd835ef50 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,5 +1,9 @@
2001-12-18 Jeffrey Stedfast <fejj@ximian.com>
+ * mail-ops.c (filter_folder_free): Argh, don't notify about new
+ mail here.
+ (fetch_mail_fetch): Notify about new mail here instead.
+
* mail-accounts.c (construct): Setup the new-mail-notification
widgets.
(notify_command_changed): Update the command-line for new mail
diff --git a/mail/mail-ops.c b/mail/mail-ops.c
index cbccb274db..8a3b4076df 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 count, i;
+ int i;
if (m->source_folder)
camel_object_unref (CAMEL_OBJECT (m->source_folder));
@@ -163,22 +163,6 @@ 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));
}
@@ -271,7 +255,7 @@ fetch_mail_fetch (struct _mail_msg *mm)
{
struct _fetch_mail_msg *m = (struct _fetch_mail_msg *)mm;
struct _filter_mail_msg *fm = (struct _filter_mail_msg *)mm;
- int i;
+ int count, i;
if (m->cancel)
camel_operation_register (m->cancel);
@@ -363,6 +347,22 @@ fetch_mail_fetch (struct _mail_msg *mm)
if (m->cancel)
camel_operation_unregister (m->cancel);
+ count = camel_filter_driver_get_filtered_count (fm->driver);
+ camel_filter_driver_reset_filtered_count (fm->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 (fm->driver, mail_config_get_new_mail_notify_command (), NULL);
+ break;
+ default:
+ break;
+ }
+ }
+
/* we unref this here as it may have more work to do (syncing
folders and whatnot) before we are really done */
/* should this be cancellable too? (i.e. above unregister above) */