[Evolution-hackers] Re: NewMail notification from folder.changed event



> 
> Looking at the code, I see that the folder.changed event is passed an EMEventTargetFolder structure, which is contains a flag EM_EVENT_FOLDER_NEWMAIL (although curiously this flag is inverted in em_event_target_new_folder() - not
> sure why).
> 
> Therefore the plugin code in new-mail-notify.c could potentially test this flag to decide wether to send the dbus message - this would save having to code a brand new plugin event type.
> 

Looking further, I see it is worse than this. In function
real_flush_updates() (which originates the folder.changed
event) the up->new field is used to set flag
EM_EVENT_FOLDER_NEWMAIL. However, up->new is not an indication of truely new mail, but rather is a count
of mail added to this folder (regardless of its unread
status).

So this is why even things like 'play sound' are incorrect -
since this same function triggers that notification if
up->new is non-zero.

I'll keep digging ...

-----------------------------------------
Email sent from www.ntlworld.com
Virus-checked using McAfee(R) Software 
Visit www.ntlworld.com/security for more information




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]