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 329426 - nautilus_file_info_get_volume is broken
nautilus_file_info_get_volume is broken
Status: RESOLVED FIXED
Product: nautilus
Classification: Core
Component: File and Folder Operations
0.x.x [obsolete]
Other Linux
: Normal normal
: ---
Assigned To: Nautilus Maintainers
Nautilus Maintainers
Depends on:
Blocks:
 
 
Reported: 2006-02-01 05:39 UTC by David Zeuthen (not reading bugmail)
Modified: 2006-02-16 00:48 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Simple extension (3.98 KB, text/plain)
2006-02-01 05:40 UTC, David Zeuthen (not reading bugmail)
Details

Description David Zeuthen (not reading bugmail) 2006-02-01 05:39:09 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.
Comment 1 David Zeuthen (not reading bugmail) 2006-02-01 05:40:25 UTC
Created attachment 58496 [details]
Simple extension
Comment 2 David Zeuthen (not reading bugmail) 2006-02-01 05:41:44 UTC
Note that the attachment in comment #1 is not yet in the gnome-mount tree in CVS but I can commit it if needed.
Comment 3 David Zeuthen (not reading bugmail) 2006-02-01 05:44:27 UTC
To clarify, I've tested this with CVS HEAD of Nautilus. Btw, am I supposed to unref the GnomeVFS[Drive|Volume] object on success?
Comment 4 Alexander Larsson 2006-02-10 07:44:07 UTC
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.
Comment 5 David Zeuthen (not reading bugmail) 2006-02-10 15:51:07 UTC
Right.. so this is a nautilus bug, yes?
Comment 6 Alexander Larsson 2006-02-15 17:20:18 UTC
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.
Comment 7 David Zeuthen (not reading bugmail) 2006-02-16 00:48:04 UTC
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