From 9891f32ca54b86209ff5444a96c65344a57f1a18 Mon Sep 17 00:00:00 2001 From: lukakerr Date: Thu, 29 Aug 2019 10:09:56 +1000 Subject: [PATCH] Add splash screen --- Pine.xcodeproj/project.pbxproj | 40 +++- .../xcshareddata/xcschemes/Pine.xcscheme | 24 +- Pine/AppDelegate.swift | 22 +- Pine/Controllers/DocumentController.swift | 7 + ...shScreenRecentDocumentViewController.swift | 31 +++ .../SplashScreenWindowController.swift | 179 ++++++++++++++ Pine/Models/Preferences/Preferences.swift | 2 +- .../SplashScreenRecentDocumentView.xib | 61 +++++ .../SplashScreenWindowController.xib | 218 ++++++++++++++++++ .../TulsiDocumentController.swift | 11 + Pods/Pods.xcodeproj/project.pbxproj | 4 +- 11 files changed, 573 insertions(+), 26 deletions(-) create mode 100644 Pine/Controllers/SplashScreen/SplashScreenRecentDocumentViewController.swift create mode 100755 Pine/Controllers/SplashScreen/SplashScreenWindowController.swift create mode 100755 Pine/Views/SplashScreen/SplashScreenRecentDocumentView.xib create mode 100644 Pine/Views/SplashScreen/SplashScreenWindowController.xib create mode 100755 Pine/Views/SplashScreen/TulsiDocumentController.swift diff --git a/Pine.xcodeproj/project.pbxproj b/Pine.xcodeproj/project.pbxproj index feda4b1..b182f56 100644 --- a/Pine.xcodeproj/project.pbxproj +++ b/Pine.xcodeproj/project.pbxproj @@ -7,7 +7,9 @@ objects = { /* Begin PBXBuildFile section */ - 008CD6E8A653CDDA656D692B /* Pods_Pine.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B66B7DAE689A6827E658233B /* Pods_Pine.framework */; }; + 03782B4223158A60008AABFC /* SplashScreenWindowController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 03782B3E23158A60008AABFC /* SplashScreenWindowController.xib */; }; + 03782B4323158A60008AABFC /* SplashScreenWindowController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 03782B3F23158A60008AABFC /* SplashScreenWindowController.swift */; }; + 03782B4423158A60008AABFC /* SplashScreenRecentDocumentView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 03782B4023158A60008AABFC /* SplashScreenRecentDocumentView.xib */; }; 8F34580B873BD2CCD033F53B /* Pods_Pine.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 300B3A71DC5543C53B684729 /* Pods_Pine.framework */; }; A104782520E7338800E0930A /* FileSystemItem.swift in Sources */ = {isa = PBXBuildFile; fileRef = A104782420E7338800E0930A /* FileSystemItem.swift */; }; A10B86DD2227BB3E000656DD /* PreferencesSplitViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = A10B86DC2227BB3E000656DD /* PreferencesSplitViewController.swift */; }; @@ -80,6 +82,7 @@ A1D7174622475B21003BE7BC /* MARKDOWN_REFERENCE.md in Resources */ = {isa = PBXBuildFile; fileRef = A1D7174322475B21003BE7BC /* MARKDOWN_REFERENCE.md */; }; A1E647DC20D1E9C000F32E55 /* PineSplitView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A1E647DB20D1E9C000F32E55 /* PineSplitView.swift */; }; A1F122DF20DE0D27007DFD1A /* FileSaver.swift in Sources */ = {isa = PBXBuildFile; fileRef = A1F122DE20DE0D27007DFD1A /* FileSaver.swift */; }; + A1F40E70231742C400BD98D2 /* SplashScreenRecentDocumentViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = A1F40E6F231742C400BD98D2 /* SplashScreenRecentDocumentViewController.swift */; }; A1F818B222499058006A4C10 /* GeneralStackView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A1F818B122499058006A4C10 /* GeneralStackView.swift */; }; A1FB7A9A2227DC5900DC2E0E /* UIStackView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A1FB7A992227DC5900DC2E0E /* UIStackView.swift */; }; A1FB7A9E2227DFCB00DC2E0E /* PreferencesStackView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A1FB7A9D2227DFCB00DC2E0E /* PreferencesStackView.swift */; }; @@ -107,6 +110,9 @@ /* End PBXContainerItemProxy section */ /* Begin PBXFileReference section */ + 03782B3E23158A60008AABFC /* SplashScreenWindowController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = SplashScreenWindowController.xib; sourceTree = ""; }; + 03782B3F23158A60008AABFC /* SplashScreenWindowController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SplashScreenWindowController.swift; sourceTree = ""; }; + 03782B4023158A60008AABFC /* SplashScreenRecentDocumentView.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = SplashScreenRecentDocumentView.xib; sourceTree = ""; }; 300B3A71DC5543C53B684729 /* Pods_Pine.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Pine.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 8DB191E8E2AB43CED7C8E01D /* Pods-Pine.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Pine.release.xcconfig"; path = "Pods/Target Support Files/Pods-Pine/Pods-Pine.release.xcconfig"; sourceTree = ""; }; A104782420E7338800E0930A /* FileSystemItem.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FileSystemItem.swift; sourceTree = ""; }; @@ -187,6 +193,7 @@ A1D7174722475B2A003BE7BC /* Plugins.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; path = Plugins.md; sourceTree = ""; }; A1E647DB20D1E9C000F32E55 /* PineSplitView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PineSplitView.swift; sourceTree = ""; }; A1F122DE20DE0D27007DFD1A /* FileSaver.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FileSaver.swift; sourceTree = ""; }; + A1F40E6F231742C400BD98D2 /* SplashScreenRecentDocumentViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SplashScreenRecentDocumentViewController.swift; sourceTree = ""; }; A1F818B122499058006A4C10 /* GeneralStackView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GeneralStackView.swift; sourceTree = ""; }; A1FB7A992227DC5900DC2E0E /* UIStackView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UIStackView.swift; sourceTree = ""; }; A1FB7A9D2227DFCB00DC2E0E /* PreferencesStackView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PreferencesStackView.swift; sourceTree = ""; }; @@ -206,7 +213,6 @@ buildActionMask = 2147483647; files = ( 8F34580B873BD2CCD033F53B /* Pods_Pine.framework in Frameworks */, - 008CD6E8A653CDDA656D692B /* Pods_Pine.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -227,6 +233,15 @@ /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ + 03782B4623158A65008AABFC /* SplashScreen */ = { + isa = PBXGroup; + children = ( + 03782B4023158A60008AABFC /* SplashScreenRecentDocumentView.xib */, + 03782B3E23158A60008AABFC /* SplashScreenWindowController.xib */, + ); + path = SplashScreen; + sourceTree = ""; + }; A10378522249CF2700E6F3C6 /* Core Text */ = { isa = PBXGroup; children = ( @@ -272,11 +287,12 @@ children = ( A1C65D81221179230053C422 /* DocumentController.swift */, A156AF822090606C0098BBDD /* MarkdownViewController.swift */, + A156AFAE209061D60098BBDD /* PineWindowController.swift */, A13C23FB20919672008557D0 /* PreviewViewController.swift */, A127E31D20DF0F8400E13795 /* SidebarViewController.swift */, - A156AFAE209061D60098BBDD /* PineWindowController.swift */, A10B86DB2227BB2E000656DD /* Preferences */, A1904EA92228A75A0004FB82 /* Reference */, + A1F40E6E231742A000BD98D2 /* SplashScreen */, ); path = Controllers; sourceTree = ""; @@ -313,6 +329,7 @@ A142C98320D673B0002ED94F /* Views */ = { isa = PBXGroup; children = ( + 03782B4623158A65008AABFC /* SplashScreen */, A13B2E8A22322CBD00F24A84 /* MarkdownTextView.swift */, A198047220DB64BA0066FDA6 /* MarkdownView.swift */, A1E647DB20D1E9C000F32E55 /* PineSplitView.swift */, @@ -489,6 +506,15 @@ path = WIki; sourceTree = ""; }; + A1F40E6E231742A000BD98D2 /* SplashScreen */ = { + isa = PBXGroup; + children = ( + 03782B3F23158A60008AABFC /* SplashScreenWindowController.swift */, + A1F40E6F231742C400BD98D2 /* SplashScreenRecentDocumentViewController.swift */, + ); + path = SplashScreen; + sourceTree = ""; + }; A1FB7AA32227F4E200DC2E0E /* Preferences */ = { isa = PBXGroup; children = ( @@ -589,7 +615,7 @@ isa = PBXProject; attributes = { LastSwiftUpdateCheck = 0930; - LastUpgradeCheck = 1020; + LastUpgradeCheck = 1100; ORGANIZATIONNAME = "Luka Kerr"; TargetAttributes = { A156AF7C2090606C0098BBDD = { @@ -642,10 +668,12 @@ buildActionMask = 2147483647; files = ( A1C4020C221F851B00E3DBCC /* Reference.html in Resources */, + 03782B4423158A60008AABFC /* SplashScreenRecentDocumentView.xib in Resources */, A165D1F6223DB66500A00821 /* autocomplete in Resources */, A189EA742091E4F300DB0559 /* Markdown.css in Resources */, A14BF5942241C4E600ED250D /* Credits.rtf in Resources */, A124783C2233356400CA7A67 /* File.icns in Resources */, + 03782B4223158A60008AABFC /* SplashScreenWindowController.xib in Resources */, A1D7174622475B21003BE7BC /* MARKDOWN_REFERENCE.md in Resources */, A156AF872090606C0098BBDD /* Assets.xcassets in Resources */, A1D7174522475B21003BE7BC /* RELEASE.md in Resources */, @@ -738,6 +766,7 @@ A1BC8B08224214AF00623917 /* Character.swift in Sources */, A1BC8B09224214AF00623917 /* URL.swift in Sources */, A127E32020DF13FA00E13795 /* OpenDocuments.swift in Sources */, + A1F40E70231742C400BD98D2 /* SplashScreenRecentDocumentViewController.swift in Sources */, A1904E9E22288AB80004FB82 /* DocumentStackView.swift in Sources */, A1FB7A9E2227DFCB00DC2E0E /* PreferencesStackView.swift in Sources */, A156AFB120908ECE0098BBDD /* Theme.swift in Sources */, @@ -751,6 +780,7 @@ A10B86DD2227BB3E000656DD /* PreferencesSplitViewController.swift in Sources */, A1FB7AA02227EE9300DC2E0E /* PreferencesRoundedButton.swift in Sources */, A18A040820958C8B006F6B99 /* Preferences.swift in Sources */, + 03782B4323158A60008AABFC /* SplashScreenWindowController.swift in Sources */, A1F122DF20DE0D27007DFD1A /* FileSaver.swift in Sources */, A198047320DB64BA0066FDA6 /* MarkdownView.swift in Sources */, A13C23F8209153E1008557D0 /* ReferenceWindowController.swift in Sources */, @@ -952,6 +982,7 @@ CODE_SIGN_STYLE = Automatic; COMBINE_HIDPI_IMAGES = YES; DEVELOPMENT_TEAM = QY544RDL2W; + ENABLE_HARDENED_RUNTIME = YES; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", "$(PROJECT_DIR)/Pine", @@ -979,6 +1010,7 @@ CODE_SIGN_STYLE = Automatic; COMBINE_HIDPI_IMAGES = YES; DEVELOPMENT_TEAM = QY544RDL2W; + ENABLE_HARDENED_RUNTIME = YES; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", "$(PROJECT_DIR)/Pine", diff --git a/Pine.xcodeproj/xcshareddata/xcschemes/Pine.xcscheme b/Pine.xcodeproj/xcshareddata/xcschemes/Pine.xcscheme index 7216f2f..daafd36 100644 --- a/Pine.xcodeproj/xcshareddata/xcschemes/Pine.xcscheme +++ b/Pine.xcodeproj/xcshareddata/xcschemes/Pine.xcscheme @@ -1,6 +1,6 @@ + + + + @@ -49,17 +58,6 @@ - - - - - - - - Bool { + if preferences[.openNewDocumentOnStartup] { + return false + } else { + splashScreenWindowController = SplashScreenWindowController() + splashScreenWindowController.showWindow(self) + + return true + } + } + func applicationShouldOpenUntitledFile(_ sender: NSApplication) -> Bool { - return preferences[.openNewDocumentOnStartup] + return true } func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool { @@ -62,7 +75,7 @@ class AppDelegate: NSObject, NSApplicationDelegate { guard dialog.runModal() == .OK, let result = dialog.url - else { return } + else { return } openFiles(files: [result]) } @@ -75,7 +88,7 @@ class AppDelegate: NSObject, NSApplicationDelegate { guard FileManager.default.fileExists( atPath: file.path, isDirectory: &isDirectory - ) else { continue } + ) else { continue } DispatchQueue.global(qos: .userInitiated).async { let parent = FileSystemItem.createParents(url: file) @@ -97,8 +110,7 @@ class AppDelegate: NSObject, NSApplicationDelegate { display: true, completionHandler: { _, _, _ in Utils.getCurrentMainWindowController()?.window?.makeKeyAndOrderFront(nil) - } - ) + }) } } } diff --git a/Pine/Controllers/DocumentController.swift b/Pine/Controllers/DocumentController.swift index 0fd0b63..3284017 100644 --- a/Pine/Controllers/DocumentController.swift +++ b/Pine/Controllers/DocumentController.swift @@ -54,6 +54,13 @@ class DocumentController: NSDocumentController { displayDocument: true, completionHandler: completionHandler ) + + // Ensure after opening a document that the splash screen window is closed + for window in NSApp.windows { + if let splashScreenWindow = window.windowController as? SplashScreenWindowController { + splashScreenWindow.close() + } + } } /// Replace the currently opened document (if it exists) with the provided URL diff --git a/Pine/Controllers/SplashScreen/SplashScreenRecentDocumentViewController.swift b/Pine/Controllers/SplashScreen/SplashScreenRecentDocumentViewController.swift new file mode 100644 index 0000000..6bfef9f --- /dev/null +++ b/Pine/Controllers/SplashScreen/SplashScreenRecentDocumentViewController.swift @@ -0,0 +1,31 @@ +// +// SplashScreenRecentDocumentViewController.swift +// Pine +// +// Created by Luka Kerr on 29/8/19. +// Copyright © 2019 Luka Kerr. All rights reserved. +// + +import Cocoa + +/// View controller for the "recent document" rows in the tableview in the splash screen. +final class SplashScreenRecentDocumentViewController: NSViewController { + + var url: URL? + + @IBOutlet weak var icon: NSImageView! + @IBOutlet weak var filename: NSTextField! + @IBOutlet weak var path: NSTextField! + + override var nibName: NSNib.Name? { + return NSNib.Name( "SplashScreenRecentDocumentView") + } + + override func viewDidLoad() { + guard let url = url else { return } + icon.image = NSImage(named: "File") + filename.stringValue = (url.lastPathComponent as NSString).deletingPathExtension + path.stringValue = ((url.path as NSString).deletingLastPathComponent as NSString).abbreviatingWithTildeInPath + } + +} diff --git a/Pine/Controllers/SplashScreen/SplashScreenWindowController.swift b/Pine/Controllers/SplashScreen/SplashScreenWindowController.swift new file mode 100755 index 0000000..e340a33 --- /dev/null +++ b/Pine/Controllers/SplashScreen/SplashScreenWindowController.swift @@ -0,0 +1,179 @@ +// +// SplashScreenWindowController.swift +// Pine +// +// Created by Luka Kerr on 28/8/19. +// Copyright © 2019 Luka Kerr. All rights reserved. +// + +import Cocoa + +class SplashScreenWindowController: NSWindowController { + + @IBOutlet var recentDocumentsArrayController: NSArrayController! + @IBOutlet weak var splashScreenImageView: NSImageView! + @IBOutlet weak var applicationName: NSTextField! + + @objc dynamic var applicationVersion: String = "" + @objc dynamic var recentDocumentViewControllers = [SplashScreenRecentDocumentViewController]() + + override var windowNibName: NSNib.Name? { + return "SplashScreenWindowController" + } + + override func windowDidLoad() { + super.windowDidLoad() + + window?.titleVisibility = .hidden + window?.titlebarAppearsTransparent = true + window?.isMovableByWindowBackground = true + + splashScreenImageView.image = NSApplication.shared.applicationIconImage + + let dictionary = Bundle.main.infoDictionary! + let name = dictionary["CFBundleName"] as? String + let version = dictionary["CFBundleShortVersionString"] as? String + + applicationName.stringValue = name ?? "" + + if let cfBundleVersion = version { + applicationVersion = cfBundleVersion + } + + recentDocumentViewControllers = getRecentDocumentViewControllers() + } + + // MARK: - IBActions + + @IBAction func createNewDocument(_ sender: NSButton) { + let documentController = NSDocumentController.shared + + do { + try documentController.openUntitledDocumentAndDisplay(true) + self.close() + } catch let e as NSError { + let alert = NSAlert() + alert.messageText = e.localizedFailureReason ?? e.localizedDescription + alert.informativeText = e.localizedRecoverySuggestion ?? "" + alert.runModal() + } + } + + @IBAction func openSampleProject(_ sender: Any) { + preloadDBData() + } + + @IBAction func didDoubleClickRecentDocument(_ sender: NSTableView) { + let clickedRow = sender.clickedRow + guard clickedRow >= 0 else { return } + let documentController = NSDocumentController.shared + let viewController = recentDocumentViewControllers[clickedRow] + + guard let url = viewController.url else { return } + + let parent = FileSystemItem.createParents(url: url) + let newItem = FileSystemItem(path: url.absoluteString, parent: parent) + openDocuments.addDocument(newItem) + + documentController.openDocument(withContentsOf: url, display: true) { + (_: NSDocument?, _: Bool, _: Error?) in + self.close() + } + } + + func preloadDBData() { + let pathMD = Bundle.main.path(forResource: "MARKDOWN_REFERENCE", ofType: "md") + + let urlFrom = URL(fileURLWithPath: pathMD!) + let urlTo = URL(fileURLWithPath: NSPersistentContainer.defaultDirectoryURL().relativePath + "/MARKDOWN_REFERENCE.md") + + if FileManager.default.fileExists(atPath: NSPersistentContainer.defaultDirectoryURL().relativePath + "/MARKDOWN_REFERENCE.md") { + do { + try FileManager.default.removeItem(at: urlTo) + } catch {} + } + + do { + try FileManager.default.copyItem(at: urlFrom, to: urlTo) + } catch {} + + let parent = FileSystemItem.createParents(url: urlTo) + let newItem = FileSystemItem(path: urlTo.absoluteString, parent: parent) + openDocuments.addDocument(newItem) + + let documentController = NSDocumentController.shared + documentController.openDocument(withContentsOf: urlTo, display: true) { + (_: NSDocument?, _: Bool, _: Error?) in + self.close() + } + } + + func getBundleExtension() -> String { + let documentTypes = Bundle.main.infoDictionary!["CFBundleDocumentTypes"] as! [[String: AnyObject]] + let extensions = documentTypes.first!["CFBundleTypeExtensions"] as! [String] + return extensions.first! + } + + // MARK: - Private methods + + private func getRecentDocumentViewControllers() -> [SplashScreenRecentDocumentViewController] { + let projectExtension = getBundleExtension() + let documentController = NSDocumentController.shared + + var recentDocumentViewControllers = [SplashScreenRecentDocumentViewController]() + var recentDocumentURLs = Set() + let fileManager = FileManager.default + + for url in documentController.recentDocumentURLs { + let path = url.path + guard path.contains(projectExtension) else { continue } + if !fileManager.isReadableFile(atPath: path) { + continue + } + + let components: [String] = url.pathComponents + var i = components.count - 1 + repeat { + if (components[i] as NSString).pathExtension == projectExtension { + break + } + + i -= 1 + } while i > 0 + + let projectURL: URL + + if i == components.count - 1 { + projectURL = url + } else { + let projectComponents = [String](components.prefix(i + 1)) + projectURL = NSURL.fileURL(withPathComponents: projectComponents)! as URL + } + + if recentDocumentURLs.contains(projectURL) { + continue + } + + recentDocumentURLs.insert(projectURL) + + let viewController = SplashScreenRecentDocumentViewController() + viewController.url = projectURL + recentDocumentViewControllers.append(viewController) + } + + return recentDocumentViewControllers + } + +} + +extension SplashScreenWindowController: NSTableViewDelegate, NSTableViewDataSource { + + func tableView(_ tableView: NSTableView, viewFor tableColumn: NSTableColumn?, row: Int) -> NSView? { + return recentDocumentViewControllers[row].view + } + + func numberOfRows(in tableView: NSTableView) -> Int { + return recentDocumentViewControllers.count + } + +} diff --git a/Pine/Models/Preferences/Preferences.swift b/Pine/Models/Preferences/Preferences.swift index 8625746..e65312e 100644 --- a/Pine/Models/Preferences/Preferences.swift +++ b/Pine/Models/Preferences/Preferences.swift @@ -26,7 +26,7 @@ extension PreferenceKeys { static let writingDirection = PreferenceKey("writingDirection", defaultValue: NSWritingDirection.natural.rawValue) // AppDelegate options - static let openNewDocumentOnStartup = PreferenceKey("openNewDocumentOnStartup", defaultValue: true) + static let openNewDocumentOnStartup = PreferenceKey("openNewDocumentOnStartup", defaultValue: false) static let terminateAfterLastWindowClosed = PreferenceKey("terminateAfterLastWindowClosed", defaultValue: false) // Font options diff --git a/Pine/Views/SplashScreen/SplashScreenRecentDocumentView.xib b/Pine/Views/SplashScreen/SplashScreenRecentDocumentView.xib new file mode 100755 index 0000000..461011e --- /dev/null +++ b/Pine/Views/SplashScreen/SplashScreenRecentDocumentView.xib @@ -0,0 +1,61 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Pine/Views/SplashScreen/SplashScreenWindowController.xib b/Pine/Views/SplashScreen/SplashScreenWindowController.xib new file mode 100644 index 0000000..598f1e5 --- /dev/null +++ b/Pine/Views/SplashScreen/SplashScreenWindowController.xib @@ -0,0 +1,218 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Version %{value1}@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Pine/Views/SplashScreen/TulsiDocumentController.swift b/Pine/Views/SplashScreen/TulsiDocumentController.swift new file mode 100755 index 0000000..51dd65a --- /dev/null +++ b/Pine/Views/SplashScreen/TulsiDocumentController.swift @@ -0,0 +1,11 @@ +import AppKit + +// Document controller for customization of the open panel. +final class SplashScreenDocumentController: NSDocumentController { + + override func runModalOpenPanel(_ openPanel: NSOpenPanel, forTypes types: [String]?) -> Int { + openPanel.message = "OpenProject" + return super.runModalOpenPanel(openPanel, forTypes: types) + } + +} diff --git a/Pods/Pods.xcodeproj/project.pbxproj b/Pods/Pods.xcodeproj/project.pbxproj index d40ed59..b32f466 100644 --- a/Pods/Pods.xcodeproj/project.pbxproj +++ b/Pods/Pods.xcodeproj/project.pbxproj @@ -915,11 +915,11 @@ }; buildConfigurationList = 4821239608C13582E20E6DA73FD5F1F9 /* Build configuration list for PBXProject "Pods" */; compatibilityVersion = "Xcode 3.2"; - developmentRegion = English; + developmentRegion = en; hasScannedForEncodings = 0; knownRegions = ( - English, en, + Base, ); mainGroup = CF1408CF629C7361332E53B88F7BD30C; productRefGroup = EBDB5CCA652D07BA666BC5A5BEAE2202 /* Products */;