Tracker: close Desktop window on switch to spatial mode

If you have the Desktop window open when you switch to spatial
mode this will now close the window. You aren't allowed to have
the Desktop open in 2 places symultaneously in spatial mode.
This commit is contained in:
John Scipione 2014-06-10 00:59:50 -04:00
parent 646b1fe1e8
commit 888f72ca9a

View File

@ -1674,6 +1674,14 @@ BContainerWindow::MessageReceived(BMessage* message)
SetPathWatchingEnabled(settings.ShowNavigator()
|| settings.ShowFullPathInTitleBar());
}
if (!settings.SingleWindowBrowse()
&& dynamic_cast<BDeskWindow*>(this) == NULL
&& TargetModel()->IsDesktop()) {
// close the "Desktop" window, but not the Desktop
this->Quit();
}
SetSingleWindowBrowseShortcuts(
settings.SingleWindowBrowse());
break;