Hello,
I just want to share a class that helps using libappindicator with wxWidgets, in case it might be useful.
Please see the attachement.
A helper/wrapper class for libappindicator
A helper/wrapper class for libappindicator
- Attachments
-
- appindic-1.tar.gz
- (20.95 KiB) Downloaded 416 times
-
- appindic-0.tar.gz
- (20.7 KiB) Downloaded 359 times
- evstevemd
- Part Of The Furniture
- Posts: 2409
- Joined: Wed Jan 28, 2009 11:57 am
- Location: United Republic of Tanzania
Re: A helper/wrapper class for libappindicator
What is libindicator and what the class does?
Its not helpful to just dump the code
Its not helpful to just dump the code
Chief Justice: We have trouble dear citizens!
Citizens: What it is his honor?
Chief Justice:Our president is an atheist, who will he swear to?
Citizens: What it is his honor?
Chief Justice:Our president is an atheist, who will he swear to?
Re: A helper/wrapper class for libappindicator
As far as I can tell, libindicator itself is a base library on top of which many indicators have been built by Canonical, to suit their Unity desktop I suppose. An indicator is a GUI item sitting in the desktop's panel. You seem to be using Ubuntu, 'aptitude search indicator' will list a lot of those indicators.
libappindicator is one of those indicators. It makes an icon with a menu appear in the panel's 'system tray'.
This class wraps around libappindicator, expects a wxWenu and an icon, and shows the icon in the 'system tray'. The menu appears with a right-click on the icon. The icon would appear irrespective of xrender being used by the DE. For instance, it still appears in KDE4 through xrender, and in KDE5 with (K)StatusNotifier. wxTaskBar does not work with KDE5.
libappindicator is one of those indicators. It makes an icon with a menu appear in the panel's 'system tray'.
This class wraps around libappindicator, expects a wxWenu and an icon, and shows the icon in the 'system tray'. The menu appears with a right-click on the icon. The icon would appear irrespective of xrender being used by the DE. For instance, it still appears in KDE4 through xrender, and in KDE5 with (K)StatusNotifier. wxTaskBar does not work with KDE5.
- evstevemd
- Part Of The Furniture
- Posts: 2409
- Joined: Wed Jan 28, 2009 11:57 am
- Location: United Republic of Tanzania
Re: A helper/wrapper class for libappindicator
So basically this is extension to wxTaskBar to work in ubuntu and KDE correct? If so, why not contribute to wx directly?nmset wrote:As far as I can tell, libindicator itself is a base library on top of which many indicators have been built by Canonical, to suit their Unity desktop I suppose. An indicator is a GUI item sitting in the desktop's panel. You seem to be using Ubuntu, 'aptitude search indicator' will list a lot of those indicators.
libappindicator is one of those indicators. It makes an icon with a menu appear in the panel's 'system tray'.
This class wraps around libappindicator, expects a wxWenu and an icon, and shows the icon in the 'system tray'. The menu appears with a right-click on the icon. The icon would appear irrespective of xrender being used by the DE. For instance, it still appears in KDE4 through xrender, and in KDE5 with (K)StatusNotifier. wxTaskBar does not work with KDE5.
You can start a topic about it in wx-dev list
https://groups.google.com/forum/#!forum/wx-dev
Chief Justice: We have trouble dear citizens!
Citizens: What it is his honor?
Chief Justice:Our president is an atheist, who will he swear to?
Citizens: What it is his honor?
Chief Justice:Our president is an atheist, who will he swear to?
Re: A helper/wrapper class for libappindicator
If you see https://groups.google.com/d/msg/wx-dev/ ... XE-gIHsc8J, we can say that this class is Linux only and hence does have its place in a cross-platform library.
In general, wxWidgets maintainers are well aware of things posted here that can be interesting enough for them to look at. I therefore think that this class does not have such meaning for the wxWidgets library.
In general, wxWidgets maintainers are well aware of things posted here that can be interesting enough for them to look at. I therefore think that this class does not have such meaning for the wxWidgets library.
Re: A helper/wrapper class for libappindicator
Hello,
After playing again with the app-indicator thing, I ended up with a much simpler code, attached in this post. It just plugs the wxMenu::m_menu object representing a GtkMenu in the indicator. The shown GTK menu has all the attributes of the source wxMenu, of which it is another representation, and changes as the source menu is modified.
Of course, it's for WXGTK builds on Linux only.
Cheers.
After playing again with the app-indicator thing, I ended up with a much simpler code, attached in this post. It just plugs the wxMenu::m_menu object representing a GtkMenu in the indicator. The shown GTK menu has all the attributes of the source wxMenu, of which it is another representation, and changes as the source menu is modified.
Of course, it's for WXGTK builds on Linux only.
Cheers.
- Attachments
-
- appindic-2.tar.gz
- (21.85 KiB) Downloaded 390 times