Hello, Sonata was the last application which used the egg.trayicon module on my computer, so I decided to take a look to see if I could remove the dependency on this module, as this functionality is provided by gtk.StatusIcon.
At first glance, it looks like Sonata already supported StatusIcon, but not as well as egg.trayicon, in particular: * middle click on the tray icon didn't toggle play/pause * scrolling with the middle button didn't raise or lower the volume Looking in the code show that the support of both module is rather hard to follow: there are a bunch of ifs all around the code, methods and attributes which exist only to provide support for one or the other module, dispatched in different places... So, I decided to get my hands dirty, and I extracted all of this into dedicated classes, with the same interface. Now, Sonata only has one tray object, which wraps call to either egg.trayicon or gtk.StatusIcon. I also updated the support of gtk.StatusIcon so that it offers the same level of functionalities as egg.trayicon (at least for the two problems I raised below). Currently, the code works fine for me, with either gtk.StatusIcon or egg.trayicon, with only one remaining glitch: the "Enable system tray icon" can always be enabled or disable, whereas the underlying platform support it or not. Anyway, I decided to publish this, so that I can get feedback and potentially some help too. The patch is available in a TopGit branch 'refactor-tray-icon' on http://github.com/multani/sonata-tray-icon Eventually, I hope this patch to be integrated into the main repository when it will get ready. Any comments are welcome! Regards, Jonathan _______________________________________________ Sonata-users mailing list [email protected] https://lists.berlios.de/mailman/listinfo/sonata-users
