From e773df33e3d1de132f7c3bcdee352e280284966f Mon Sep 17 00:00:00 2001 From: Brent Simmons Date: Mon, 12 Feb 2018 13:31:43 -0800 Subject: [PATCH] Start work on saving main window state. --- Evergreen/AppDelegate.swift | 5 ++--- Evergreen/MainWindow/MainWindowController.swift | 7 +++++++ 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/Evergreen/AppDelegate.swift b/Evergreen/AppDelegate.swift index 2756f2dec..1e3062ac3 100644 --- a/Evergreen/AppDelegate.swift +++ b/Evergreen/AppDelegate.swift @@ -499,9 +499,8 @@ private extension AppDelegate { func saveState() { - if let inspectorWindowController = inspectorWindowController { - inspectorWindowController.saveState() - } + inspectorWindowController?.saveState() + mainWindowController?.saveState() } func updateSortMenuItems() { diff --git a/Evergreen/MainWindow/MainWindowController.swift b/Evergreen/MainWindow/MainWindowController.swift index 026f52c7a..46063dfaa 100644 --- a/Evergreen/MainWindow/MainWindowController.swift +++ b/Evergreen/MainWindow/MainWindowController.swift @@ -75,6 +75,13 @@ class MainWindowController : NSWindowController, NSUserInterfaceValidations { } } + func saveState() { + + // TODO: save width of split view and anything else that should be saved. + + + } + // MARK: Sidebar func selectedObjectsInSidebar() -> [AnyObject]? {