Automatically close the tab (instead of showing the Home folder) when the user explicitly/manually unmounted a storage device or remote filesystem
Affected version
- Nightly flatpak: Yes
- Other: Nautilus 41.5 in Fedora 35, Nautilus 43, Nautilus 44, etc.
Steps to reproduce
- Open a couple of folder tabs in Nautilus
- Open/mount a removable storage device or remote (ex: nextcloud) into a new tab using the mouse's middle button
- Unmount/eject it (using the relevant button in the Nautilus sidebar)
Current behavior
The tab where the mounted device/remote was now displays the user's "Home" folder. The problem is that this clutters up the tabs strip real fast when you mount/unmount a bunch of things throughout the day.
Expected behavior
- If the user manually ejected something, and it was not the only tab (i.e. if it wouldn't mean closing the window), close the related tab instead of leaving it dangling around. Just make sure to close the correct one (avoid things like issue #2855)
- If it was the only remaining tab and only remaining focused window, don't close the window (duh!); either let it go to the home folder (the current behavior), or maybe have a nicer "blank slate" view like the 3rd scenario below...
- If the mount was automatically unmounted (ex: via system suspend/resume, or via some network disconnection), if it did not get automatically remounted, then it should show a special blank slate in that tab, with action buttons to offer the user to either reload/reconnect that tab, or to close the extra dangling tab (because the "home" folder is useless in that regard).
Edited by Jeff Fortin