|
@@ -955,6 +955,10 @@ extension KMToolbarViewController : KMToolbarViewDelegate,NSToolbarItemValidatio
|
|
|
item?.titleName = NSLocalizedString("Insert", comment: "")
|
|
|
item?.boxImagePosition = .imageOnly
|
|
|
item?.btnAction = #selector(_itemAction)
|
|
|
+
|
|
|
+ let menuItem = NSMenuItem.init(title: NSLocalizedString("Insert", comment: ""), action: #selector(_menuItemAction), target: self)
|
|
|
+ item?.menuFormRepresentation = menuItem
|
|
|
+ menuItem.representedObject = identifier
|
|
|
} else if (identifier == KMToolbarPageEditExtractItemIdentifier) {
|
|
|
item?.image = NSImage(named: KMImageNameUXIconSubtoolbarPageExtract)
|
|
|
item?.alternateImage = NSImage(named: KMImageNameUXIconSubtoolbarPageExtract)
|
|
@@ -984,6 +988,10 @@ extension KMToolbarViewController : KMToolbarViewDelegate,NSToolbarItemValidatio
|
|
|
item?.titleName = NSLocalizedString("Split", comment: "")
|
|
|
item?.boxImagePosition = .imageOnly
|
|
|
item?.btnAction = #selector(_itemAction)
|
|
|
+
|
|
|
+ let menuItem = NSMenuItem.init(title: NSLocalizedString("Split", comment: ""), action: #selector(_menuItemAction), target: self)
|
|
|
+ item?.menuFormRepresentation = menuItem
|
|
|
+ menuItem.representedObject = identifier
|
|
|
} else if (identifier == KMToolbarPageEditReverseItemIdentifier) {
|
|
|
item?.image = NSImage(named: KMImageNameUXIconSubtoolbarPageReverse)
|
|
|
item?.alternateImage = NSImage(named: KMImageNameUXIconSubtoolbarPageReverse)
|
|
@@ -1822,6 +1830,10 @@ extension KMToolbarViewController {
|
|
|
item?.titleName = NSLocalizedString("Hide", comment: "")
|
|
|
item?.boxImagePosition = .imageOnly
|
|
|
item?.btnAction = #selector(showPDFLayoutMode)
|
|
|
+
|
|
|
+ let menuItem = NSMenuItem.init(title: NSLocalizedString("Hide", comment: ""), action: #selector(_menuItemAction), target: self)
|
|
|
+ item?.menuFormRepresentation = menuItem
|
|
|
+ menuItem.representedObject = identifier
|
|
|
} else if identifier == KMToolbarAnnotationSettingItemIdentifier {
|
|
|
item?.image = NSImage(named: "KMImageNameUXIconBtnSetNor")
|
|
|
item?.target = self
|
|
@@ -1851,6 +1863,10 @@ extension KMToolbarViewController {
|
|
|
item?.isPopToolTip = true
|
|
|
item?.boxImagePosition = .imageOnly
|
|
|
item?.btnAction = #selector(_itemAction)
|
|
|
+
|
|
|
+ let menuItem = NSMenuItem.init(title: NSLocalizedString("Table", comment: ""), action: #selector(_menuItemAction), target: self)
|
|
|
+ item?.menuFormRepresentation = menuItem
|
|
|
+ menuItem.representedObject = identifier
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -1886,6 +1902,10 @@ extension KMToolbarViewController {
|
|
|
item?.boxImagePosition = .imageLeft
|
|
|
item?.btnAction = #selector(conversionMenuItemAction)
|
|
|
item?.promptIdentifier = identifier
|
|
|
+
|
|
|
+ let menuItem = NSMenuItem.init(title: NSLocalizedString("To Word", comment: ""), action: #selector(_menuItemAction), target: self)
|
|
|
+ menuItem.representedObject = identifier
|
|
|
+ item?.menuFormRepresentation = menuItem
|
|
|
} else if identifier == KMToolbarConversionExcelItemIdentifier {
|
|
|
item?.image = NSImage(named: KMImageNameUXIconSubtoolbarConvertExcel)
|
|
|
item?.target = self
|
|
@@ -1895,6 +1915,10 @@ extension KMToolbarViewController {
|
|
|
item?.boxImagePosition = .imageLeft
|
|
|
item?.btnAction = #selector(conversionMenuItemAction)
|
|
|
item?.promptIdentifier = identifier
|
|
|
+
|
|
|
+ let menuItem = NSMenuItem.init(title: NSLocalizedString("To Excel", comment: ""), action: #selector(_menuItemAction), target: self)
|
|
|
+ menuItem.representedObject = identifier
|
|
|
+ item?.menuFormRepresentation = menuItem
|
|
|
} else if identifier == KMToolbarConversionPPTItemIdentifier {
|
|
|
item?.image = NSImage(named: KMImageNameUXIconSubtoolbarConvertPPT)
|
|
|
item?.target = self
|
|
@@ -1904,6 +1928,10 @@ extension KMToolbarViewController {
|
|
|
item?.boxImagePosition = .imageLeft
|
|
|
item?.btnAction = #selector(conversionMenuItemAction)
|
|
|
item?.promptIdentifier = identifier
|
|
|
+
|
|
|
+ let menuItem = NSMenuItem.init(title: NSLocalizedString("To PPT", comment: ""), action: #selector(_menuItemAction), target: self)
|
|
|
+ menuItem.representedObject = identifier
|
|
|
+ item?.menuFormRepresentation = menuItem
|
|
|
} else if identifier == KMToolbarConversionRTFItemIdentifier {
|
|
|
item?.image = NSImage(named: KMImageNameUXIconSubtoolbarConvertRTF)
|
|
|
item?.target = self
|
|
@@ -1913,6 +1941,10 @@ extension KMToolbarViewController {
|
|
|
item?.boxImagePosition = .imageLeft
|
|
|
item?.btnAction = #selector(conversionMenuItemAction)
|
|
|
item?.promptIdentifier = identifier
|
|
|
+
|
|
|
+ let menuItem = NSMenuItem.init(title: NSLocalizedString("To RTF", comment: ""), action: #selector(_menuItemAction), target: self)
|
|
|
+ menuItem.representedObject = identifier
|
|
|
+ item?.menuFormRepresentation = menuItem
|
|
|
} else if identifier == KMToolbarConversionCSVItemIdentifier {
|
|
|
item?.image = NSImage(named: KMImageNameUXIconSubtoolbarConvertCSV)
|
|
|
item?.target = self
|
|
@@ -1922,6 +1954,10 @@ extension KMToolbarViewController {
|
|
|
item?.boxImagePosition = .imageLeft
|
|
|
item?.btnAction = #selector(conversionMenuItemAction)
|
|
|
item?.promptIdentifier = identifier
|
|
|
+
|
|
|
+ let menuItem = NSMenuItem.init(title: NSLocalizedString("To CSV", comment: ""), action: #selector(_menuItemAction), target: self)
|
|
|
+ menuItem.representedObject = identifier
|
|
|
+ item?.menuFormRepresentation = menuItem
|
|
|
} else if identifier == KMToolbarConversionHTMLItemIdentifier {
|
|
|
item?.image = NSImage(named: KMImageNameUXIconSubtoolbarConvertHtml)
|
|
|
item?.target = self
|
|
@@ -1930,6 +1966,10 @@ extension KMToolbarViewController {
|
|
|
item?.titleName = NSLocalizedString("To HTML", comment: "")
|
|
|
item?.boxImagePosition = .imageLeft
|
|
|
item?.btnAction = #selector(conversionMenuItemAction)
|
|
|
+
|
|
|
+ let menuItem = NSMenuItem.init(title: NSLocalizedString("To HTML", comment: ""), action: #selector(_menuItemAction), target: self)
|
|
|
+ menuItem.representedObject = identifier
|
|
|
+ item?.menuFormRepresentation = menuItem
|
|
|
} else if identifier == KMToolbarConversionTextItemIdentifier {
|
|
|
item?.image = NSImage(named: KMImageNameUXIconSubtoolbarConvertText)
|
|
|
item?.target = self
|
|
@@ -1938,6 +1978,10 @@ extension KMToolbarViewController {
|
|
|
item?.titleName = NSLocalizedString("To Text", comment: "")
|
|
|
item?.boxImagePosition = .imageLeft
|
|
|
item?.btnAction = #selector(conversionMenuItemAction)
|
|
|
+
|
|
|
+ let menuItem = NSMenuItem.init(title: NSLocalizedString("To Text", comment: ""), action: #selector(_menuItemAction), target: self)
|
|
|
+ menuItem.representedObject = identifier
|
|
|
+ item?.menuFormRepresentation = menuItem
|
|
|
} else if identifier == KMToolbarConversionImageItemIdentifier {
|
|
|
item?.image = NSImage(named: KMImageNameUXIconSubtoolbarConvertPDFToIMG)
|
|
|
item?.target = self
|
|
@@ -2227,7 +2271,7 @@ extension KMToolbarViewController {
|
|
|
item?.needExpandAction = true
|
|
|
// item?.btnAction = #selector(cropMenuAction)
|
|
|
|
|
|
- let menuItem = NSMenuItem.init(title: "Crop", action: #selector(cropMenuAction), target: self)
|
|
|
+ let menuItem = NSMenuItem.init(title: NSLocalizedString("Crop", comment: ""), action: #selector(cropMenuAction), target: self)
|
|
|
let subMenu = NSMenu()
|
|
|
// subMenu.addItem(title: NSLocalizedString("Crop All Pages", comment: ""), action: #selector(_cropAction), target: self, tag: 1)
|
|
|
subMenu.addItem(title: NSLocalizedString("Crop Current Page", comment: ""), action: #selector(_cropAction), target: self, tag: 2)
|
|
@@ -2295,7 +2339,7 @@ extension KMToolbarViewController {
|
|
|
item?.needExpandAction = true
|
|
|
// item?.btnAction = #selector(batesMenuAction)
|
|
|
|
|
|
- let menuItem = NSMenuItem.init(title: "Bates Numbers", action: nil, target: self)
|
|
|
+ let menuItem = NSMenuItem.init(title: NSLocalizedString("Bates Numbers", comment: ""), action: nil, target: self)
|
|
|
let subMenu = NSMenu()
|
|
|
subMenu.addItem(title: NSLocalizedString("Add Bates Numbers", comment: ""), action: #selector(_batesAction), target: self, tag: 1)
|
|
|
subMenu.addItem(title: NSLocalizedString("Remove Bates Numbers", comment: ""), action: #selector(_batesAction), target: self, tag: 2)
|
|
@@ -2331,7 +2375,7 @@ extension KMToolbarViewController {
|
|
|
item?.needExpandAction = true
|
|
|
// item?.btnAction = #selector(headerfooterMenuAction)
|
|
|
|
|
|
- let menuItem = NSMenuItem.init(title: "Header & Footer", action: nil, target: self)
|
|
|
+ let menuItem = NSMenuItem.init(title: NSLocalizedString("Header & Footer", comment: ""), action: nil, target: self)
|
|
|
let subMenu = NSMenu()
|
|
|
subMenu.addItem(title: NSLocalizedString("Add Header & Footer", comment: ""), action: #selector(_headerfooterAction), target: self, tag: 1)
|
|
|
subMenu.addItem(title: NSLocalizedString("Remove Header & Footer", comment: ""), action: #selector(_headerfooterAction), target: self, tag: 2)
|
|
@@ -2350,7 +2394,7 @@ extension KMToolbarViewController {
|
|
|
item?.needExpandAction = true
|
|
|
// item?.btnAction = #selector(backgroundMenuAction)
|
|
|
|
|
|
- let menuItem = NSMenuItem.init(title: "Background", action: nil, target: self)
|
|
|
+ let menuItem = NSMenuItem.init(title: NSLocalizedString("Background", comment: ""), action: nil, target: self)
|
|
|
let subMenu = NSMenu()
|
|
|
subMenu.addItem(title: NSLocalizedString("Add Background", comment: ""), action: #selector(_backgroundAction), target: self, tag: 1)
|
|
|
subMenu.addItem(title: NSLocalizedString("Remove Background", comment: ""), action: #selector(_backgroundAction), target: self, tag: 2)
|
|
@@ -2369,7 +2413,7 @@ extension KMToolbarViewController {
|
|
|
item?.needExpandAction = true
|
|
|
// item?.btnAction = #selector(watermarkMenuAction)
|
|
|
|
|
|
- let menuItem = NSMenuItem.init(title: "Watermark", action: nil, target: self)
|
|
|
+ let menuItem = NSMenuItem.init(title: NSLocalizedString("Watermark", comment: ""), action: nil, target: self)
|
|
|
let subMenu = NSMenu()
|
|
|
subMenu.addItem(title: NSLocalizedString("Add Watermark", comment: ""), action: #selector(_watermarkAction), target: self, tag: 1)
|
|
|
subMenu.addItem(title: NSLocalizedString("Remove Watermark", comment: ""), action: #selector(_watermarkAction), target: self, tag: 2)
|
|
@@ -2386,6 +2430,9 @@ extension KMToolbarViewController {
|
|
|
item?.toolTip = NSLocalizedString("Reduce file size", comment: "")
|
|
|
item?.titleName = NSLocalizedString("Compress", comment: "")
|
|
|
item?.btnAction = #selector(compressMenuAction)
|
|
|
+ let menuItem = NSMenuItem.init(title: NSLocalizedString("Compress", comment: ""), action: #selector(_menuItemAction), target: self)
|
|
|
+ item?.menuFormRepresentation = menuItem
|
|
|
+ menuItem.representedObject = identifier
|
|
|
} else if identifier == KMToolbarToolSecureItemIdentifier {
|
|
|
item?.image = NSImage(named: "KMImageNameUXIconBatchSafeNor")
|
|
|
item?.target = self
|
|
@@ -2409,6 +2456,10 @@ extension KMToolbarViewController {
|
|
|
item?.titleName = NSLocalizedString("Merge", comment: "")
|
|
|
item?.boxImagePosition = .imageLeft
|
|
|
item?.btnAction = #selector(mergeMenuItemAction)
|
|
|
+
|
|
|
+ let menuItem = NSMenuItem.init(title: NSLocalizedString("Merge", comment: ""), action: #selector(_menuItemAction), target: self)
|
|
|
+ item?.menuFormRepresentation = menuItem
|
|
|
+ menuItem.representedObject = identifier
|
|
|
} else if identifier == KMToolbarMeasureItemIdentifier {
|
|
|
item?.image = NSImage(named: "KMImageNameUXIconMeasureNor")
|
|
|
item?.target = self
|