[Haiku-commits] r29772 - haiku/trunk/src/kits/tracker

stippi at mail.berlios.de stippi at mail.berlios.de
Sun Mar 29 10:36:57 CEST 2009


Author: stippi
Date: 2009-03-29 10:36:55 +0200 (Sun, 29 Mar 2009)
New Revision: 29772
ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=29772&view=rev

Modified:
   haiku/trunk/src/kits/tracker/Tracker.cpp
Log:
Patch by jonas.kirilla: Allow the Tracker settings window to be quit by
Command-Q. Thanks a lot!


Modified: haiku/trunk/src/kits/tracker/Tracker.cpp
===================================================================
--- haiku/trunk/src/kits/tracker/Tracker.cpp	2009-03-29 08:16:26 UTC (rev 29771)
+++ haiku/trunk/src/kits/tracker/Tracker.cpp	2009-03-29 08:36:55 UTC (rev 29772)
@@ -241,8 +241,23 @@
 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




More information about the Haiku-commits mailing list