added missing files from last commit
This commit is contained in:
parent
7b02038397
commit
edac0eab76
|
@ -7,10 +7,10 @@
|
|||
objects = {
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
5127B2052229E07B006D641D /* DetailKeyboardDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5127B2032229E07B006D641D /* DetailKeyboardDelegate.swift */; };
|
||||
5127B2062229E07B006D641D /* DetailKeyboardDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5127B2032229E07B006D641D /* DetailKeyboardDelegate.swift */; };
|
||||
5127B2072229E07B006D641D /* DetailKeyboardShortcuts.plist in Resources */ = {isa = PBXBuildFile; fileRef = 5127B2042229E07B006D641D /* DetailKeyboardShortcuts.plist */; };
|
||||
5127B2082229E07B006D641D /* DetailKeyboardShortcuts.plist in Resources */ = {isa = PBXBuildFile; fileRef = 5127B2042229E07B006D641D /* DetailKeyboardShortcuts.plist */; };
|
||||
5127B238222B4849006D641D /* DetailKeyboardDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5127B236222B4849006D641D /* DetailKeyboardDelegate.swift */; };
|
||||
5127B239222B4849006D641D /* DetailKeyboardDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5127B236222B4849006D641D /* DetailKeyboardDelegate.swift */; };
|
||||
5127B23A222B4849006D641D /* DetailKeyboardShortcuts.plist in Resources */ = {isa = PBXBuildFile; fileRef = 5127B237222B4849006D641D /* DetailKeyboardShortcuts.plist */; };
|
||||
5127B23B222B4849006D641D /* DetailKeyboardShortcuts.plist in Resources */ = {isa = PBXBuildFile; fileRef = 5127B237222B4849006D641D /* DetailKeyboardShortcuts.plist */; };
|
||||
519B8D332143397200FA689C /* SharingServiceDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 519B8D322143397200FA689C /* SharingServiceDelegate.swift */; };
|
||||
51EC114C2149FE3300B296E3 /* FolderTreeMenu.swift in Sources */ = {isa = PBXBuildFile; fileRef = 51EC114B2149FE3300B296E3 /* FolderTreeMenu.swift */; };
|
||||
6581C73820CED60100F4AD34 /* SafariExtensionHandler.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6581C73720CED60100F4AD34 /* SafariExtensionHandler.swift */; };
|
||||
|
@ -733,8 +733,8 @@
|
|||
/* End PBXCopyFilesBuildPhase section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
5127B2032229E07B006D641D /* DetailKeyboardDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DetailKeyboardDelegate.swift; sourceTree = "<group>"; };
|
||||
5127B2042229E07B006D641D /* DetailKeyboardShortcuts.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = DetailKeyboardShortcuts.plist; sourceTree = "<group>"; };
|
||||
5127B236222B4849006D641D /* DetailKeyboardDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DetailKeyboardDelegate.swift; sourceTree = "<group>"; };
|
||||
5127B237222B4849006D641D /* DetailKeyboardShortcuts.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = DetailKeyboardShortcuts.plist; sourceTree = "<group>"; };
|
||||
519B8D322143397200FA689C /* SharingServiceDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SharingServiceDelegate.swift; sourceTree = "<group>"; };
|
||||
51EC114B2149FE3300B296E3 /* FolderTreeMenu.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = FolderTreeMenu.swift; path = AddFeed/FolderTreeMenu.swift; sourceTree = "<group>"; };
|
||||
51EC1194214A94AC00B296E3 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = NetNewsWire/Base.lproj/AddFeedFromListSheet.xib; sourceTree = SOURCE_ROOT; };
|
||||
|
@ -1035,11 +1035,11 @@
|
|||
/* End PBXFrameworksBuildPhase section */
|
||||
|
||||
/* Begin PBXGroup section */
|
||||
5127B1F62229DFED006D641D /* Keyboard */ = {
|
||||
5127B235222B4849006D641D /* Keyboard */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
5127B2032229E07B006D641D /* DetailKeyboardDelegate.swift */,
|
||||
5127B2042229E07B006D641D /* DetailKeyboardShortcuts.plist */,
|
||||
5127B236222B4849006D641D /* DetailKeyboardDelegate.swift */,
|
||||
5127B237222B4849006D641D /* DetailKeyboardShortcuts.plist */,
|
||||
);
|
||||
path = Keyboard;
|
||||
sourceTree = "<group>";
|
||||
|
@ -1358,7 +1358,7 @@
|
|||
84D52E941FE588BB00D14F5B /* DetailStatusBarView.swift */,
|
||||
849A979A1ED9EFEB007D329B /* styleSheet.css */,
|
||||
849A979B1ED9EFEB007D329B /* template.html */,
|
||||
5127B1F62229DFED006D641D /* Keyboard */,
|
||||
5127B235222B4849006D641D /* Keyboard */,
|
||||
);
|
||||
path = Detail;
|
||||
sourceTree = "<group>";
|
||||
|
@ -2234,7 +2234,7 @@
|
|||
840F7CA321BDA4B40057E851 /* MainWindow.storyboard in Resources */,
|
||||
840F7CA521BDA4B40057E851 /* styleSheet.css in Resources */,
|
||||
840F7CA621BDA4B40057E851 /* Preferences.storyboard in Resources */,
|
||||
5127B2082229E07B006D641D /* DetailKeyboardShortcuts.plist in Resources */,
|
||||
5127B23B222B4849006D641D /* DetailKeyboardShortcuts.plist in Resources */,
|
||||
840F7CC121BDAD2C0057E851 /* Credits.rtf in Resources */,
|
||||
840F7CA721BDA4B40057E851 /* RenameSheet.xib in Resources */,
|
||||
840F7CA821BDA4B40057E851 /* Inspector.storyboard in Resources */,
|
||||
|
@ -2260,7 +2260,7 @@
|
|||
849A97951ED9EF7A007D329B /* IndeterminateProgressWindow.xib in Resources */,
|
||||
844B5B651FEA11F200C7C76A /* GlobalKeyboardShortcuts.plist in Resources */,
|
||||
849A978F1ED9EE72007D329B /* DefaultFeeds.plist in Resources */,
|
||||
5127B2072229E07B006D641D /* DetailKeyboardShortcuts.plist in Resources */,
|
||||
5127B23A222B4849006D641D /* DetailKeyboardShortcuts.plist in Resources */,
|
||||
845479881FEB77C000AD8B59 /* TimelineKeyboardShortcuts.plist in Resources */,
|
||||
849A979D1ED9EFEB007D329B /* template.html in Resources */,
|
||||
849A97A91ED9F9AA007D329B /* AddFeedSheet.xib in Resources */,
|
||||
|
@ -2400,7 +2400,7 @@
|
|||
840F7C2F21BDA4B40057E851 /* SidebarCellLayout.swift in Sources */,
|
||||
840F7C3021BDA4B40057E851 /* SmartFeedPasteboardWriter.swift in Sources */,
|
||||
840F7C3121BDA4B40057E851 /* SmartFeedsController.swift in Sources */,
|
||||
5127B2062229E07B006D641D /* DetailKeyboardDelegate.swift in Sources */,
|
||||
5127B239222B4849006D641D /* DetailKeyboardDelegate.swift in Sources */,
|
||||
840F7C3221BDA4B40057E851 /* SidebarViewController.swift in Sources */,
|
||||
840F7C3321BDA4B40057E851 /* SidebarOutlineView.swift in Sources */,
|
||||
840F7C3421BDA4B40057E851 /* Author+Scriptability.swift in Sources */,
|
||||
|
@ -2527,7 +2527,7 @@
|
|||
84CC88181FE59CBF00644329 /* SmartFeedsController.swift in Sources */,
|
||||
849A97661ED9EB96007D329B /* SidebarViewController.swift in Sources */,
|
||||
849A97641ED9EB96007D329B /* SidebarOutlineView.swift in Sources */,
|
||||
5127B2052229E07B006D641D /* DetailKeyboardDelegate.swift in Sources */,
|
||||
5127B238222B4849006D641D /* DetailKeyboardDelegate.swift in Sources */,
|
||||
8405DD9922153B6B008CE1BF /* TimelineContainerView.swift in Sources */,
|
||||
D5A2678C20130ECF00A8D3C0 /* Author+Scriptability.swift in Sources */,
|
||||
84F2D5371FC22FCC00998D64 /* PseudoFeed.swift in Sources */,
|
||||
|
|
|
@ -0,0 +1,40 @@
|
|||
//
|
||||
// DetailKeyboardDelegate.swift
|
||||
// NetNewsWire
|
||||
//
|
||||
// Created by Maurice Parker on 3/1/19.
|
||||
// Copyright © 2019 Ranchero Software. All rights reserved.
|
||||
//
|
||||
|
||||
import AppKit
|
||||
import RSCore
|
||||
|
||||
@objc final class DetailKeyboardDelegate: NSObject, KeyboardDelegate {
|
||||
|
||||
let shortcuts: Set<KeyboardShortcut>
|
||||
|
||||
override init() {
|
||||
|
||||
let f = Bundle.main.path(forResource: "DetailKeyboardShortcuts", ofType: "plist")!
|
||||
let rawShortcuts = NSArray(contentsOfFile: f)! as! [[String: Any]]
|
||||
|
||||
self.shortcuts = Set(rawShortcuts.compactMap { KeyboardShortcut(dictionary: $0) })
|
||||
|
||||
super.init()
|
||||
}
|
||||
|
||||
func keydown(_ event: NSEvent, in view: NSView) -> Bool {
|
||||
|
||||
if MainWindowKeyboardHandler.shared.keydown(event, in: view) {
|
||||
return true
|
||||
}
|
||||
|
||||
let key = KeyboardKey(with: event)
|
||||
guard let matchingShortcut = KeyboardShortcut.findMatchingShortcut(in: shortcuts, key: key) else {
|
||||
return false
|
||||
}
|
||||
|
||||
matchingShortcut.perform(with: view)
|
||||
return true
|
||||
}
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<array>
|
||||
<dict>
|
||||
<key>key</key>
|
||||
<string>[leftarrow]</string>
|
||||
<key>action</key>
|
||||
<string>navigateToTimeline:</string>
|
||||
</dict>
|
||||
</array>
|
||||
</plist>
|
Loading…
Reference in New Issue