! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
[PATCH] Non-removable volumes are shown as removable
Status:
RESOLVED: FIXED

Comments

Description John Lindgren editbugs 2011-07-18 14:46:28 CEST
Created attachment 3788 
Patch

Currently, thunar_g_volume_is_removable() returns true whenever g_volume_can_mount() returns true.  This is not quite right, since g_volume_can_mount() returns true for some internal volumes (such as the Win7 partition on my dual-boot system).  As a result, Thunar shows such volumes in the side pane with an "eject" icon next to them, which does not make sense.

My patch removes the call to g_volume_can_mount().
Comment 1 Jannis Pohlmann editbugs 2011-07-18 14:53:41 CEST
I agree that it's probably not always a good idea to assume volumes with g_volume_can_mount() == true to be removable. But removing the g_volume_can_unmount() check looks wrong.
Comment 2 John Lindgren editbugs 2011-07-18 15:25:32 CEST
"killermoehre" on IRC suggests that "removable" be interpreted as "can be mounted"; in which case the current thunar_g_volume_is_removable() is okay.  In that case, the problem remains that the "eject" icon is shown even when the volume is not mounted.
Comment 3 Jannis Pohlmann editbugs 2011-07-18 15:32:02 CEST
Yeah, that's how it is interpreted in order to show not only volumes that can be removed but also those that can be mounted (and possibly aren't yet). It might make sense to split that function up into 

  thunar_g_volume_is_visible() (or something with a similar meaning)

and

  thunar_g_volume_is_removable().
Comment 4 John Lindgren editbugs 2011-07-18 18:02:02 CEST
Created attachment 3789 
Patch to hide "eject" icon when appropriate

Here is a different solution:

- Leave thunar_g_volume_is_removable() as it stands (though in my opinion it's badly named and should be called perhaps thunar_g_volume_is_handled() or thunar_g_volume_is_mountable()).

- Don't show the eject button except for volumes that can be ejected (as reported by g_volume_can_eject()) or are mounted.
Comment 5 Harald Judt editbugs 2015-05-13 21:44:19 CEST
This patch does no longer apply, and I believe it has become obsolete. But to me it looks like this has been solved in some way or another.

Bug #7819

Reported by:
John Lindgren
Reported on: 2011-07-18
Last modified on: 2015-05-13

People

Assignee:
Jannis Pohlmann
CC List:
2 users

Version

Attachments

Patch (1.25 KB, patch)
2011-07-18 14:46 CEST , John Lindgren
no flags
Patch to hide "eject" icon when appropriate (3.38 KB, patch)
2011-07-18 18:02 CEST , John Lindgren
no flags

Additional information