|
@@ -266,7 +266,6 @@ class AppDelegate: NSObject, NSApplicationDelegate {
|
|
|
if (appTarget == .pro) {
|
|
|
appName = "PDF Master Pro"
|
|
|
} else if (appTarget == .DMG) {
|
|
|
- // appName = "PDF Master DMG"
|
|
|
appName = "PDF Master"
|
|
|
}
|
|
|
if let _range = ranges.range.first {
|
|
@@ -523,57 +522,6 @@ extension AppDelegate : NSMenuDelegate,NSMenuItemValidation {
|
|
|
KMPrint("更新菜单栏")
|
|
|
}
|
|
|
|
|
|
- func menuNeedsUpdate(_ menu: NSMenu) {
|
|
|
- KMPrint("menuNeedsUpdate")
|
|
|
-// menu.removeAllItems()
|
|
|
-//
|
|
|
-// var item = NSMenuItem()
|
|
|
-// item = menu.addItem(withTitle: NSLocalizedString("Insert", comment: ""), action: nil, target: self)
|
|
|
-// item.representedObject = row
|
|
|
-//
|
|
|
-// var subMenu = NSMenu()
|
|
|
-// var subitem = NSMenuItem()
|
|
|
-// subitem = subMenu.addItem(withTitle: NSLocalizedString("Insert File", comment: ""), action: #selector(insertPageItemAction), target: self, tag:0)
|
|
|
-// subitem.representedObject = row
|
|
|
-// subitem = subMenu.addItem(withTitle: NSLocalizedString("Insert blank page", comment: ""), action: #selector(insertPageItemAction), target: self, tag:1)
|
|
|
-// subitem.representedObject = row
|
|
|
-// subitem = subMenu.addItem(withTitle: NSLocalizedString("Insert page", comment: ""), action: #selector(insertPageItemAction), target: self, tag:2)
|
|
|
-// subitem.representedObject = row
|
|
|
-// item.submenu = subMenu
|
|
|
-//
|
|
|
-// item = menu.addItem(withTitle: NSLocalizedString("Extract", comment: ""), action: #selector(extractPageItemAction), target: self)
|
|
|
-// item.representedObject = row
|
|
|
-// item = menu.addItem(withTitle: NSLocalizedString("Delete Page", comment: ""), action: #selector(deletePageItemAction), target: self)
|
|
|
-// item.representedObject = row
|
|
|
-// item = menu.addItem(withTitle: NSLocalizedString("Page Edit", comment: ""), action: #selector(pageEditItemAction), target: self)
|
|
|
-// item.representedObject = row
|
|
|
-//
|
|
|
-// menu.addItem(NSMenuItem.separator())
|
|
|
-//
|
|
|
-// item = menu.addItem(withTitle: NSLocalizedString("90 Rotate", comment: ""), action: #selector(rotatePageItemAction), target: self)
|
|
|
-// item.representedObject = row
|
|
|
-// item = menu.addItem(withTitle: NSLocalizedString("-90 Rotate", comment: ""), action: #selector(leftRotatePageItemAction), target: self)
|
|
|
-// item.representedObject = row
|
|
|
-//
|
|
|
-// menu.addItem(NSMenuItem.separator())
|
|
|
-//
|
|
|
-// item = menu.addItem(withTitle: NSLocalizedString("copy", comment: ""), action: #selector(copyItemAction), target: self)
|
|
|
-// item.representedObject = row
|
|
|
-// item = menu.addItem(withTitle: NSLocalizedString("cut", comment: ""), action: #selector(cutItemAction), target: self)
|
|
|
-// item.representedObject = row
|
|
|
-// item = menu.addItem(withTitle: NSLocalizedString("paste", comment: ""), action: #selector(pastePageItemAction), target: self)
|
|
|
-//
|
|
|
-// menu.addItem(NSMenuItem.separator())
|
|
|
-//
|
|
|
-// item = menu.addItem(withTitle: NSLocalizedString("print", comment: ""), action: #selector(printItemAction), target: self)
|
|
|
-//
|
|
|
-// item = menu.addItem(withTitle: NSLocalizedString("Share", comment: ""), action: nil, target: self)
|
|
|
-//
|
|
|
-// item.submenu = NSSharingServicePicker.menu(forSharingItems: [self.listView.document.documentURL ?? ""], subjectContext: "", withTarget: self, selector: #selector(sharePageItemAction), serviceDelegate: nil)
|
|
|
-
|
|
|
-// }
|
|
|
- }
|
|
|
-
|
|
|
func menu(_ menu: NSMenu, update item: NSMenuItem, at index: Int, shouldCancel: Bool) -> Bool {
|
|
|
return true
|
|
|
}
|