Re: gio/nautilus-related question: desktop and document icons instead of emblems?



On Tue, 2008-02-19 at 19:47 +0100, Christian Neumair wrote:
> Currently, a folder icon together with a desktop emblem are used for the
> user's desktop directory. The document folder looks like a plain folder.
> 
> However, it would look better if the desktop folder, and the document
> folder also had special icons.
> 
> Considering the current architecture, this could be done in
> gio/glocalfileinfo.c from glib:
> 
> >From _g_local_file_info_get():
> 
> ...
>               /* TODO: Special case desktop dir? That could be expensive
> with xdg dirs... */
>               if (strcmp (path, g_get_home_dir ()) == 0)
>                 type_icon = "user-home"
> ...
> 
> Alex: Why is this so expensive? g_get_user_special_dir() seems to cache
> its results. Maybe we should have a g_get_user_special_dirs() call that
> returns all the directories in the GUserDirectory enum?

Its true that it is cached, but the caches are never updated, and
nautilus allows changing these directories (and there is the
desktop-is-home gconf setting), so the cache could go out of sync with
the on-disk config and in-nautilus handling.

Any nautilus handling of this would have to happen with
nautilus_get_xdg_dir().



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