Re: GEmblemedIcons help



On Mon, 2009-02-16 at 13:09 +0100, Nicolò Chieffo wrote:
> > I'm not quite sure that patch is a good idea as is.
> > g_get_user_special_dir() can't handle the special directories changing
> > during the runtime of the app, something which nautilus does (it tracks
> > renames of directories, sees if these are "special" dirs and then
> > changes the special dir. But with this patch nautilus would still show
> > the special icon on the old directory.
> >
> > However, its kind of lame that we can't automatically get the right
> > icons for apps other than nautilus though, so we should try to do
> > something... Not quite sure what the best approach is though.
> 
> Since GLIB does not want to track xdg dir changes at runtime (I think
> they did a wrong design, but they cannot break the behaviour now),
> this patch is coherent with glib and there is no problem (also because
> gio is part of glib, and has nothing to do with nautilus, it's
> nautilus that depends on gio).
> 
> Then we can patch nautilus to show icons also when the xdg dirs change.

Sure, we can make nautilus show the icons for the new location of the
special dirs. However, glib/gio will still return the special icons for
the old location.

> Anyway the fact that nautilus can change special dirs is somehow
> tricky for other applications which depends on special dirs (which
> will use glib and will see the old special dir), so maybe nautilus
> should simply warn the user that he needs to restart the session,
> whenever it detects a special dir change.

Yeah, this is a bit tricky, although its quite useful for users as they
can rename or move the special directories that way without having to be
unix wizards.

Maybe we could have some call to flush the glib cache, and then we could
call that e.g. each time a file selector is displayed, should be "good
enough".



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