(Py)GTK StatusIcon notifications on Windows
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.
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.
精彩评论