Re: gnome pixmaps
- From: Naba Kumar <kh_naba yahoo com>
- To: Lovison Sara - MEDICO Spa <saralov medicoweb com>
- Cc: gnome-devel-list gnome org
- Subject: Re: gnome pixmaps
- Date: 08 Feb 2002 11:26:09 +0530
On Fri, 2002-02-08 at 09:11, Crispin Wellington wrote:
>
> On Thu, 2002-02-07 at 19:25, Lovison Sara - MEDICO Spa wrote:
> >
> > Hello,
> >
> > I'm new with Linux and Gnome.
> > I made a small application with a custom icon (xpm file) on a button.
> > I compiled it and all works fine. No warning or error message.
> > But when I run it I can't see my icon and appears a warning:
> > "Couldn't find pixmap file: /myproject/myicon.xpm".
> > I know that the problem is in the gnome_pixmap_file() call that I use to create pixmap from file.
> > The function gnome_pixmap_file looks for file in /usr/share/pixmaps/myproject,
> > but when I do 'make install' the file is installed in /usr/local/share/pixmaps/myproject.
>
> Your using autoconf/automake yeh? does reconfiguring as
>
> ./configure --prefix=/usr
> make
> make install
>
> (will install it under /usr instead of /usr/local)
>
> work?
Or better still (which is the correct way to fix this) is to:
1) have the following lines in your src/Makefile.am
INCLUDE= ...\
-DGNOMEPIXMAPDIR=\""$(datadir)/pixmaps/<package_name>"\" \
...
where, package_name is the name of your package.
2) and in the source files, read the pixmap file as:
....
....
gchar *pix_path = GNOMEPIXMAPDIR "/pixmap_file.xpm";
....
....
That's all. You should be able to get your pixmaps when installed with
any prefix.
--
Regards,
-naba
"If it ain't broke, don't fix it."
- Bert Lantz
_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]