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:
@@ -241,8 +241,23 @@ bool
|
|||||||
TTracker::QuitRequested()
|
TTracker::QuitRequested()
|
||||||
{
|
{
|
||||||
// don't allow user quitting
|
// 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;
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
gStatusWindow->AttemptToQuit();
|
gStatusWindow->AttemptToQuit();
|
||||||
// try quitting the copy/move/empty trash threads
|
// try quitting the copy/move/empty trash threads
|
||||||
|
|||||||
Reference in New Issue
Block a user