|
@@ -194,8 +194,18 @@ import Cocoa
|
|
|
}
|
|
|
|
|
|
self.homeContentView.historyRemoveAllFileAction = { [unowned self] view in
|
|
|
- let urls: Array<URL> = NSDocumentController.shared.recentDocumentURLs
|
|
|
- self.historyFileDeleteAction(urls)
|
|
|
+ let alert = NSAlert()
|
|
|
+ alert.alertStyle = .critical
|
|
|
+ alert.messageText = String(format: "%@?", NSLocalizedString("Clear All Recents", comment: ""))
|
|
|
+ alert.addButton(withTitle: NSLocalizedString("Delete", comment: ""))
|
|
|
+ alert.addButton(withTitle: NSLocalizedString("Cancel", comment: ""))
|
|
|
+
|
|
|
+ alert.beginSheetModal(for: self.view.window!) { response in
|
|
|
+ if response == .alertFirstButtonReturn {
|
|
|
+ let urls: Array<URL> = NSDocumentController.shared.recentDocumentURLs
|
|
|
+ self.historyFileDeleteAction(urls)
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
//quciktools
|