Crash after detaching a tab into a new window
This is a crash reported by @antoniof :
*I accidentaly found the steps to reproduce this crash:
- Launch nautilus
- Open new tab.
- Drag that tab to the headerbar to detach it into a new window.
- Close the new window.
- At this point any action that triggers a location change will crash nautilus.
The cause are the signal handlers to swap "Reload" and "Stop" in the popover menu of new tab's view, which the original window keeps around even after detaching the tab. When the new window is closed, it tries to remove the signal handler but it's the wrong window so the handler is not found, which is reported in the command line. Later, when the signal is emitted, it will try to update the menu of a view which doesn't exist anymore, crashing nautilus.*
This is from https://bugzilla.gnome.org/show_bug.cgi?id=781991#c1
I first tried to fix Nautilus code to handle this "detaching" use case, but it was more complex than I thought so I'm just proposing a patch that disables tab detaching, as that use case was not expected by Nautilus code (as revealed by the crash). 1.