Merge branch 'master' of https://github.com/brentsimmons/Evergreen
This commit is contained in:
commit
df6b784015
@ -24,6 +24,7 @@ class AppDelegate: NSObject, NSApplicationDelegate, NSUserInterfaceValidations {
|
||||
let windowControllers = NSMutableArray()
|
||||
var preferencesWindowController: NSWindowController?
|
||||
var mainWindowController: NSWindowController?
|
||||
var readerWindows = [NSWindowController]()
|
||||
var feedListWindowController: NSWindowController?
|
||||
var dinosaursWindowController: DinosaursWindowController?
|
||||
var addFeedController: AddFeedController?
|
||||
@ -131,7 +132,7 @@ class AppDelegate: NSObject, NSApplicationDelegate, NSUserInterfaceValidations {
|
||||
func createAndShowMainWindow() {
|
||||
|
||||
if mainWindowController == nil {
|
||||
mainWindowController = windowControllerWithName("MainWindow")
|
||||
mainWindowController = createReaderWindow()
|
||||
}
|
||||
|
||||
mainWindowController!.showWindow(self)
|
||||
@ -162,6 +163,13 @@ class AppDelegate: NSObject, NSApplicationDelegate, NSUserInterfaceValidations {
|
||||
|
||||
// MARK: - Actions
|
||||
|
||||
@IBAction func newReaderWindow(_ sender: Any?) {
|
||||
|
||||
let readerWindow = createReaderWindow()
|
||||
readerWindows += [readerWindow]
|
||||
readerWindow.showWindow(self)
|
||||
}
|
||||
|
||||
@IBAction func showPreferences(_ sender: AnyObject) {
|
||||
|
||||
if preferencesWindowController == nil {
|
||||
@ -304,4 +312,10 @@ class AppDelegate: NSObject, NSApplicationDelegate, NSUserInterfaceValidations {
|
||||
}
|
||||
}
|
||||
|
||||
private extension AppDelegate {
|
||||
|
||||
func createReaderWindow() -> NSWindowController {
|
||||
|
||||
return windowControllerWithName("MainWindow")
|
||||
}
|
||||
}
|
||||
|
@ -73,12 +73,17 @@
|
||||
<action selector="showAddFeedWindow:" target="Ady-hI-5gd" id="LkT-kx-aCR"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="New Folder" keyEquivalent="n" id="wkh-LX-Xp1">
|
||||
<modifierMask key="keyEquivalentModifierMask" option="YES" command="YES"/>
|
||||
<menuItem title="New Folder" keyEquivalent="N" id="wkh-LX-Xp1">
|
||||
<connections>
|
||||
<action selector="showAddFolderWindow:" target="Ady-hI-5gd" id="GIi-wc-uYk"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="New Window" keyEquivalent="n" id="J9a-dk-nAT">
|
||||
<modifierMask key="keyEquivalentModifierMask" option="YES" command="YES"/>
|
||||
<connections>
|
||||
<action selector="newReaderWindow:" target="Ady-hI-5gd" id="XtC-K9-1Np"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem isSeparatorItem="YES" id="m54-Is-iLE"/>
|
||||
<menuItem title="Refresh" keyEquivalent="r" id="Veh-SV-KWy">
|
||||
<connections>
|
||||
|
Loading…
x
Reference in New Issue
Block a user