|
@@ -261,7 +261,7 @@ class AppDelegate: NSObject, NSApplicationDelegate {
|
|
|
accountRefreshItem?.tag = kKMMainMenuAccountRefreshItemTag
|
|
|
#endif
|
|
|
#if VERSION_FREE
|
|
|
- PDFOfficeMenu?.insertItem(withTitle: NSLocalizedString("Restore Previous Purchase ", comment: ""), action: #selector(restoreSubscriptions), target: self, at: 1)
|
|
|
+ _ = PDFOfficeMenu?.insertItem(withTitle: NSLocalizedString("Restore Previous Purchase ", comment: ""), action: #selector(restoreSubscriptions), target: self, at: 1)
|
|
|
#endif
|
|
|
if let items = PDFOfficeMenu?.items {
|
|
|
for menu in items {
|
|
@@ -273,10 +273,22 @@ class AppDelegate: NSObject, NSApplicationDelegate {
|
|
|
}
|
|
|
|
|
|
let fileMenu = mainMenu?.item(at: 1)?.submenu
|
|
|
- let shareItem: NSMenuItem = NSMenuItem(title: NSLocalizedString("Share", comment: ""), action: nil, target: nil)
|
|
|
- fileMenu!.insertItem(shareItem, at: (fileMenu?.items.count)!-1)
|
|
|
+ var shareItem: NSMenuItem?
|
|
|
+ if let item = fileMenu?.item(withTitle: NSLocalizedString("Save Archive…", comment: "")) {
|
|
|
+ shareItem = NSMenuItem(title: NSLocalizedString("Share", comment: ""), action: nil, target: nil)
|
|
|
+ fileMenu?.insertItem(shareItem!, at: item.index)
|
|
|
+ fileMenu?.insertItem(.separator(), at: item.index)
|
|
|
+ } else {
|
|
|
+ shareItem = NSMenuItem(title: NSLocalizedString("Share", comment: ""), action: nil, target: nil)
|
|
|
+ fileMenu?.insertItem(shareItem!, at: (fileMenu?.items.count)!-1)
|
|
|
+ }
|
|
|
+ shareItem?.submenu = NSSharingServicePicker.menu(forSharingItems: [""], subjectContext: "", withTarget: self, selector: #selector(sharePageItemAction), serviceDelegate: nil)
|
|
|
|
|
|
- shareItem.submenu = NSSharingServicePicker.menu(forSharingItems: [""], subjectContext: "", withTarget: self, selector: #selector(sharePageItemAction), serviceDelegate: nil)
|
|
|
+ let deviceCameraMenuItem = NSMenuItem(title: NSLocalizedString("Import From Camera", comment: ""), action: #selector(deviceCameraMenuItemAciton), target: self)
|
|
|
+ let deviceScannerMenuItem = NSMenuItem(title: NSLocalizedString("Import From Scanner", comment: ""), action: #selector(deviceScannerMenuItemAciton), target: self)
|
|
|
+ fileMenu?.insertItem(deviceCameraMenuItem, at: (fileMenu?.items.count)!-1)
|
|
|
+ fileMenu?.insertItem(deviceScannerMenuItem, at: (fileMenu?.items.count)!-1)
|
|
|
+ fileMenu?.insertItem(.separator(), at: (fileMenu?.items.count)!-1)
|
|
|
|
|
|
let viewMenu = mainMenu?.item(at: 3)?.submenu
|
|
|
var zoomMenu: NSMenu?
|
|
@@ -356,6 +368,13 @@ class AppDelegate: NSObject, NSApplicationDelegate {
|
|
|
represent.perform(withItems: [document.fileURL as Any])
|
|
|
}
|
|
|
}
|
|
|
+ @objc func deviceCameraMenuItemAciton(sender: NSMenuItem) {
|
|
|
+ KMPrint("deviceCameraMenuItemAciton")
|
|
|
+ }
|
|
|
+
|
|
|
+ @objc func deviceScannerMenuItemAciton(sender: NSMenuItem) {
|
|
|
+ KMPrint("deviceScannerMenuItemAciton")
|
|
|
+ }
|
|
|
|
|
|
// MARK: PDF Master Menu
|
|
|
@IBAction func openPreferenceWindow(_ sender: Any) {
|