Support closing windows
This commit is contained in:
parent
27c398ec40
commit
14ec2eb2a5
@ -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
|
||||
|
||||
|
@ -83,6 +83,12 @@
|
||||
</menu>
|
||||
</menuItem>
|
||||
<menuItem isSeparatorItem="YES" id="m54-Is-iLE"/>
|
||||
<menuItem title="Close" keyEquivalent="w" id="Jqh-E2-bP0">
|
||||
<connections>
|
||||
<action selector="fileClose:" target="Voe-Tx-rLC" id="wwH-Vr-YXS"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem isSeparatorItem="YES" id="qlM-x5-Aiq"/>
|
||||
<menuItem title="Save" keyEquivalent="s" id="pxx-59-PXV">
|
||||
<connections>
|
||||
<action selector="saveDocument:" target="Voe-Tx-rLC" id="6F3-Jk-bXC"/>
|
||||
|
Loading…
Reference in New Issue
Block a user