Patch by jonas.kirilla: Allow the Tracker settings window to be quit by

Command-Q. Thanks a lot!


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29772 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Stephan Aßmus 2009-03-29 08:36:55 +00:00
parent 6fa92ae021
commit dec2485ca0

View File

@ -241,8 +241,23 @@ bool
TTracker::QuitRequested()
{
// don't allow user quitting
if (CurrentMessage() && CurrentMessage()->FindBool("shortcut"))
if (CurrentMessage() && CurrentMessage()->FindBool("shortcut")) {
// but allow quitting to hide fSettingsWindow
int32 index = 0;
BWindow *window = NULL;
while ((window = WindowAt(index++)) != NULL) {
if (window == fSettingsWindow) {
if (fSettingsWindow->Lock()) {
if (!fSettingsWindow->IsHidden()
&& fSettingsWindow->IsActive())
fSettingsWindow->Hide();
fSettingsWindow->Unlock();
}
break;
}
}
return false;
}
gStatusWindow->AttemptToQuit();
// try quitting the copy/move/empty trash threads