|
@@ -521,16 +521,16 @@ class AppDelegate: NSObject, NSApplicationDelegate, iRateDelegate{
|
|
|
}
|
|
|
|
|
|
let windowControler = NSApp.mainWindow?.windowController as! KMBrowserWindowController
|
|
|
- let model: CTTabStripModel = windowControler.browser.tabStripModel
|
|
|
- if (model.count() <= 0) {
|
|
|
+ let model = windowControler.browser?.tabStripModel
|
|
|
+ if let cnt = model?.count(), cnt <= 0 {
|
|
|
return
|
|
|
}
|
|
|
|
|
|
- if (model.activeTabContents().isHome) {
|
|
|
+ if let data = model?.activeTabContents()?.isHome, data {
|
|
|
return
|
|
|
}
|
|
|
|
|
|
- let document: KMMainDocument = model.activeTabContents() as! KMMainDocument
|
|
|
+ let document: KMMainDocument = model?.activeTabContents() as! KMMainDocument
|
|
|
if let data = document.mainViewController?.saveWatermarkFlag, !data {
|
|
|
let represent : NSSharingService = sender.representedObject as! NSSharingService
|
|
|
represent.perform(withItems: [document.fileURL as Any])
|
|
@@ -540,6 +540,7 @@ class AppDelegate: NSObject, NSApplicationDelegate, iRateDelegate{
|
|
|
let represent : NSSharingService = sender.representedObject as! NSSharingService
|
|
|
represent.perform(withItems: [document.fileURL as Any])
|
|
|
}
|
|
|
+
|
|
|
@objc func deviceCameraMenuItemAciton(sender: NSMenuItem) {
|
|
|
KMPrint("deviceCameraMenuItemAciton")
|
|
|
NotificationCenter.default.post(name: NSNotification.Name(rawValue: "kDeviceCameraMenuItemNotification"), object: nil)
|