[Thunar-dev] "Ejecting" USB flash drives

Harald Judt h.judt at gmx.at
Thu Feb 24 18:00:56 CET 2011


Am 23.02.2011 17:57, schrieb Jannis Pohlmann:
> On Wed, 23 Feb 2011 17:55:29 +0100
> Yves-Alexis Perez<corsac at debian.org>  wrote:
>
>> On Wed, 2011-02-23 at 17:45 +0100, Jannis Pohlmann wrote:
>>> Please show me a valid use case where
>>> this is important and I might rethink my perspective. I can only
>>> think of "oops, I forgot to copy this file to the USB stick, now I
>>> need to mount it again" so far.
>>
>> When you have multiple partitions or drives on the device. And no,
>> these are not only for geeks, think smartphones with internal memory
>> + sdcard or card readers with multiple slots.
>>
>> If “eject” remove all of them at once, it's a bit painful.
>
> But why do you need to unmount at all then? Just eject once you now
> longer intend to have the device connected to your machine.
>
>    - Jannis

I've seen you've posted to the gvfs list about this some time ago, but 
there is no response to your questions in the archive.
http://mail.gnome.org/archives/gvfs-list/2010-October/msg00000.html

I've then checked the git repository and found this:
http://git.gnome.org/browse/gvfs/commit/?id=b8f430b51f4071a7c7ba6601caf20f817fda531d

This is still present in HEAD, albeit slightly modified:
       drive->can_eject = ((gdu_device_drive_get_is_media_ejectable 
(device) || gdu_device_is_removable (device)) &&
                           gdu_device_is_media_available (device) && ! 
_is_pc_floppy_drive (device)) ||
                          gdu_device_drive_get_requires_eject (device);

So gio decides that all removable drives except floppy drives are ejectable.

...and the corresponding bug report:
https://bugzilla.gnome.org/show_bug.cgi?id=576587

So how about the following proposal:

* Add a configuration entry for thunarrc like 'ShowUnmountMenuEntry'
   so that users who want the unmount feature can enable it?
   Most of the code needed is already there, and not much would
   have to be added. Additionally, this seems to be functionality
   unlikely to change very often so the maintenance efforts would
   be minimal. No harm done, and the user has the choice to choose
   what he or she likes best.

* The eject button is always there for quick and easy access.
   No need to look up an entry in the context menu.

Harald

--
`Experience is the best teacher.'



More information about the Thunar-dev mailing list