views:

102

answers:

1

I'm currently writing a screen capture app for Windows and Linux using PyGTK, and I've hit a slight problem with displaying notifications. On Linux, I've been using the libnotify bindings to provide notifications, which has been working very well; however, this has no equivalent on Windows.

I'd use the Win32 APIs directly to display the notification if I could, but I can't seem to find any way to get the tray icon ID from either GTK or PyGTK.

So should I bite the bullet and write a new Windows-specific staus icon class using the Win32 APIs? Or is there a way to initiate a Win32 notification from (Py)GTK that I've missed?

If anyone has any other ideas for displaying simple notifications on Windows, I'd love to hear those too.

+1  A: 

Looking at the GtkStatusIcon source code I don't see the NOTIFYICONDATA exposed anywhere. For X11 there is get_x11_window_id, which has no equivalent and just returns 0 in Windows. Perhaps you could file a bug to request similar functionality.

For now, you'll have to create your own tray icon. A quick search at comp.lang.python gives useful result.

Johannes Sasongko
Thanks for your help. This looks as if this is the route I'll have to take.
Donald Harvey