[Haiku-commits] r31028 - haiku/trunk/src/add-ons/mail_daemon/system_filters/notifier
mmlr at mail.berlios.de
mmlr at mail.berlios.de
Sat Jun 13 15:00:49 CEST 2009
Author: mmlr
Date: 2009-06-13 15:00:48 +0200 (Sat, 13 Jun 2009)
New Revision: 31028
ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=31028&view=rev
Modified:
haiku/trunk/src/add-ons/mail_daemon/system_filters/notifier/filter.cpp
Log:
Do not notify about auto-read messages. For example when setting spam to be
marked as read automatically I don't really want to get the notification alert.
This has been laying around on my drive for a long time now...
Modified: haiku/trunk/src/add-ons/mail_daemon/system_filters/notifier/filter.cpp
===================================================================
--- haiku/trunk/src/add-ons/mail_daemon/system_filters/notifier/filter.cpp 2009-06-13 11:40:05 UTC (rev 31027)
+++ haiku/trunk/src/add-ons/mail_daemon/system_filters/notifier/filter.cpp 2009-06-13 13:00:48 UTC (rev 31028)
@@ -8,6 +8,7 @@
#include <String.h>
#include <Alert.h>
#include <Beep.h>
+#include <Path.h>
#include <Application.h>
#include <MailAddon.h>
@@ -63,15 +64,20 @@
return B_OK;
}
-status_t NotifyFilter::ProcessMailMessage(BPositionIO**, BEntry*, BMessage*headers, BPath*, const char*)
+status_t NotifyFilter::ProcessMailMessage(BPositionIO**, BEntry*, BMessage*headers, BPath*path, const char*)
{
if (callback == NULL) {
callback = new NotifyCallback(strategy,_runner,this);
_runner->RegisterProcessCallback(callback);
}
- if (!headers->FindBool("ENTIRE_MESSAGE"))
- callback->num_messages ++;
+ if (!headers->FindBool("ENTIRE_MESSAGE")) {
+ BString status;
+ headers->FindString("STATUS", &status);
+ // do not notify about auto-read messages
+ if (status.Compare("Read") != 0)
+ callback->num_messages ++;
+ }
return B_OK;
}
More information about the Haiku-commits
mailing list