|
@@ -787,12 +787,39 @@ extension KMBrowserWindowController {
|
|
|
@IBAction func toggleCaseInsensitiveNoteSearch(_ sender: Any?) {
|
|
|
KMPrint("toggleCaseInsensitiveNoteSearch ...")
|
|
|
}
|
|
|
- @IBAction func performFindPanelAction(_ sender: Any?) {
|
|
|
+ @IBAction func performFindPanelAction(_ sender: NSMenuItem) {
|
|
|
KMPrint("performFindPanelAction ...")
|
|
|
- if let document = self.browser.activeTabContents() as? KMMainDocument {
|
|
|
- if document.isHome == false {
|
|
|
- document.mainViewController?.toolbarController.showFindBar()
|
|
|
+
|
|
|
+ var forward = true
|
|
|
+ var findString: String?
|
|
|
+
|
|
|
+ switch sender.tag {
|
|
|
+ case 1:
|
|
|
+ if let document = self.browser.activeTabContents() as? KMMainDocument {
|
|
|
+ if document.isHome == false {
|
|
|
+ document.mainViewController?.toolbarController.showFindBar()
|
|
|
+ }
|
|
|
+ }
|
|
|
+ case 3:
|
|
|
+ if let document = self.browser.activeTabContents() as? KMMainDocument {
|
|
|
+ if document.isHome == false {
|
|
|
+ document.mainViewController?.toolbarController.showFindString(forward: false)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ case 2:
|
|
|
+ if let document = self.browser.activeTabContents() as? KMMainDocument {
|
|
|
+ if document.isHome == false {
|
|
|
+ document.mainViewController?.toolbarController.showFindString(forward: true)
|
|
|
+ }
|
|
|
}
|
|
|
+ case 7:
|
|
|
+ if let document = self.browser.activeTabContents() as? KMMainDocument {
|
|
|
+ if document.isHome == false {
|
|
|
+ document.mainViewController?.toolbarController.showAllAction()
|
|
|
+ }
|
|
|
+ }
|
|
|
+ default: break
|
|
|
+
|
|
|
}
|
|
|
}
|
|
|
@IBAction func scrollUp(_ sender: Any?) {
|