After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 89245 - .xpm icon gets selected even when .png is specified in .desktop file
.xpm icon gets selected even when .png is specified in .desktop file
Status: RESOLVED FIXED
Product: gnome-desktop
Classification: Core
Component: libgnome-desktop
2.0.x
Other Linux
: High normal
: ---
Assigned To: Desktop Maintainers
Desktop Maintainers
Depends on:
Blocks:
 
 
Reported: 2002-07-28 04:30 UTC by Joe Drew
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Joe Drew 2002-07-28 04:30:19 UTC
It seems that gnome-panel selects .xpm files even when the corresponding
png is specified in the .desktop file. i.e., the file gedit-icon.xpm is
selected over gedit-icon.png.

This may have to do with the Debian menu system, which needs to use xpm
files for icons. For example, the gedit entry in the normal GNOME menus
should display the PNG file (as specified in the .desktop file), and the
gedit entry in the debian menu should display the .xpm file. Maybe this is
some sort of collison between filenames internally in gnome-panel?
Comment 1 Mark McLoughlin 2002-07-29 02:03:47 UTC
In CVS gnome-panel, icons are looked up according to the icon theme
specification from www.freedesktop.org. See GnomeIconLoader in
libgnome-desktop.

Essentially, we ignore the suffix in the .desktop file and look for an
 icon in the following order: .png, .svg and then .xpm.

It looks to me like the system you are using must have a patch to
always favour .xpm. Marking as NOTGNOME, but re-open if I'm wrong.
Comment 2 Christian Marillat 2002-07-29 09:34:36 UTC
Hi,

This doesn't work. I did the following :

cd /usr/share/pixmaps
convert gnome-gnumeric.png gnome-gnumeric.xpm
cp gnome-folder.png gnome-gnumeric.png
To be sure
pkill gnome-panel

The gnumeric entry still display the gnumeric icon.

rm gnome-gnumeric.xpm
pkill gnome-panel

Now I've the folder icon.




Comment 3 Mark McLoughlin 2002-07-29 23:04:50 UTC
Okay, I was wrong about it using the Icon Theme specification - I had
a assumed that the icons in $(prefix)/share/pixmaps were part of the
'default' theme, but that's not the case. So icons are only looked up
according to the icon theme spec, if you have an icon theme insalled.
It falls back on the old code of looking up the icon (using its
extension) in $(prefix)/share/pixmaps ...

I've tried out what you said, and it always picks up the .png instead
of the .xpm ...

I'm resolving as NOTGNOME again, since you still haven't told me
whether you are using a Debian specific patch or not. I suspect you
are ...
Comment 4 Christian Marillat 2002-07-30 00:59:43 UTC
Hi,

I patch nothing, and I don't see a good reason to patch gnome-desktop.
Read the diff :

http://ftp.debian.org/debian/pool/main/g/gnome-desktop/gnome-desktop_2.0.3-1.diff.gz

This is still a bug.
Comment 5 Joe Drew 2002-07-30 01:17:33 UTC
Clarification: Christian Marillat is the gnome-panel and gnome-desktop
maintainer for Debian.
Comment 6 Mark McLoughlin 2002-07-30 02:36:27 UTC
Christian: okay, I had to make sure that the bug was in CVS and not a
debian patch ....

So ... I can't reproduce this and have no idea what might be causing
it ...

Christian: could you debug this and figure out what
gnome_desktop_item_find_icon is doing. Is it picking up the the .xpm
in gnome_icon_loader_lookup_icon or is it finding it in the 'old
GNOME/KDE code' ?

thanks.
Comment 7 Christian Marillat 2002-07-30 12:09:25 UTC
I did the following with test-icon-theme

./test-icon-theme lookup default gtm

Continuing.
icon for gtm at 48x48 is /usr/share/pixmaps/gtm.xpm

Of course I've two icons in png and xpm formats.

But the png image size is 48x48 and the xpm is 32x32

Then I've put a breakpoint in gnome-desktop-item.c line 2148 in
gnome_desktop_item_find_icon(), but this breackpoint has never been
reached.

What's wrong ?
Comment 8 Mark McLoughlin 2002-07-31 22:58:50 UTC
Okay, I'm utterly confused. I can't reproduce this with test-icon-theme.

Alex: could you take a look a this ?
Comment 9 Mark McLoughlin 2002-08-05 23:25:10 UTC
Christian: I think I came across the issue while fixing something else ..

This should fix it - re-open if not

2002-08-06  Mark McLoughlin  <mark@skynet.ie>

        * Makefile.am: define pixmaps and icons dir.

        * gnome-icon-loader.c:
        (remove_gconf_handler): remove unused variables.
        (gnome_icon_loader_init): add pixmaps and icons
        dir for the prefix we are installed into.
        (load_themes): don't stat the icons, we don't
        do that for themed icons anyway. Actually check
        which format we are favouring, should fix #89245.
        (suffix_from_name): impl.
        (scan_directory): use it here.

Comment 10 Christian Marillat 2002-08-07 14:29:20 UTC
Yes this is fixed in CVS. Thanks.