[Anjuta-list] Custom icons
- From: Fernando Apesteguía <fernando apesteguia gmail com>
- To: anjuta-list lists sourceforge net
- Subject: [Anjuta-list] Custom icons
- Date: Mon Dec 12 13:02:03 2005
It appears to work now....
I explain the steps I followed:
I create a new clean Gnome Project by means of the app wizard. In this
wizard I set an application icon (I DIDN'T make this in my original ).
Due to this, Anjuta generates a
Makefile.am inside pixmaps
subdirectory. Then I use Project->Add pixmap file to "copy" files
into Project structure. After make install everything goes well. Icons
are available.
I followed this steps in my original app. and now it works.
Thanks to all of you for your ideas!!
Best regards
---------- Forwarded message ----------
From: Iago Rubio <
iago iagorubio com>
Date: 12-dic-2005 17:19
Subject: Re: Custom icons
To: gtk-app-devel-list gnome org
On Sun, 2005-12-11 at 18:57 +0100, Fernando Apesteguía wrote:
> Its likely the path to your icons isn't right. If your using the glade
> auto generated c code check the interfaces.c file for a line like
> this....
>
> image1 = create_pixmap (window1, "project1/blah.png");
>
> I have the line:
>
> img_cpu = create_pixmap (window1, "lkmonitor/gnome-ccperiph.png");
[snip]
> I did:
> ./configure --prefix=/home/fernape/prueba
>
> and copied png files into bin directory with the executable file but still
> no enjoy.
>
> More ideas?
You're using the C generated files, that include a function
add_pixmap_directory() that adds one directory to the pixmaps' search
path.
Try writting,
add_pixmap_directory(PACKAGE_DATA_DIR "/" PACKAGE "/pixmaps");
Then install your pixmaps in PACKAGE_DATA_DIR "/" PACKAGE and everything
should work - once the package is installed.
You may add to your top level
Makefile.am something like:
install-data-local:
if test -d $(srcdir)/pixmaps; then \
$(mkinstalldirs) $(DESTDIR)$(pkgdatadir)/pixmaps; \
for pixmap in $(srcdir)/pixmaps/*; do \
if test -f $$pixmap; then \
$(INSTALL_DATA) $$pixmap $(DESTDIR)$(pkgdatadir)/pixmaps; \
fi \
done \
fi
dist-hook:
if test -d pixmaps; then \
mkdir $(distdir)/pixmaps; \
for pixmap in pixmaps/*; do \
if test -f $$pixmap; then \
cp -p $$pixmap $(distdir)/pixmaps; \
fi \
done \
fi
If you want to add the pixmap directory on the development directory, so
you don't need to install the pixmaps when testing, add it with
add_pixmap_directory as well.
add_pixmap_directory(PACKAGE_DATA_DIR "/" PACKAGE "/pixmaps");
add_pixmap_directory('/home/user/Project/project1/pixmaps/');
You can add as many as you want, but a better solution may be to try
gdk-pixbuf-csource and get rid of pixmap images.
Try `man gdk-pixbuf-csource`.
--
Iago Rubio
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]