Create windowAutosaveName just once.
This commit is contained in:
parent
4d77dbfd36
commit
119a03e891
@ -669,9 +669,9 @@
|
||||
849C64671ED37A5D003D8FC0 /* Assets.xcassets */,
|
||||
849C64691ED37A5D003D8FC0 /* Main.storyboard */,
|
||||
849C64631ED37A5D003D8FC0 /* AppDelegate.swift */,
|
||||
84DAEE311F870B390058304B /* DockBadge.swift */,
|
||||
84E46C7C1F75EF7B005ECFB3 /* AppDefaults.swift */,
|
||||
842E45CD1ED8C308000A8B52 /* AppNotifications.swift */,
|
||||
84DAEE311F870B390058304B /* DockBadge.swift */,
|
||||
842E45DC1ED8C54B000A8B52 /* Browser.swift */,
|
||||
842E45E11ED8C681000A8B52 /* MainWindow */,
|
||||
842E45E01ED8C587000A8B52 /* Preferences */,
|
||||
|
@ -15,12 +15,14 @@ class MainWindowController : NSWindowController, NSUserInterfaceValidations {
|
||||
|
||||
// MARK: NSWindowController
|
||||
|
||||
private let windowAutosaveName = NSWindow.FrameAutosaveName(rawValue: kWindowFrameKey)
|
||||
|
||||
override func windowDidLoad() {
|
||||
|
||||
super.windowDidLoad()
|
||||
|
||||
// window?.titleVisibility = .hidden
|
||||
window?.setFrameUsingName(NSWindow.FrameAutosaveName(rawValue: kWindowFrameKey), force: true)
|
||||
window?.setFrameUsingName(windowAutosaveName, force: true)
|
||||
|
||||
detailSplitViewItem?.minimumThickness = 384
|
||||
|
||||
@ -35,7 +37,7 @@ class MainWindowController : NSWindowController, NSUserInterfaceValidations {
|
||||
|
||||
@objc func applicationWillTerminate(_ note: Notification) {
|
||||
|
||||
window?.saveFrame(usingName: NSWindow.FrameAutosaveName(rawValue: kWindowFrameKey))
|
||||
window?.saveFrame(usingName: windowAutosaveName)
|
||||
}
|
||||
|
||||
@objc func appNavigationKeyPressed(_ note: Notification) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user