[Spambayes] Outlook addin: Removing the tray icon

Mark Hammond mhammond at skippinet.com.au
Fri Dec 6 03:21:46 2002


> It's always bugged me that Outlook leaves the New Mail icon in the
> system tray after a rule or addin has moved or deleted all the newly
> arrived e-mail.  I know there's no programmatic interface to remove the
> icon but I found some Visual Basic code at
> http://www.slipstick.com/dev/code/clearenvicon.htm that does the job.
> I've converted the three pages of VB to 5 lines of python (!) and
> submitted it as a patch
> (http://sourceforge.net/tracker/index.php?func=detail&aid=648271&group_i
> d=61702&atid=498105).
>
> I'm a bit bamboozled where to put it in the actual addin code so I'm
> hoping someone more knowledgeable than me will be able to do that.  I
> imagine it should be invoked after scanning all new e-mail in the inbox
> and determining that all of it was spam.

I'm not sure that this addin is the correct place for this code, or how you
picture it working.

One way would be that if there are no new items in the Inbox after
filtering, the icon is removed.  While this sounds OK on the face of it, I'm
not sure how useful it will be in the real world - it certainly won't help
me.  I can't remember the last time my inbox had zero unread items <frown>.

What I *could* see is a useful standalone addin just for this purpose.  This
addin would actually *replace* the Outlook item.  This could be smarter -
such as only showing up if there are new items since you last opened
outlook.  This would be far more useful, but beyond the scope of the
SpamBayes addin.  It really wouldn't be too hard, and I would be happy to
help out with it - we certainly have all the tools available, including a
sample that creates a new taskbar icon, etc.  It would make a great sample
for win32all ;)

Of course, if others think that a simple bit of code in the addin would be
useful for the majority, then speak up and I will squish it in somewhere...

Mark.




More information about the Spambayes mailing list