Show Dinosaurs window via Window menu command.

This commit is contained in:
Brent Simmons 2017-11-12 11:57:51 -08:00
parent 503c043e02
commit b077dfafd1
5 changed files with 74 additions and 2 deletions

View File

@ -67,6 +67,7 @@
849C646B1ED37A5D003D8FC0 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 849C64691ED37A5D003D8FC0 /* Main.storyboard */; };
849C64761ED37A5D003D8FC0 /* EvergreenTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 849C64751ED37A5D003D8FC0 /* EvergreenTests.swift */; };
84A6B6941FB8D43C006754AC /* DinosaursWindow.xib in Resources */ = {isa = PBXBuildFile; fileRef = 84A6B6931FB8D43C006754AC /* DinosaursWindow.xib */; };
84A6B6961FB8DBD2006754AC /* DinosaursWindowController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84A6B6951FB8DBD2006754AC /* DinosaursWindowController.swift */; };
84B06FAE1ED37DBD00F0B54B /* RSCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 84B06FA91ED37DAD00F0B54B /* RSCore.framework */; };
84B06FAF1ED37DBD00F0B54B /* RSCore.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 84B06FA91ED37DAD00F0B54B /* RSCore.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
84B06FB21ED37DBD00F0B54B /* RSDatabase.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 84B06F9D1ED37DA000F0B54B /* RSDatabase.framework */; };
@ -448,6 +449,7 @@
849C64751ED37A5D003D8FC0 /* EvergreenTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EvergreenTests.swift; sourceTree = "<group>"; };
849C64771ED37A5D003D8FC0 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
84A6B6931FB8D43C006754AC /* DinosaursWindow.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = DinosaursWindow.xib; sourceTree = "<group>"; };
84A6B6951FB8DBD2006754AC /* DinosaursWindowController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DinosaursWindowController.swift; sourceTree = "<group>"; };
84B06F961ED37DA000F0B54B /* RSDatabase.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RSDatabase.xcodeproj; path = Frameworks/RSDatabase/RSDatabase.xcodeproj; sourceTree = "<group>"; };
84B06FA21ED37DAC00F0B54B /* RSCore.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RSCore.xcodeproj; path = Frameworks/RSCore/RSCore.xcodeproj; sourceTree = "<group>"; };
84B06FB61ED37E8B00F0B54B /* RSWeb.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RSWeb.xcodeproj; path = Frameworks/RSWeb/RSWeb.xcodeproj; sourceTree = "<group>"; };
@ -771,6 +773,7 @@
isa = PBXGroup;
children = (
84A6B6931FB8D43C006754AC /* DinosaursWindow.xib */,
84A6B6951FB8DBD2006754AC /* DinosaursWindowController.swift */,
);
name = Dinosaurs;
path = Evergreen/Dinosaurs;
@ -1240,6 +1243,7 @@
849A97651ED9EB96007D329B /* SidebarTreeControllerDelegate.swift in Sources */,
849A97671ED9EB96007D329B /* UnreadCountView.swift in Sources */,
84E95D241FB1087500552D99 /* ArticlePasteboardWriter.swift in Sources */,
84A6B6961FB8DBD2006754AC /* DinosaursWindowController.swift in Sources */,
846A7BEC1F872C5600FEFD30 /* BatchUpdate.swift in Sources */,
849A975B1ED9EB0D007D329B /* ArticleUtilities.swift in Sources */,
84DAEE301F86CAFE0058304B /* OPMLImporter.swift in Sources */,

View File

@ -24,6 +24,7 @@ class AppDelegate: NSObject, NSApplicationDelegate, NSUserInterfaceValidations {
var preferencesWindowController: NSWindowController?
var mainWindowController: NSWindowController?
var feedListWindowController: NSWindowController?
var dinosaursWindowController: DinosaursWindowController?
var addFeedController: AddFeedController?
var addFolderWindowController: AddFolderWindowController?
let themeLoader = VSThemeLoader()
@ -198,6 +199,14 @@ class AppDelegate: NSObject, NSApplicationDelegate, NSUserInterfaceValidations {
feedListWindowController!.showWindow(self)
}
@IBAction func showDinosaursWindow(_ sender: Any?) {
if dinosaursWindowController == nil {
dinosaursWindowController = DinosaursWindowController()
}
dinosaursWindowController!.showWindow(self)
}
@IBAction func importOPMLFromFile(_ sender: AnyObject) {
let panel = NSOpenPanel()

View File

@ -458,6 +458,12 @@
<action selector="showFeedList:" target="Ady-hI-5gd" id="bd2-m5-wPq"/>
</connections>
</menuItem>
<menuItem title="Dinosaurs" id="suZ-aW-fnf">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="showDinosaursWindow:" target="Ady-hI-5gd" id="txx-zB-q2J"/>
</connections>
</menuItem>
<menuItem isSeparatorItem="YES" id="eu3-7i-yIM"/>
<menuItem title="Bring All to Front" id="LE2-aR-0XJ">
<modifierMask key="keyEquivalentModifierMask"/>

View File

@ -5,14 +5,20 @@
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
<customObject id="-2" userLabel="File's Owner"/>
<customObject id="-2" userLabel="File's Owner" customClass="DinosaursWindowController" customModule="Evergreen" customModuleProvider="target">
<connections>
<outlet property="window" destination="QvC-M9-y7g" id="BZZ-az-UQ2"/>
</connections>
</customObject>
<customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
<customObject id="-3" userLabel="Application" customClass="NSObject"/>
<window title="Dinosaurs" allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" oneShot="NO" releasedWhenClosed="NO" showsToolbarButton="NO" visibleAtLaunch="NO" frameAutosaveName="Dinosaurs" animationBehavior="default" id="QvC-M9-y7g">
<windowStyleMask key="styleMask" titled="YES" closable="YES" miniaturizable="YES" resizable="YES"/>
<windowPositionMask key="initialPositionMask" leftStrut="YES" rightStrut="YES" topStrut="YES" bottomStrut="YES"/>
<rect key="contentRect" x="196" y="240" width="630" height="436"/>
<rect key="contentRect" x="200" y="817" width="630" height="436"/>
<rect key="screenRect" x="0.0" y="0.0" width="2560" height="1417"/>
<value key="minSize" type="size" width="550" height="436"/>
<value key="maxSize" type="size" width="1024" height="2048"/>
<view key="contentView" wantsLayer="YES" id="EiT-Mj-1SZ">
<rect key="frame" x="0.0" y="0.0" width="630" height="436"/>
<autoresizingMask key="autoresizingMask"/>
@ -123,6 +129,9 @@
</tableView>
</subviews>
</clipView>
<constraints>
<constraint firstAttribute="height" relation="greaterThanOrEqual" constant="256" id="4gI-Jm-dgO"/>
</constraints>
<scroller key="horizontalScroller" hidden="YES" verticalHuggingPriority="750" horizontal="YES" id="aNX-3z-Xj7">
<rect key="frame" x="0.0" y="331" width="630" height="16"/>
<autoresizingMask key="autoresizingMask"/>
@ -145,6 +154,9 @@
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
<font key="font" metaFont="system"/>
</buttonCell>
<connections>
<action selector="openHomePage:" target="-2" id="Uq9-0c-1ee"/>
</connections>
</button>
<button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="p9q-1v-a7I">
<rect key="frame" x="159" y="3" width="151" height="25"/>
@ -152,6 +164,9 @@
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
<font key="font" metaFont="system"/>
</buttonCell>
<connections>
<action selector="selectInMainWindow:" target="-2" id="h26-3n-zQf"/>
</connections>
</button>
<button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="Iz6-Qf-MiC">
<rect key="frame" x="318" y="3" width="151" height="25"/>
@ -159,6 +174,9 @@
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
<font key="font" metaFont="system"/>
</buttonCell>
<connections>
<action selector="unsubscribe:" target="-2" id="oxE-od-vQS"/>
</connections>
</button>
</subviews>
<constraints>

View File

@ -0,0 +1,35 @@
//
// DinosaursWindowController.swift
// Evergreen
//
// Created by Brent Simmons on 11/12/17.
// Copyright © 2017 Ranchero Software. All rights reserved.
//
import Cocoa
class DinosaursWindowController: NSWindowController {
convenience init() {
self.init(windowNibName: NSNib.Name(rawValue: "DinosaursWindow"))
}
override func windowDidLoad() {
}
// MARK: - Actions
@IBAction func openHomePage(_ sender: Any?) {
}
@IBAction func selectInMainWindow(_ sender: Any?) {
}
@IBAction func unsubscribe(_ sender: Any?) {
}
}