Craete FeedListControlsView. Wire up actions for buttons to first responder, which ends up at FeedListWindowController.

This commit is contained in:
Brent Simmons 2017-11-01 13:27:45 -07:00
parent 4575934f22
commit 3a48901c57
4 changed files with 39 additions and 3 deletions

View File

@ -12,6 +12,7 @@
842E45E31ED8C681000A8B52 /* KeyboardDelegateProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = 842E45E21ED8C681000A8B52 /* KeyboardDelegateProtocol.swift */; };
842E45E51ED8C6B7000A8B52 /* MainWindowSplitView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 842E45E41ED8C6B7000A8B52 /* MainWindowSplitView.swift */; };
842E45E71ED8C747000A8B52 /* DB5.plist in Resources */ = {isa = PBXBuildFile; fileRef = 842E45E61ED8C747000A8B52 /* DB5.plist */; };
84513F901FAA63950023A1A9 /* FeedListControlsView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84513F8F1FAA63950023A1A9 /* FeedListControlsView.swift */; };
846A7BEC1F872C5600FEFD30 /* BatchUpdate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 846A7BEB1F872C5600FEFD30 /* BatchUpdate.swift */; };
846E773D1F6EF67A00A165E2 /* Account.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 846E773A1F6EF5D700A165E2 /* Account.framework */; };
846E773E1F6EF67A00A165E2 /* Account.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 846E773A1F6EF5D700A165E2 /* Account.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
@ -381,6 +382,7 @@
842E45E21ED8C681000A8B52 /* KeyboardDelegateProtocol.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = KeyboardDelegateProtocol.swift; sourceTree = "<group>"; };
842E45E41ED8C6B7000A8B52 /* MainWindowSplitView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MainWindowSplitView.swift; sourceTree = "<group>"; };
842E45E61ED8C747000A8B52 /* DB5.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = DB5.plist; path = Evergreen/Resources/DB5.plist; sourceTree = "<group>"; };
84513F8F1FAA63950023A1A9 /* FeedListControlsView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FeedListControlsView.swift; sourceTree = "<group>"; };
846A7BEB1F872C5600FEFD30 /* BatchUpdate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = BatchUpdate.swift; path = Evergreen/BatchUpdate.swift; sourceTree = "<group>"; };
846E77161F6EF5D000A165E2 /* Database.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = Database.xcodeproj; path = Frameworks/Database/Database.xcodeproj; sourceTree = "<group>"; };
846E77301F6EF5D600A165E2 /* Account.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = Account.xcodeproj; path = Frameworks/Account/Account.xcodeproj; sourceTree = "<group>"; };
@ -633,6 +635,7 @@
children = (
849A97AD1ED9FA08007D329B /* FeedList.storyboard */,
849A978C1ED9EE4D007D329B /* FeedListWindowController.swift */,
84513F8F1FAA63950023A1A9 /* FeedListControlsView.swift */,
);
name = "Feed List";
path = Evergreen/FeedList;
@ -1179,6 +1182,7 @@
buildActionMask = 2147483647;
files = (
849C64641ED37A5D003D8FC0 /* AppDelegate.swift in Sources */,
84513F901FAA63950023A1A9 /* FeedListControlsView.swift in Sources */,
84E46C7D1F75EF7B005ECFB3 /* AppDefaults.swift in Sources */,
842E45CE1ED8C308000A8B52 /* AppNotifications.swift in Sources */,
84DAEE321F870B390058304B /* DockBadge.swift in Sources */,

View File

@ -68,7 +68,7 @@
<segue destination="78T-I6-t3A" kind="embed" id="cA5-Oa-X83"/>
</connections>
</containerView>
<customView translatesAutoresizingMaskIntoConstraints="NO" id="Ft4-Ss-rki">
<customView translatesAutoresizingMaskIntoConstraints="NO" id="Ft4-Ss-rki" customClass="FeedListControlsView" customModule="Evergreen" customModuleProvider="target">
<rect key="frame" x="0.0" y="0.0" width="450" height="64"/>
<subviews>
<button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="cED-gO-Wz0">
@ -77,6 +77,9 @@
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
<font key="font" metaFont="system"/>
</buttonCell>
<connections>
<action selector="addToFeeds:" target="8hc-S9-JQA" id="3bF-MV-9dX"/>
</connections>
</button>
<button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="soC-1m-gwD">
<rect key="frame" x="148" y="19" width="120" height="25"/>
@ -84,6 +87,9 @@
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
<font key="font" metaFont="system"/>
</buttonCell>
<connections>
<action selector="openHomePage:" target="8hc-S9-JQA" id="vrw-8O-CxX"/>
</connections>
</button>
</subviews>
<constraints>
@ -94,6 +100,10 @@
<constraint firstItem="cED-gO-Wz0" firstAttribute="centerY" secondItem="Ft4-Ss-rki" secondAttribute="centerY" id="yeD-9q-Byh"/>
<constraint firstItem="soC-1m-gwD" firstAttribute="width" secondItem="cED-gO-Wz0" secondAttribute="width" id="zf0-5W-FIg"/>
</constraints>
<connections>
<outlet property="addToFeedsButton" destination="cED-gO-Wz0" id="Xgw-LX-lMV"/>
<outlet property="openHomePageButton" destination="soC-1m-gwD" id="CMD-WS-oSr"/>
</connections>
</customView>
</subviews>
<constraints>
@ -277,7 +287,7 @@
<tableColumnResizingMask key="resizingMask" resizeWithTable="YES" userResizable="YES"/>
<prototypeCellViews>
<tableCellView id="8PV-Cn-35M">
<rect key="frame" x="1" y="1" width="441.5" height="17"/>
<rect key="frame" x="1" y="1" width="442" height="17"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<textField verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="l6f-JK-9RY">

View File

@ -0,0 +1,15 @@
//
// FeedListControlsView.swift
// Evergreen
//
// Created by Brent Simmons on 11/1/17.
// Copyright © 2017 Ranchero Software. All rights reserved.
//
import Foundation
@objc final class FeedListControlsView: NSView {
@IBOutlet var addToFeedsButton: NSButton!
@IBOutlet var openHomePageButton: NSButton!
}

View File

@ -10,6 +10,13 @@ import Cocoa
class FeedListWindowController : NSWindowController {
@IBAction func addToFeeds(_ sender: AnyObject) {
}
@IBAction func openHomePage(_ sender: AnyObject) {
}
}