Le 30/06/2015 04:30, Adrien Prokopowicz a écrit : > Le Mon, 29 Jun 2015 03:53:23 +0200, Benoît Minisini > <[email protected]> a écrit: > >> Hi, >> >> In revision #7154, I have replaced the gb.form.statusicon component by a >> component named gb.dbus.trayicon. >> >> This new component is now automatically loaded by the GUI components >> when the current desktop is KDE 4 or KDE 5. Otherwise, the old protocol >> is used. >> >> That way, you write your TrayIcon code once, and it will adapt to the >> desktop. >> >> The remaining problems are : >> >> - It works with KDE5 for sure. >> >> - It must be tested with KDE4. >> >> - It does not work with Unity apparently, no idea why. >> >> But the idea is there: find another language on Linux that allows you to >> define a tray icon that automatically adapts to the protocol used by the >> current desktop, with GTK+2, GTK+3, QT4 or QT5! :-) >> >> Regards, >> > > I just tested it on KUbuntu 14.04 LTS with KDE4, and it works > like a charm (see attached screenshot). :) > > The only thing to note is that SNI only got implemented by Plasma in > KDE 4.5[0], so there is a case where gb.dbus.trayicon may get loaded > without a StatusNotifierHost being actually available.
Ha! How to check that a StatusNotifierHost is present without loading the dbus component and calling any external process? :-/ The environment tells me the major version of the KDE desktop, but not its minor version... > > Great job though ! I love the fact that apps automagically adapt to > what they're running within. > > [0] > https://techbase.kde.org/Schedules/KDE4/4.5_Feature_Plan#kdebase-workspace > In the meantime I investigated with Unity... They actually use a DBus protocol completly different from the KDE one, but apparently QT apps using sni-qt (like vlc) know how to deal with that. I will try to look into the sni-qt source code to understand the magic behind that. Of course, don't expect to find any good documentation about that Unity protocol (a.k.a. libappindicator). -- Benoît Minisini ------------------------------------------------------------------------------ Don't Limit Your Business. Reach for the Cloud. GigeNET's Cloud Solutions provide you with the tools and support that you need to offload your IT needs and focus on growing your business. Configured For All Businesses. Start Your Cloud Today. https://www.gigenetcloud.com/ _______________________________________________ Gambas-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/gambas-user
