Re: gnome-vfs freeze break request - folder names



1 of 2 approvals.

> When changing to the new mime database some of the mimetypes changed.
> One of the types that changed was the x-directory/normal type used for
> directories in gnome-vfs and various other places in gnome. Since we use
> the shared-mime-info package to look up descriptions for mimetypes this
> means all directories will show "x-directory/normal" instead of "folder"
> in the nautilus list view, properties dialog and other places.
>
> I think the real solution is to have an alias from x-directory to
> inode/directory which is the new mimetype for directories. However,
> aliases aren't fully supported yet. For instance, you can't look up
> descriptions of aliases atm.
>
> This patch works around this particular issue for the moment:
>
> Index: libgnomevfs/gnome-vfs-mime-info.c
> ===================================================================
> RCS file: /cvs/gnome/gnome-vfs/libgnomevfs/gnome-vfs-mime-info.c,v
> retrieving revision 1.80
> diff -u -p -r1.80 gnome-vfs-mime-info.c
> --- libgnomevfs/gnome-vfs-mime-info.c	8 Sep 2004 09:58:03 -0000	1.80
> +++ libgnomevfs/gnome-vfs-mime-info.c	10 Sep 2004 10:47:12 -0000
> @@ -548,6 +548,12 @@ gnome_vfs_mime_get_value (const char *mi
>
>  	if (!gnome_vfs_mime_inited)
>  		gnome_vfs_mime_init ();
> +
> +	/* TODO: We really should handle aliases here.
> +	   For now, special case dirs */
> +	if (strcmp (mime_type, "x-directory/normal") == 0)
> +	  mime_type = "inode/directory";
> +
>
>  	entry = get_entry (mime_type);
>
> Its sort of hacky, but it makes us look less lame, and is safe. Is it ok
> to commit?
>
> =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
>  Alexander Larsson                                            Red Hat, Inc
>                    alexl redhat com    alla lysator liu se
> He's an oversexed zombie werewolf who must take medication to keep him
> sane.
> She's a cynical extravagent college professor with a song in her heart and
> a
> spring in her step. They fight crime!
>
>
> _______________________________________________
> gnome-vfs-list mailing list
> gnome-vfs-list gnome org
> http://mail.gnome.org/mailman/listinfo/gnome-vfs-list
>


Murray Cumming
murrayc murrayc com
www.murrayc.com
www.openismus.com



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