← Back to team overview

dbusmenu-list team mailing list archive

libappindicator inline pixbuf question?

 

Hey, I just had a quick question about inline resources for libappindicator.

As you may be aware, Gtk provides a commandline tool called
gdk-pixbuf-csource, which generates c source from a given asset. It's
then possible to use gdk_pixbuf_new_from_inline to get a straight up
GdkPixbuf* and load that into the icon theme using
gtk_icon_theme_add_builtin_icon.

However, once I've done this and added my icon to the icon theme, the
AppIndicator menu I have in Unity does not show my custom icon. I
assume this is because the AppIndicator dbus protocol passes the icon
name and not the actual icon pixbuf data itself, and the indicator
server loads the icon in its own process space, oblivious to my call
to gtk_icon_theme_add_builtin_icon?

GtkStatusIcon does provide a way to set the icon directly from an
in-memory pixbuf. Is there any way I can get that to work with
AppIndicator, or do I really need to bundle custom theme icons
separately from my binary?

Thanks
-JT