After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 541793 - activation root for volumes
activation root for volumes
Status: RESOLVED FIXED
Product: glib
Classification: Platform
Component: gio
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Alexander Larsson
gtkdev
Depends on:
Blocks:
 
 
Reported: 2008-07-06 19:07 UTC by David Zeuthen (not reading bugmail)
Modified: 2008-07-07 15:39 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch (2.71 KB, patch)
2008-07-06 19:08 UTC, David Zeuthen (not reading bugmail)
accepted-commit_now Details | Review
updated the docs (5.15 KB, patch)
2008-07-07 15:04 UTC, David Zeuthen (not reading bugmail)
accepted-commit_now Details | Review
small doc fixes / enhancements (6.59 KB, patch)
2008-07-07 15:36 UTC, David Zeuthen (not reading bugmail)
committed Details | Review

Description David Zeuthen (not reading bugmail) 2008-07-06 19:07:54 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.
Comment 1 David Zeuthen (not reading bugmail) 2008-07-06 19:08:47 UTC
Created attachment 114071 [details] [review]
patch
Comment 2 David Zeuthen (not reading bugmail) 2008-07-07 02:32:39 UTC
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.
Comment 3 Matthias Clasen 2008-07-07 14:32:31 UTC
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.
Comment 4 David Zeuthen (not reading bugmail) 2008-07-07 15:04:52 UTC
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?
Comment 5 Matthias Clasen 2008-07-07 15:25:14 UTC
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.
Comment 6 David Zeuthen (not reading bugmail) 2008-07-07 15:36:44 UTC
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 7 David Zeuthen (not reading bugmail) 2008-07-07 15:38:59 UTC
Comment on attachment 114126 [details] [review]
small doc fixes / enhancements

Committed on trunk. Thanks.