GNOME Bugzilla – Bug 329426
nautilus_file_info_get_volume is broken
Last modified: 2006-02-16 00:48:04 UTC
When trying to write a Nautilus extension for gnome-mount I noticed that nautilus_file_info_get_volume() doesn't work. The attached C file demonstrates a simple extension that prints out the value of this function call. Notably it works for nautilus_file_info_get_drive(). Some output from my system follows Initializing gnome-mount extension # select properties for a mounted USB stick ** Message: name = 'USB%20DISK%202.0.drive' ** Message: drive = 9e64fb0 ** Message: volume = 0 # select properties for the volume icon on the desktop ** Message: name = 'davidz' ** Message: drive = 0 ** Message: volume = 0 Will attach source code for my extension to demonstrate this bug.
Created attachment 58496 [details] Simple extension
Note that the attachment in comment #1 is not yet in the gnome-mount tree in CVS but I can commit it if needed.
To clarify, I've tested this with CVS HEAD of Nautilus. Btw, am I supposed to unref the GnomeVFS[Drive|Volume] object on success?
I think the properties window gets the properties for the target of a link. So, in this case it would be the mountpoint of the volume, not the volume icon link file. You're not supposed to free the object.
Right.. so this is a nautilus bug, yes?
2006-02-15 Alexander Larsson <alexl@redhat.com> * src/file-manager/fm-properties-window.c (append_extension_pages): Pass the original files, not the target files to property page providers. (#329426) With this checkin you should be able to get the volume.
Yup, this works, thanks a bunch! ** Message: name = 'USB%20DISK%202.0.drive' ** Message: drive = a0f8730 ** Message: volume = 0 ** Message: name = 'USB DISK 2.0.volume' ** Message: drive = 0 ** Message: volume = a11cf60