helloSystem / Filer

A file manager that can also render the desktop
GNU General Public License v2.0
31 stars 9 forks source link

Put 'Eject' into context menu for disks/mountpoints #41

Closed probonopd closed 3 years ago

probonopd commented 3 years ago

Especially in Spatial mode there is currently no way to eject/unmount disks/loop-mounted partitions.

Whenever the user right-clicks on a directory, we should check whether something is mounted at that directory (a mountpoint) and if yes, offer "Eject" rather than "Move to Trash" in the context menu.

probonopd commented 3 years ago

What shall happen if a combination of files, folders and mountpoints is selected? (What happens on a Mac in this case)?

probonopd commented 3 years ago

What shall happen if a combination of files, folders and mountpoints is selected? (What happens on a Mac in this case)?

Ejecting

probonopd commented 3 years ago

This feature has been imlpemented upstream now: Someone needs to analyze and backport the relevant portions of https://github.com/lxqt/libfm-qt/pull/660/files.

@moochris would you be interested in having a go at this? I think this is especially useful in conjunction with Spatial mode, because there you have no other way of ejecting/unmounting

ghost commented 3 years ago

Sure, I'll look at this next when I get some time.

If we had devices on the desktop then drag to trash/eject would be nicer 🙂

probonopd commented 3 years ago

If we had devices on the desktop

This just takes changing a few lines (not much effort) as explained in https://github.com/helloSystem/Filer/issues/9:

But what we need is to have both devices and files/folders...

probonopd commented 3 years ago

Turns out we can solve this by a simple text file:

https://github.com/helloSystem/ISO/commit/8f4b2f0333945afc544db5abb42774fec4a488ec#diff-febf34f96aa46897233532c13ceeaef78597b401b13affefd08399013e8934d0