[Nautilus-list] icon and metadata questions
- From: Frank Worsley <fworsley shaw ca>
- To: nautilus-list lists eazel com
- Subject: [Nautilus-list] icon and metadata questions
- Date: Fri, 04 Jan 2002 19:31:59 -0800
Hi all,
I've been spending some time looking at the source code trying to get
Nautilus to load .desktop file icons. Now I am pretty confused between
the different types of metadata and links and have a couple of
questions.
Before I get to the questions I am going to explain my view of the whole
situation, just to make sure everyone knows where I am coming from.
As I understand it, there is three places metadata can be stored:
1. Gnome Metadata
This can be set and retrieved using gnome_metadata_set,
gnome_metadata_get, etc.
2. Nautilus Metadata Files
The Nautilus metadata that is stored in the metadata XML files.
To retrieve it for a file one can use nautilus_file_metadata_get & co.
These in turn call nautilus_directory_get_file_metadata & co. Those in
turn call the NautilusMetafile CORBA object that returns cached data or
reads it from the metafile.
3. Desktop File Metadata (icon, icon caption, etc.)
The .desktop files contain metadata that defines the icon to use, the
icon caption, description, etc. To read that data one uses the functions
inside nautilus-desktop-file-loader.
----------------------------
Now for my questions:
1. I can't find the Gnome metadata stuff in libgnome-2. I checked it out
from CVS but there is no gnome-metadata.c/h. I see it is also commented
out in the nautilus source with #ifdef GNOME2_CONVERSION_COMPLETE.
Is this deprecated?
2. Why is there Gnome Metadata and Nautilus metadata? Wouldn't it make
sense to have only one of the two? Especially since gnome-metadata seems
to take multiple users, permissions, etc. into account - whereas
nautilus metadata doesn't seem to. See
http://www.cygnus.com/~tromey/gnome/metadata.html for more on
gnome-metadata.
3. Why is NautilusMetafile a CORBA object? Is the reason so that it can
be accessed by other applications and programming languages or is there
some other reason?
4. What is a GMC link? Do GMC links store gnome metadata?
And now my main question... :)
5. Where do we load icon URIs from .desktop files?
In nautilus_icon_factory_get_icon_for_file we first check if the file
has a custom icon by calling nautilus_file_get_custom_icon_uri.
Inside that function nautilus metadata takes precedence over any other
custom icon (makes sense).
If there is no nautilus metadata for a custom icon we check if the link
info for the file has been read (file->details->got_link_info). If the
link info has been read we use the custom icon from the link info.
The link info is read inside nautilus-directory-async::link_info_start.
There we figure out if it is a GMC link or a nautilus link. If it is a
GMC link we use gnome_metadata_get to read the icon uri
(link_info_gmc_link_read_callback).
If we return to nautilus_icon_factory_get_icon_for_file with no custom
icon then we either create thumbnails for the file or use the default
icon.
The problem is, I can't find the nautilus-dekstop-file-loader code being
used anywhere. Where do we try to load these .desktop icons?
Was the gnome_metadata stuff supposed to load .desktop files?
If it was, should that be replaced with the desktop-file-loader stuff?
----------------
Any help with these questions would be greatly appreciated - I realize
there is a lot of them, but just answering question 5 would help me.
Thanks in advance,
- Frank
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]