From 14ec2eb2a58f4a27c3639a593a38bd5eb4dc236c Mon Sep 17 00:00:00 2001 From: Matt Baer Date: Thu, 3 Aug 2017 20:02:16 -0400 Subject: [PATCH] Support closing windows --- writeas/AppDelegate.swift | 4 ++++ writeas/Base.lproj/Main.storyboard | 6 ++++++ 2 files changed, 10 insertions(+) diff --git a/writeas/AppDelegate.swift b/writeas/AppDelegate.swift index 9b97019..1fba032 100644 --- a/writeas/AppDelegate.swift +++ b/writeas/AppDelegate.swift @@ -69,6 +69,10 @@ class AppDelegate: NSObject, NSApplicationDelegate { } } + @IBAction func fileClose(_ sender: Any) { + NSApplication.shared().mainWindow!.close() + } + @IBAction func toggleNightMode(_ sender: NSMenuItem) { let isOff = sender.state == NSOffState diff --git a/writeas/Base.lproj/Main.storyboard b/writeas/Base.lproj/Main.storyboard index b434b61..6d410be 100644 --- a/writeas/Base.lproj/Main.storyboard +++ b/writeas/Base.lproj/Main.storyboard @@ -83,6 +83,12 @@ + + + + + +