Putting an arbitrary gtk.Widget into an appindicator.Indicator

The Application Indicator menu support is based on D-Bus menus, which are limited in what they support - they only support basic menu functionality, not more exotic things such as arbitrary widgets.

One significant roadblock to them ever supporting such things is the fact that the application indicator menu is rendered by a different process, the application indicator process, so your program doesn't have access to directly draw anything on it. Overcoming this would require either supporting something like X-Embed in D-Bus menus or allowing all of GTK to work over D-Bus.


The sound indicator in Ubuntu has sliders for the volume and I wondered how that is possible. After a look in the code it seems there are GtkMenus which can be filled via dbus meanwhile: https://developer.ubuntu.com/api/devel/ubuntu-12.04/c/dbusmenugtk/index.html

But I don't know how to use them. Wanted to write a sound indicator where I can control the volume per-app just like pavucontrol can do it.