From 85ff386f4b771e9836d3a47d527686e5c0c21ad3 Mon Sep 17 00:00:00 2001 From: Brent Simmons Date: Fri, 26 May 2017 13:10:30 -0700 Subject: [PATCH] Add AppConstants. --- Evergreen.xcodeproj/project.pbxproj | 8 ++++++-- Evergreen/AppConstants.swift | 27 +++++++++++++++++++++++++++ 2 files changed, 33 insertions(+), 2 deletions(-) create mode 100644 Evergreen/AppConstants.swift diff --git a/Evergreen.xcodeproj/project.pbxproj b/Evergreen.xcodeproj/project.pbxproj index 5522d8573..fc50357b3 100644 --- a/Evergreen.xcodeproj/project.pbxproj +++ b/Evergreen.xcodeproj/project.pbxproj @@ -7,6 +7,7 @@ objects = { /* Begin PBXBuildFile section */ + 842E45CE1ED8C308000A8B52 /* AppConstants.swift in Sources */ = {isa = PBXBuildFile; fileRef = 842E45CD1ED8C308000A8B52 /* AppConstants.swift */; }; 8471A2C41ED4CEBF008F099E /* DataModel.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8471A2B71ED4CEAD008F099E /* DataModel.framework */; }; 8471A2C51ED4CEBF008F099E /* DataModel.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 8471A2B71ED4CEAD008F099E /* DataModel.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 8471A2F51ED4D062008F099E /* LocalAccount.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8471A2F21ED4D04D008F099E /* LocalAccount.framework */; }; @@ -299,6 +300,7 @@ /* End PBXCopyFilesBuildPhase section */ /* Begin PBXFileReference section */ + 842E45CD1ED8C308000A8B52 /* AppConstants.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = AppConstants.swift; path = Evergreen/AppConstants.swift; sourceTree = ""; }; 8471A2B21ED4CEAD008F099E /* DataModel.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = DataModel.xcodeproj; path = Frameworks/DataModel/DataModel.xcodeproj; sourceTree = ""; }; 8471A2EC1ED4D04D008F099E /* LocalAccount.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = LocalAccount.xcodeproj; path = Frameworks/LocalAccount/LocalAccount.xcodeproj; sourceTree = ""; }; 849C64601ED37A5D003D8FC0 /* Evergreen.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Evergreen.app; sourceTree = BUILT_PRODUCTS_DIR; }; @@ -368,10 +370,11 @@ 849C64571ED37A5D003D8FC0 = { isa = PBXGroup; children = ( - 849C64631ED37A5D003D8FC0 /* AppDelegate.swift */, - 849C64651ED37A5D003D8FC0 /* ViewController.swift */, 849C64671ED37A5D003D8FC0 /* Assets.xcassets */, 849C64691ED37A5D003D8FC0 /* Main.storyboard */, + 842E45CD1ED8C308000A8B52 /* AppConstants.swift */, + 849C64631ED37A5D003D8FC0 /* AppDelegate.swift */, + 849C64651ED37A5D003D8FC0 /* ViewController.swift */, 849C646C1ED37A5D003D8FC0 /* Info.plist */, 849C64741ED37A5D003D8FC0 /* EvergreenTests */, 849C64611ED37A5D003D8FC0 /* Products */, @@ -804,6 +807,7 @@ buildActionMask = 2147483647; files = ( 849C64661ED37A5D003D8FC0 /* ViewController.swift in Sources */, + 842E45CE1ED8C308000A8B52 /* AppConstants.swift in Sources */, 849C64641ED37A5D003D8FC0 /* AppDelegate.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; diff --git a/Evergreen/AppConstants.swift b/Evergreen/AppConstants.swift new file mode 100644 index 000000000..4009e1daa --- /dev/null +++ b/Evergreen/AppConstants.swift @@ -0,0 +1,27 @@ +// +// AppConstants.swift +// Rainier +// +// Created by Brent Simmons on 8/30/15. +// Copyright © 2015 Ranchero Software, LLC. All rights reserved. +// + +import Foundation + +extension Notification.Name { + + static let SidebarSelectionDidChange = Notification.Name("SidebarSelectionDidChangeNotification") + static let TimelineSelectionDidChange = Notification.Name("TimelineSelectionDidChangeNotification") + + static let AppNavigationKeyPressed = Notification.Name("AppNavigationKeyPressedNotification") +} + +let viewKey = "view" +let nodeKey = "node" +let objectsKey = "objects" +let articleKey = "article" + +let articlesKey = "articles" +let articleStatusKey = "statusKey" + +let appNavigationKey = "keyKey"