Re: Special folders in gnome

Le vendredi 13 janvier 2006 à 11:37 +0100, Murray Cumming a écrit :
> On Fri, 2006-01-13 at 21:29 +1100, Jeff Waugh wrote:
> > <quote who="Mattias Eriksson">
> > 
> > > I know that this have been discussed in the past, but no solution was
> > > reached then. I hope it will be different this time.
> > 
> > I strongly agree that we need a solution for this (something GConf defined
> > would be perfect for desktop/network administrators). Let's do it for 2.16?
> Why do we need to tranlate the on-disk folder name of Templates if we
> don't need to translate the folder names of home, bin, and all of the
> bash commands? Why isn't it good enough to translate it in the user
> interface?

I think it has been explained a long in the previous
flamewar^Wdiscussion :)

If you don't use the same name on disk and in the UI, you get incorrect
result as soon as people don't use apps which are able to get the name
of applications : shell, KDE applications, whatever apps not GNOME

Since we (Mandriva) have decided to hit the bullet the hard way with our
last release (Mandriva Linux 2006), let me share the problems we found
by trying to implement such a system (and we are still not 100% happy
with it but it can be seen as a prototype :) :
After reading extensively the discussions on this subject in the various
GNOME ml, we decided the following set of functionnalities we wanted to
implement, both in GNOME AND KDE :

-give users predefined directories in their home to store their data :
Download, Documents, Music, Pictures and Video (this is newbie
-allow quick access to these directories from the various file selectors
-allow those directories to be distinguished when using file manager
(nautilus, konqueror) with a different icon, but handled as standard
-only display localized names in the UI
-be able to access those directories now or in the future using scripts
without too much trouble even if they are localized.
-if users choose to delete these directories, they should not come back
or be displayed in any UI anymore
-if possible, applications save/load difectories should be using those
directories by default.

So, our initial implementation was doing the following :
at first login, create directories with english name on disk in $HOME,
also create .desktop file in $HOME, with localized name and pointing to
those directories and add those .desktop file to ~/.gtk-bookmarks.

Pro :
-no need to patch applications / environment too much to get something
Con :
-the english names were always visible, even in non english locale
-removing the desktop file was not removing the directories

To try to fix some problems, we changed implementation :
-at first login, a directory called ~/.mdk-folders is created
-we create real directories with localized name on disk in $HOME and we
create symlink in ~/.mdk-folders to those directories, symlink name
being the english name (easier scripting if needed)
-we create .desktop file in ~/.mdk-folders pointing to those directories
-we add .directory file in the created directories, allowing konqueror
to display a nice icon for those directories (unfortunately, it can't be
done in nautilus and shouldn't, it adds performance penalty too).
-we patched KDE file selector to search for .desktop file in
~/.mdk-folders and add them as shortcuts in file selector
-we add those .desktop file in ~/.gtk-bookmarks

We are still not entirely satisfied with this solution, which is way too
hackish : I had to patch nautilus and gnome-panel to teach them to
handle .desktop in ~/.gtk-bookmarks correctly), Nautilus is not
displaying nice icons for those folders, it doesn't work if you switch
locales after first login and it doesn't scale very much. Also, we
didn't have time to make sure applications would use relevant
directories (Music for RB, Pictures for Gimp, etc..).

We didn't hear many complains (from people who want to organize their
own way) nor many "this is so cool", maybe because integration is not

It would be nice to have a desktop neutral way to do this, not too

I hope our experience will benefit everyone here.

Frederic Crozat <fcrozat mandriva com>

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