Re: [Nautilus-list] Nautilus icon sizes.
- From: Darin Adler <darin eazel com>
- To: Ben FrantzDale <bfrantzdale HMC Edu>
- Cc: Nautilus <nautilus-list lists eazel com>
- Subject: Re: [Nautilus-list] Nautilus icon sizes.
- Date: Tue, 01 May 2001 08:27:46 -0700
on 4/30/01 4:50 PM, Ben FrantzDale at bfrantzdale HMC Edu wrote:
> When does nautilus decide to use icons of different sizes?
> For example, there is i-directory.png along with i-directory-x.png where
> x is 12,20,24,36,72,96,128 and 192 (or something close). Nautilus
> automaticly uses the appropriate size to avoid scaling things up in an
> ugly way. Same for i-regular.png. However when I make other sized
> versions of other icons, Nautilus never sees them.
>
> Is Nautilus hard-coded to only look at i-directory and i-regular or is
> it something else?
The problem here is a lack of clarity in how gnome-vfs and Nautilus work
together in determining an icon for a given file type. When Nautilus gets an
icon name from gnome-vfs, it expects to locate an entire family of icons
using that name.
So it gets "i-directory" and then appends "-<size>" and then tries out the
various suffixes for various file types (".png", etc.). As a hack, one of
the suffixes is "no suffix at all". Finally, it looks for the icon
description file, which is the icon name followed by the suffix ".xml".
Interested people can look in the nautilus-icon-factory.c source file in
Nautilus to see the code that does the searching.
The problem is that the icon names in gnome-vfs (in
gnome-vfs/data/mime/gnome-vfs.keys.in) are not all done in a form that works
with this scheme. For one thing, the field for an icon name is called
"icon_filename", which makes it sound like you should include the file type
suffix. But if you do include that suffix, then Nautilus looks for:
"gnome-application-pdf.png-128"
Instead of:
"gnome-application-pdf-128.png"
To fix this problem, we could change the Nautilus icon factory code to do a
more intelligent search that strips suffixes if they are present. Or we
could change the icon names in gnome-vfs.keys.in to always be suffix-free
"icon names" rather than icon file names.
Or you can name your files in funny ways to work around the problem, and
then we'll have to keep the current strange rules around at least for
compatibility.
That's a brief summary. Any followup questions?
-- Darin
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]