[Thunar-dev] How to use the eject function

Benedikt Meurer benedikt.meurer at unix-ag.uni-siegen.de
Tue Dec 11 09:29:24 CET 2007

Tino Keitel wrote:
> Hi,
> the changelog for Thunar 0.9.0 mentions this:
> -------------------------------------------------------------------
> Use the correct HAL property to determine whether a given volume or
> device requires eject (Bug #3119).
> -------------------------------------------------------------------
> As I wasn't aware that #3119 was already fixed in SVN, I opened #3466
> and created my own fix. It asks HAL for the eject flag:
> +  /* an eject menu entry is shown if this returns true */
> +  volume_hal->eject = libhal_drive_requires_eject (hd);
> The SVN changeset for revision 25647 shows that Benny did it in the
> same way:
> +  /* check if the drive requires eject */
> +  volume_hal->requires_eject = libhal_drive_requires_eject (hd);
> However, all the devices that previously had an eject button in the
> context menu don't have it anymore with 4.4.2. I checked the lshal
> output and the eject property is still there for the device:
> storage.requires_eject = true  (bool)
> I noticed that the changes done by Benny use a function
> thunar_vfs_volume_is_ejectable(), whereas I just modified
> thunar_vfs_volume_is_disc() to return true for devices with the eject
> flag.
> I assume that the new eject feature in 4.4.2 is tested and working, I
> just don't know _how_ it works. Can anyone enlighten me what I have to
> do to get the eject button back for my iPod, card reader etc.?

Hm, there seems to be an error in thunar-shortcuts-view.c. The "Eject
Volume" action is only added for discs. Try the attached patch.

> Regards,
> Tino

-------------- next part --------------
A non-text attachment was scrubbed...
Name: thunar-shortcuts-view_eject.patch
Type: text/x-patch
Size: 944 bytes
Desc: not available
URL: <http://mail.xfce.org/pipermail/thunar-dev/attachments/20071211/2ba8d9cd/attachment.bin>

More information about the Thunar-dev mailing list