|
@@ -128,19 +128,25 @@ import Cocoa
|
|
|
}
|
|
|
|
|
|
override func windowShouldClose(_ sender: NSWindow) -> Bool {
|
|
|
-#if DEBUG
|
|
|
- if self.browser.tabStripModel.count() > 1 {
|
|
|
- self.browser.windowDidBeginToClose()
|
|
|
- return false
|
|
|
- }
|
|
|
-#else
|
|
|
+//#if DEBUG
|
|
|
+// if self.browser.tabStripModel.count() > 1 {
|
|
|
+// self.browser.windowDidBeginToClose()
|
|
|
+// return false
|
|
|
+// }
|
|
|
+//#else
|
|
|
+// if let cnt = self.browser?.tabStripModel?.count(), cnt > 1 {
|
|
|
+// if self.browser?.window != nil {
|
|
|
+// self.browser?.windowDidBeginToClose()
|
|
|
+// }
|
|
|
+// return false
|
|
|
+// }
|
|
|
+//#endif
|
|
|
if let cnt = self.browser?.tabStripModel?.count(), cnt > 1 {
|
|
|
if self.browser?.window != nil {
|
|
|
self.browser?.windowDidBeginToClose()
|
|
|
}
|
|
|
return false
|
|
|
}
|
|
|
-#endif
|
|
|
return true
|
|
|
}
|
|
|
|