indicator implementation for ubuntu unity

181 views
Skip to first unread message

11h11

unread,
Dec 19, 2011, 3:32:19 PM12/19/11
to wx-users
Hi,

My wxWidgets application doesn't work completely on Ubuntu 11.10 (with
Unity) because the new indicator system:
http://unity.ubuntu.com/projects/appindicators/

Right now, my application is using wxWidgets from SVN:
wxTaskBarIcon::IsAvailable() return TRUE even if I don't see my
application in the indicator

Would it be possible to include support for the new indicator, here's
a C example:
https://wiki.ubuntu.com/DesktopExperienceTeam/ApplicationIndicators#Typical_usage_.28C_version.29

If not, would it be possible to return FALSE for
wxTaskBarIcon::IsAvailable()?

PS. I don't like the new indicator and Ubuntu Unity, but many users
will use this system, so I need to be compatible with it.
Patrick

Vadim Zeitlin

unread,
Dec 19, 2011, 5:38:52 PM12/19/11
to wx-u...@googlegroups.com
On Mon, 19 Dec 2011 12:32:19 -0800 (PST) 11h11 <pat...@11h11.com> wrote:

> Right now, my application is using wxWidgets from SVN:
> wxTaskBarIcon::IsAvailable() return TRUE even if I don't see my
> application in the indicator

Perhaps there is a better way to test for GtkStatusIcon availability
than what we do now but I don't know what would it be. Does
gtk_status_icon_new() still work on this system?

> Would it be possible to include support for the new indicator, here's
> a C example:
> https://wiki.ubuntu.com/DesktopExperienceTeam/ApplicationIndicators#Typical_usage_.28C_version.29

It would, of course, be great to use their API if it's available (this
would have to be determined dynamically during run-time probably) but
someone would need to do it.

> If not, would it be possible to return FALSE for
> wxTaskBarIcon::IsAvailable()?

I don't know what's the official way to test for appindicator library
being used, it doesn't seem to provide any API to check for this as part of
itself. A quick web search found an advice to look whether indicator-applet
process is running but this looks like a really dirty hack. Better ideas
would be welcome.

Regards,
VZ

--
TT-Solutions: wxWidgets consultancy and technical support
http://www.tt-solutions.com/

11h11

unread,
Dec 20, 2011, 11:58:39 AM12/20/11
to wx-users
Maybe I found something (not sure if it's useful for wxWidgets):
http://mail.gnome.org/archives/networkmanager-list/2011-March/msg00105.html

It's a patch for the network-manager-applet:

"
To get better integration with Unity (and actually have nm-applet show
up at
all with Unity / compiz), implement drawing the applet using
libappindicator.

To play well with others, this patch actually implements
libappindicator
conditionally to running configure with --enable-indicator.
"

Vadim Zeitlin

unread,
Dec 20, 2011, 12:31:59 PM12/20/11
to wx-u...@googlegroups.com
On Tue, 20 Dec 2011 08:58:39 -0800 (PST) 11h11 <pat...@11h11.com> wrote:

> Maybe I found something (not sure if it's useful for wxWidgets):
> http://mail.gnome.org/archives/networkmanager-list/2011-March/msg00105.html
>
> It's a patch for the network-manager-applet:

It's probably useful but only as an example -- the real work still needs
to be done by someone.

> To play well with others, this patch actually implements libappindicator
> conditionally to running configure with --enable-indicator.

And as we want to be able to produce have the same binaries running under
both Ubuntu and the other systems, we need to do libappindicator detection
during run- and not compile-time, so our case is slightly more complicated.

11h11

unread,
Dec 21, 2011, 1:17:07 PM12/21/11
to wx-users
I've "whitelisted" my wxWidgets SVN application, but it's still not
showing in the indicator applet / systray:
http://askubuntu.com/questions/30742/how-do-i-access-and-enable-more-icons-to-be-in-the-system-tray

Not sure what to do

11h11

unread,
Jan 3, 2012, 9:56:08 AM1/3/12
to wx-users
By the way: no problem with Gnome 3 / Gnome Shell (tested in Linux
Mint 12). For now, I will check the "XDG_CURRENT_DESKTOP" environment
for "Unity" and will not hide my application for this desktop.

Josef Hopfgartner

unread,
Jan 19, 2014, 4:22:30 PM1/19/14
to wx-u...@googlegroups.com
this issue also concerns pyhoca-gui from x2go project.

Reply all
Reply to author
Forward
0 new messages