|
@@ -107,26 +107,26 @@ class KMInfoWindowController: NSWindowController {
|
|
|
PDFDocumentAttribute.creationDateAttribute.rawValue,
|
|
|
PDFDocumentAttribute.modificationDateAttribute.rawValue,
|
|
|
KMInfoKeywordsStringKey]
|
|
|
- self._labels = [KMLocalizedString("File name:", "Info label") : KMInfoFileNameKey,
|
|
|
- KMLocalizedString("File size:", "Info label") : KMInfoFileSizeKey,
|
|
|
- KMLocalizedString("Page size:", "Info label") : KMInfoPageSizeKey,
|
|
|
- KMLocalizedString("Page count:", "Info label") : KMInfoPageCountKey,
|
|
|
- KMLocalizedString("PDF Version:", "Info label") : KMInfoVersionKey,
|
|
|
- KMLocalizedString("Encrypted:", "Info label") : KMInfoEncryptedKey,
|
|
|
- KMLocalizedString("Printing:", "Info label") : KMInfoAllowsPrintingKey,
|
|
|
- KMLocalizedString("Content Copying:", "Info label") : KMInfoAllowsCopyingKey,
|
|
|
- KMLocalizedString("Document Assembly:", "Info label") : KMInfoAllowsDocumentAssemblyKey,
|
|
|
- KMLocalizedString("Content Copying for Accessibility:", "Info label") : KMInfoAllowsContentAccessibilityKey,
|
|
|
- KMLocalizedString("Commenting:", "Info label") : KMInfoAllowsCommentingKey,
|
|
|
- KMLocalizedString("Filling of form fields:", "Info label") : KMInfoAllowsFormFieldEntryKey,
|
|
|
- KMLocalizedString("Title:", "Info label") : PDFDocumentAttribute.titleAttribute.rawValue,
|
|
|
- KMLocalizedString("Author:", "Info label") : PDFDocumentAttribute.authorAttribute.rawValue,
|
|
|
- KMLocalizedString("Subject:", "Info label") : PDFDocumentAttribute.subjectAttribute.rawValue,
|
|
|
- KMLocalizedString("Content Creator:", "Info label") : PDFDocumentAttribute.creatorAttribute.rawValue,
|
|
|
- KMLocalizedString("PDF Producer:", "Info label") : PDFDocumentAttribute.producerAttribute.rawValue,
|
|
|
- KMLocalizedString("Creation date:", "Info label") : PDFDocumentAttribute.creationDateAttribute.rawValue,
|
|
|
- KMLocalizedString("Modification date:", "Info label") : PDFDocumentAttribute.modificationDateAttribute.rawValue,
|
|
|
- KMLocalizedString("Keywords:", "Info label") : KMInfoKeywordsStringKey]
|
|
|
+ self._labels = [KMInfoFileNameKey : KMLocalizedString("File name:", ""),
|
|
|
+ KMInfoFileSizeKey : KMLocalizedString("File size:", ""),
|
|
|
+ KMInfoPageSizeKey : KMLocalizedString("Page size:", ""),
|
|
|
+ KMInfoPageCountKey : KMLocalizedString("Page count:", ""),
|
|
|
+ KMInfoVersionKey : KMLocalizedString("PDF Version:", ""),
|
|
|
+ KMInfoEncryptedKey : KMLocalizedString("Encrypted:", ""),
|
|
|
+ KMInfoAllowsPrintingKey : KMLocalizedString("Printing:", ""),
|
|
|
+ KMInfoAllowsCopyingKey : KMLocalizedString("Content Copying:", ""),
|
|
|
+ KMInfoAllowsDocumentAssemblyKey : KMLocalizedString("Document Assembly:", ""),
|
|
|
+ KMInfoAllowsContentAccessibilityKey : KMLocalizedString("Content Copying for Accessibility:", ""),
|
|
|
+ KMInfoAllowsCommentingKey : KMLocalizedString("Commenting:", ""),
|
|
|
+ KMInfoAllowsFormFieldEntryKey : KMLocalizedString("Filling of form fields:", ""),
|
|
|
+ PDFDocumentAttribute.titleAttribute.rawValue : KMLocalizedString("Title:", ""),
|
|
|
+ PDFDocumentAttribute.authorAttribute.rawValue : KMLocalizedString("Author:", ""),
|
|
|
+ PDFDocumentAttribute.subjectAttribute.rawValue : KMLocalizedString("Subject:", ""),
|
|
|
+ PDFDocumentAttribute.creatorAttribute.rawValue : KMLocalizedString("Content Creator:", ""),
|
|
|
+ PDFDocumentAttribute.producerAttribute.rawValue : KMLocalizedString("PDF Producer:", ""),
|
|
|
+ PDFDocumentAttribute.creationDateAttribute.rawValue : KMLocalizedString("Creation date:", ""),
|
|
|
+ PDFDocumentAttribute.modificationDateAttribute.rawValue : KMLocalizedString("Modification date:", ""),
|
|
|
+ KMInfoKeywordsStringKey : KMLocalizedString("Keywords:", "")]
|
|
|
}
|
|
|
|
|
|
override func loadWindow() {
|
|
@@ -137,12 +137,21 @@ class KMInfoWindowController: NSWindowController {
|
|
|
|
|
|
override func windowDidLoad() {
|
|
|
super.windowDidLoad()
|
|
|
+
|
|
|
+ self.window?.title = NSLocalizedString("Document Info", comment: "")
|
|
|
|
|
|
self.updateForDocument(NSApp.mainWindow?.windowController?.document as? NSDocument)
|
|
|
|
|
|
self.summaryTableView.selectionHighlightStyle = .none
|
|
|
self.attributesTableView.selectionHighlightStyle = .none
|
|
|
|
|
|
+ for item in self.tabView.tabViewItems {
|
|
|
+ if item.isEqual(to: self.tabView.tabViewItems.first) {
|
|
|
+ item.label = NSLocalizedString("Summary", comment: "")
|
|
|
+ } else {
|
|
|
+ item.label = NSLocalizedString("Attributes", comment: "")
|
|
|
+ }
|
|
|
+ }
|
|
|
self.tabView.selectTabViewItem(at: 1)
|
|
|
|
|
|
NotificationCenter.default.addObserver(self, selector: #selector(_handleViewFrameDidChangeNotification), name: NSView.frameDidChangeNotification, object: self.attributesTableView.enclosingScrollView)
|