Major change in desktop handling



I just checked in a large change to the Nautilus desktop handling that
I've been working on for a while. Its not totally finished yet, but it
seems to work well enough to check in.

NOTE NOTE NOTE:
As part of this change the directory for the desktop was changed from
~/.gnome-desktop to ~/Desktop. 
I just wanted to say this first so nobody misses it.

The way the desktop used to work was by creating, removing and updating
desktop files. On startup all mountpoint desktop files were removed and
the home and trash desktop files were updated or created. When stuff was
mounted nautilus would create a new desktop file, and when it was
unmounted it would be removed. And whenever the trash changed to
full/empty the desktop file was rewritten with the new icon name.

This has some problems:
* All the code handling desktop files was doing synchronous I/O,
potentially slowing things down.
* If you ran several instances of nautilus with the same homedir you
would get multiple copies of the mountpoint icons
* On startup nautilus could remove desktop links that the user had
created himself, believing it was an old mountpoint icon.
* There was no way to get rid of the links, they were always recreated
on startup.
* If you used homedir-as-desktop the ugly desktop files got put in your
homedir.
* The code was doing really ugly nasty things.

The new system works very differently. The desktop icons (trash, home
and volume icons) are all in-memory objects. They are implemented like
"virtual files" and put in the desktop view by some deep magic. This
gets rid of all the problems of the old system, and allows a lot of nice
things. Plus it should be faster.

Since the old system stored files on the desktop that will be confusing
in the new system we could get a compatibility problem. This problem is
especially complicated since you can run both new and old gnome with the
same homedir, so we would have to be both backwards and forwards
compatible. Fortunately we have long planned to move to ~/Desktop as the
desktop directory, so by doing this change at the same time we avoid a
lot of problems.

There are a couple of things left to do and a few open questions:

* We need to do some sort of migration of the old desktop directory. I
was thinking of looking for ~/.gnome-desktop/.migrated_dir, and if its
not there put up a dialog explaining the migration, and add a link to
the old desktop so that people can move whatever they want over. Any
other ideas?

* With the new system its easy to remove desktop icons. I've even wired
up delete on home and trash to disable them in gconf. However, this
means we have to add a GUI way to get them back. So, do we want to add
preferences for this, or disable it and force people that don't want the
icons to use gconf-tool?

* Currently we don't have a start-here link on the new desktop. Should
we add one? I'm not totally sold on the start-here icon, but its sort of
useful (although badly named), and with the new system its much easier
to enable/disable it if you don't want it.

* KDE also uses ~/Desktop, and they put some special files in there. We
need to examine how these interact with Nautilus and how we can avoid
confusing the user with these files.

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 Alexander Larsson                                            Red Hat, Inc 
                   alexl redhat com    alla lysator liu se 
He's a scarfaced gay card sharp who hangs with the wrong crowd. She's a 
transdimensional communist doctor trying to make a difference in a man's 
world. They fight crime! 




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