DATADIR vs. gtkrc's pixmap_path

Luke Schierer lschiere at
Sat Mar 1 15:41:03 EST 2008

On Sat, Mar 01, 2008 at 01:14:28PM +0000, Will Thompson wrote:
> G'day,
>   Whenever we load an icon, we build a path relative to DATADIR, and
>   load that.  On Win32, DATADIR expands to a function; on *nix, it's a
>   constant.  Thomas "reiffert" Reifferscheid mentioned that this is a
>   problem for building an OS X application bundle of Pidgin, because you
>   can't know in advance where DATADIR should be.  It also means that
>   people can't use the pixmap_path gtkrc setting to make Pidgin use
>   different icon at runtime.
>   After some discussion, we figured out that Pidgin should probably be
>   using gtk_rc_find_pixmap_in_path () to build the paths to icons,
>   rather than doing so directly.  We can add DATADIR to the GtkSettings
>   at 'application' priority, so that nothing changes out of the box; but
>   people could then set pixmap_path in their own gtkrc to use different
>   icons (and in Thomas' case, use it to tell Pidgin where it happens to
>   be running today).
>   Is there some reason that we don't already do this?
> pixmap_path:
>     <>
> find_pixmap_in_path():
>     <>

I *suspect* that its simply a case where we didn't realize that gtk had
a function for it when it was first written.  I don't see any objection
to the method you outline here.  I'd check with Stu to make sure this'll
work on the various older gtks we want to support.


More information about the Devel mailing list