GNOME Bugzilla – Bug 541793
activation root for volumes
Last modified: 2008-07-07 15:39:11 UTC
For adopting mounts from foreign volume monitors it would be useful to know ahead of time what mount root a volume will have. This patch adds a new method g_volume_get_activation_root() that does exactly that. Volume monitors are allowed to return NULL if it is not known ahead of time what the mount root will be. I need this for the work I'm doing with moving volume monitors out of process.
Created attachment 114071 [details] [review] patch
Btw, another use of this patch is for doing the "connected servers" feature right and avoiding the bug in Nautilus+friends where the user is taken to the mount root, for example ssh://people.freedesktop.org/ instead of the what he configured in the "connect to server" dialog, for example ssh://people.freedesktop.org/home/david/public_html for a mount he might want to name "public_html on fd.o". To do this, you'd create a volume monitor watching GConf and create GVolume objects based on entries there (instead of the rather hackish solution of using bookmarks). Specifically g_volume_get_actication_root() would return a GFile with the URI ssh://people.freedesktop.org/home/david/public_html. Then we'd patch Nautilus, file chooser etc. to use this URI instead what g_mount_get_root() returns when you click on the mounted mount.
After talking to you this morning, I now understand what this does, and am in favour of committing it. But anybody else will not understand what to do with it a) in GVolume and b) in a backend implementation. This needs to be explained in some more depth. The term "activation root" needs to either be avoided (in favour of something more obvious like "future mount root") or explained somewhere in the docs. The docs for g_volume_get_activation_root should probably mention that this method is intended for use in implementing mount adoption. The docs for get_activation_root should give some more guidance on what a backend implementation is supposed to return here.
Created attachment 114124 [details] [review] updated the docs I've added a ton of docs and examples of where this is useful. Does this look OK to you?
Looks better. If you commit it, I'll go over it a bit, that is probably more efficient than working out the exact wording here.
Created attachment 114126 [details] [review] small doc fixes / enhancements Also add the function to the sections file to make the function actually appear in the docs.
Comment on attachment 114126 [details] [review] small doc fixes / enhancements Committed on trunk. Thanks.