GMail TrayIcon 10
I’ve played with Lego today
Well, it was some kind of special Lego… I’ve taken bricks from :
- A nice tutorial about Tray Icons for GNOME
- An perfect and simple example
- An amazing Mono Live
- GPL icons from a nice project
- A simple ATOM feed
With those bricks, I’ve made a very simple and totally incomplete GMail Notification Icon for GNOME. It looks like that:
Yet, it’s no really usable. Username and password are hard-coded, and you just know if you have, or not, unread mails.
If someone is willing to use my code to produce a better applet, he would not have a lot of things to do. The list is simple:
- Use GConf to save username and password
- Write a really simple window to ask user whether or not username and password have to be stored
- Write another simple window to be shown when a new mail arrives, and then disappears
This nice person will find the code here: GMailTray
Trackbacks
Use the following link to trackback from your own site:
http://evain.net/blog/articles/trackback/21

Hi! I saw this post at monologue and I’m intested in getting something started. I didn’t know Google had “ATOM” feeds for Gmail. I made a script for Openbox for gmail using libgmail and was thinking of making a tray icon program, but wasn’t sure how to call a python lib file in mono. Anyway it seems you did the hard stuff, I think the other stuff would be easier. If anyone is interested in helping also email me. We need a repo, I can get a SVN one if absolutely needed.
There is a project called mail-notification which is really nice.
http://www.nongnu.org/mailnotify/
Just thought you might like to know.
-kyle
Hi,
Is it possible for you to extend this app to include support for POP and IMAP? The reason I ask is because mail-notification uses too many resources (>50 MB RAM).
Maybe I can help out.
/Chris
I’ve implemented the things you asked for, probably in a bad way, but it was quick. (I’m pretty sure it leaks window references.)
I’ve uploaded it to my website wm-eddie.info/pub/gmailtray.tar.gz
Let me know if anyone else makes any changes.
I didn’t implement the pop-up window though, I don’t like them.
Implemented too. Great in order to learn programming.
I’ve added the pop-up window and the base for internationalisation.
http://membres.lycos.fr/corkmc/Gmailtray.tar.gz
(sorry for my english)
@Cr3pE your source doesn’t compile, I get these errors…
syntax error, got token `OPEN_BRACE’
Applet.cs(133) error CS1002: Expecting `;’
Applet.cs(150) error CS0116: A namespace can only contain types and namespace declarations
Applet.cs(155) error CS0116: A namespace can only contain types and namespace declarations
Applet.cs(160) error CS0116: A namespace can only contain types and namespace declarations
Applet.cs(166) error CS0116: A namespace can only contain types and namespace declarations
Applet.cs(175) error CS0116: A namespace can only contain types and namespace declarations
syntax error, got token `CLOSE_BRACE’
Applet.cs(186) error CS8025: Parsing error
I updated my tar.gz with some HIG compliant dialogs. This is about as far as I’m going to go with it.
http://www.wm-eddie.info/pub/gmailtray.tar.gz
Hum… I’ve the same error when I compile with the command line but nothing when I compile with MonoDevelop…
Any idea? (I’m on ubuntu)
Ok. It’s updated. I don’t know why the ‘‘ was unvisible :s…
Thanks! :)