Re: [Nautilus-list] icon and metadata questions



Hi Darin,

thank you very much for your reply. This makes things a lot clearer for
me. I have included some more comments/questions below.

A one line fix was needed to make .desktop file loading work. I have
attached it as patch1.

The second patch fixes a memory leak in the renaming callback for
nautilus_file.

I have also made other code changes that let you rename .desktop files
by setting the "Name" value in the .desktop file. However, I have not
attached the patch since multiple files have been modified and I
couldn't figure out an easy way to run the diff command for more than
one file. How would I do that?

Below are some more comments ...

> The file you refer to is a conceptual document about what Gnome metadata
> ought to be -- in fact I've never seen it before. Very little of what the
> document describes was implemented in the actual gnome-metadata.[ch]. The
> gnome-libs implementation used a single database file in the user's home
> directory.

The document is linked to from here:

http://developer.gnome.org/doc/API/libgnome/gnome-gnome-metadata.html


> It would be nice to improve the metadata support further. We can even change
> the file format if we do some kind of backward compatibility harness. The
> plan is to move the metadata access into gnome-vfs so that it's available to
> programs other than Nautilus and retains a notification scheme.

It would make sense for metadata support to eventually be built right
into gnome-vfs. But, with NautilusMetafile being a CORBA object it is
accessible by other applications anyway. Right?


> Just as the metadata.html document says, "implementation will have to be
> written in a ``thread-safe'' manner as multiple applications could
> potentially access the metadata database concurrently". Using a shared
> server to read and write the metadata is a basic way to make sure this works
> for all processes on one machine. For directories shared across multiple
> machines, say with NFS, this scheme is insufficient.
> 
> The CORBA object was created as a practical fix for real problems we were
> seeing in the late beta versions of Nautilus before 1.0. One Nautilus
> component would write to metadata, and the other Nautilus components on the
> same machine wouldn't notice the change and were likely to overwrite it.

I see. That makes sense.


> My knowledge of gmc is limited, alas, but that's what I know about it. The
> Nautilus support for showing the custom icons for these files was added at
> the last minute by Miguel. I would have preferred running a 1-time
> conversion tool, since these files are only really supported in the
> ~/.gnome-desktop directory, but Miguel wanted to do extra work to make it
> possible to move back and forth between gmc and Nautilus; I'm not sure how
> successful it was.

Since gnome-metadata is gone we wont be able to retrieve the icons for
GMC links in Gnome 2. What would be the best way to handle these GMC
links in that case?
Maybe Nautilus should create a new .desktop file to replace old GMC
links whenever it encounters them. The user can be informed of that
change with a dialog box.


> When .desktop file support was added, the programmers who added it
> piggy-backed on the Nautilus link functions. So the calls that have names
> that make them sound like they work on Nautilus links actually work on two
> different kinds of Nautilus links: "historical" links and desktop files.

I see that now. I should have followed through the code a little more.


> Ideally, someone would rename these Nautilus link functions for clarity.
> Also, in the long run the Nautilus historical link feature is not really
> needed, and the desktop file support is presumably what's really going to
> stay around.

Maybe. The name is actually not that bad, I just didn't realize there
was a nautilus-link-desktop-file.c file, otherwise I would have probably
figured it out myself.


Thanks again for your help.

- Frank


--- nautilus-link.c	Sun Jan  6 20:16:43 2002
+++ /home/fworsley/myfiles/nautilus-link.c	Sun Jan  6 20:15:42 2002
@@ -58,7 +58,7 @@
 get_link_style_for_mime_type (const char *mime_type)
 {
 	if (mime_type != NULL) {
-		if (g_ascii_strcasecmp (mime_type, "application/x-nautilus-link") == 0) {
+		if (g_ascii_strcasecmp (mime_type, "application/x-gnome-app-info") == 0) {
 			return desktop;
 		}
 		if (g_ascii_strcasecmp (mime_type, "application/x-nautilus-link") == 0) {
--- nautilus-file.c.old	Sun Jan  6 20:16:42 2002
+++ nautilus-file.c	Sun Jan  6 22:43:24 2002
@@ -966,6 +966,7 @@
 		nautilus_directory_moved (old_uri, new_uri);
 		g_free (new_uri);
 		g_free (old_uri);
+		g_free (old_relative_uri);
 	}
 	operation_complete (op, result);
 }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]