On 2 September 2012 23:04, Frank Cox <thea...@melvilletheatre.com> wrote:

> 1. I have a "custom" graphic that I'm showing as a sort of a placeholder or
> background in my mailing list program.
>
> 2. I see that most program-specific graphics on my computer seem to be
> located
> in /usr/share/pixmaps.
>
> Is it proper to put the custom graphic into /usr/share/pixmaps and just
> "assume" that it will be there, i.e use an absolute path to find it from
> within
> the program?
>
> If so, then how does  this integrate with a makefile using a ${prefix}
> macro?
> As soon as you change the prefix, you break the program unless you do some
> really fancy work with patch as part of the make, which seems awfully
> convoluted.
>
> If not, then how do you tell a program where to find this sort of graphic?
>  My
> best idea so far is to take argv[0] and using that as a starting point,
> assume
> that the graphic is located in a subdirectory branched off of that path,
> i.e.
> if the program is in /usr/local/bin then we hope the graphic will be in
>  /usr/local/share/pixmaps.
>
> Is there a better way to find a graphic background of this sort than
> specifying
> an absolute path and hoping to find it there?
>
>
You can also use Gio's Gresource for this purpose:
http://developer.gnome.org/gio/stable/gio-GResource.html

Regards,

Vivien
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

Reply via email to