From 3ff8b7436dfdd838b0125e15648afcd8e7034ab9 Mon Sep 17 00:00:00 2001 From: Charlie Scheer Date: Fri, 12 Apr 2024 15:41:41 -0600 Subject: [PATCH] Removed note window controller and note windows mananger --- Simplenote.xcodeproj/project.pbxproj | 12 ------------ Simplenote/NoteWindowController.swift | 25 ------------------------- Simplenote/NoteWindowsManager.swift | 15 --------------- 3 files changed, 52 deletions(-) delete mode 100644 Simplenote/NoteWindowController.swift delete mode 100644 Simplenote/NoteWindowsManager.swift diff --git a/Simplenote.xcodeproj/project.pbxproj b/Simplenote.xcodeproj/project.pbxproj index 41ac129be..bc59c637a 100644 --- a/Simplenote.xcodeproj/project.pbxproj +++ b/Simplenote.xcodeproj/project.pbxproj @@ -479,12 +479,8 @@ BAA4854A25D5E22000F3BDB9 /* SearchQuery+Simplenote.swift in Sources */ = {isa = PBXBuildFile; fileRef = BAA4854925D5E22000F3BDB9 /* SearchQuery+Simplenote.swift */; }; BAD4ECC026E6FC0A00881CC4 /* markdown-light.css in Resources */ = {isa = PBXBuildFile; fileRef = BAF8D5DB26AE3BE800CA9383 /* markdown-light.css */; }; BAE66CAA26AF647500398FF3 /* Remote.swift in Sources */ = {isa = PBXBuildFile; fileRef = BA938CEB26ACFF4A00BE5A1D /* Remote.swift */; }; - BAF1B0BF2BC9B1A800B55F73 /* NoteWindowController.swift in Sources */ = {isa = PBXBuildFile; fileRef = BAF1B0BE2BC9B1A800B55F73 /* NoteWindowController.swift */; }; - BAF1B0C02BC9B1A800B55F73 /* NoteWindowController.swift in Sources */ = {isa = PBXBuildFile; fileRef = BAF1B0BE2BC9B1A800B55F73 /* NoteWindowController.swift */; }; BAF1B0C22BC9B1C500B55F73 /* NoteWindow.swift in Sources */ = {isa = PBXBuildFile; fileRef = BAF1B0C12BC9B1C500B55F73 /* NoteWindow.swift */; }; BAF1B0C32BC9B1C500B55F73 /* NoteWindow.swift in Sources */ = {isa = PBXBuildFile; fileRef = BAF1B0C12BC9B1C500B55F73 /* NoteWindow.swift */; }; - BAF1B0C52BC9B25600B55F73 /* NoteWindowsManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = BAF1B0C42BC9B25600B55F73 /* NoteWindowsManager.swift */; }; - BAF1B0C62BC9B25600B55F73 /* NoteWindowsManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = BAF1B0C42BC9B25600B55F73 /* NoteWindowsManager.swift */; }; BAF8D5DC26AE3BE800CA9383 /* markdown-light.css in Resources */ = {isa = PBXBuildFile; fileRef = BAF8D5DB26AE3BE800CA9383 /* markdown-light.css */; }; BAFB545026CCA7F1006E037C /* NSProgressIndicator+Simplenote.swift in Sources */ = {isa = PBXBuildFile; fileRef = BAFB544F26CCA7F1006E037C /* NSProgressIndicator+Simplenote.swift */; }; BAFB545126CCA7F1006E037C /* NSProgressIndicator+Simplenote.swift in Sources */ = {isa = PBXBuildFile; fileRef = BAFB544F26CCA7F1006E037C /* NSProgressIndicator+Simplenote.swift */; }; @@ -882,9 +878,7 @@ BAA0A88126B9F8970006260E /* AccountDeletionController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AccountDeletionController.swift; sourceTree = ""; }; BAA0A88626B9F8B40006260E /* Date+Simplenote.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "Date+Simplenote.swift"; sourceTree = ""; }; BAA4854925D5E22000F3BDB9 /* SearchQuery+Simplenote.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "SearchQuery+Simplenote.swift"; sourceTree = ""; }; - BAF1B0BE2BC9B1A800B55F73 /* NoteWindowController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NoteWindowController.swift; sourceTree = ""; }; BAF1B0C12BC9B1C500B55F73 /* NoteWindow.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NoteWindow.swift; sourceTree = ""; }; - BAF1B0C42BC9B25600B55F73 /* NoteWindowsManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NoteWindowsManager.swift; sourceTree = ""; }; BAF8D5DB26AE3BE800CA9383 /* markdown-light.css */ = {isa = PBXFileReference; lastKnownFileType = text.css; path = "markdown-light.css"; sourceTree = ""; }; BAFB544F26CCA7F1006E037C /* NSProgressIndicator+Simplenote.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "NSProgressIndicator+Simplenote.swift"; sourceTree = ""; }; F998F3EA22853C29008C2B59 /* CrashLogging.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CrashLogging.swift; sourceTree = ""; }; @@ -1450,9 +1444,7 @@ children = ( B58BBD292523D4CA0025135F /* Window.swift */, B58BBD3C2523FF160025135F /* PopoverWindow.swift */, - BAF1B0BE2BC9B1A800B55F73 /* NoteWindowController.swift */, BAF1B0C12BC9B1C500B55F73 /* NoteWindow.swift */, - BAF1B0C42BC9B25600B55F73 /* NoteWindowsManager.swift */, ); name = Windows; sourceTree = ""; @@ -2164,7 +2156,6 @@ B5F807CC2481982B0048CBD7 /* Note+Simplenote.swift in Sources */, B5132FA823C4B9760065DD80 /* NSTextStorage+Simplenote.swift in Sources */, A6BF918F25E4EB44003C2018 /* FileStorage.swift in Sources */, - BAF1B0C52BC9B25600B55F73 /* NoteWindowsManager.swift in Sources */, 714BA66E14D4AE6300A6CCC1 /* DateTransformer.m in Sources */, B59EA98124AA5EFA008ABE4B /* NoteMetrics.swift in Sources */, B5EDF338258A8F1B0066D91D /* TagListFilter.swift in Sources */, @@ -2288,7 +2279,6 @@ A667305425C9751B00090DE3 /* SearchMapView.swift in Sources */, B59E812F1877C802005ADDCF /* JSONKit+Simplenote.m in Sources */, B5F04FD621596551004B1AA0 /* PrivacyViewController.swift in Sources */, - BAF1B0BF2BC9B1A800B55F73 /* NoteWindowController.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -2359,7 +2349,6 @@ 375D294321E033D1007AB25A /* html5_blocks.c in Sources */, B51AFE7725D36CDD00A196DF /* NSFont+Simplenote.swift in Sources */, 375D293D21E033D1007AB25A /* hash.c in Sources */, - BAF1B0C62BC9B25600B55F73 /* NoteWindowsManager.swift in Sources */, B574CA74242D552100F8D02F /* TextViewInputHandler.swift in Sources */, B5F807CD2481982B0048CBD7 /* Note+Simplenote.swift in Sources */, A6C1E21525E010140076ADF7 /* SPApplication.swift in Sources */, @@ -2483,7 +2472,6 @@ B574015425B783500058960E /* EmailVerification.swift in Sources */, B5BD016B1897552500753208 /* JSONKit+Simplenote.m in Sources */, B5F04FD721596551004B1AA0 /* PrivacyViewController.swift in Sources */, - BAF1B0C02BC9B1A800B55F73 /* NoteWindowController.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; diff --git a/Simplenote/NoteWindowController.swift b/Simplenote/NoteWindowController.swift deleted file mode 100644 index b7b5847ac..000000000 --- a/Simplenote/NoteWindowController.swift +++ /dev/null @@ -1,25 +0,0 @@ -// -// NoteWindowController.swift -// Simplenote -// -// Created by Charlie Scheer on 4/12/24. -// Copyright © 2024 Simperium. All rights reserved. -// - -import Foundation - -class NoteWindowController: NSWindowController { - - init() { - super.init(window: NoteWindow()) - } - - required init?(coder: NSCoder) { - fatalError("init(coder:) has not been implemented") - } - - func show(_ note: Note) { - (window as? NoteWindow)?.show(note) - showWindow(window) - } -} diff --git a/Simplenote/NoteWindowsManager.swift b/Simplenote/NoteWindowsManager.swift deleted file mode 100644 index 5e8a2974f..000000000 --- a/Simplenote/NoteWindowsManager.swift +++ /dev/null @@ -1,15 +0,0 @@ -// -// NoteWindowsManager.swift -// Simplenote -// -// Created by Charlie Scheer on 4/12/24. -// Copyright © 2024 Simperium. All rights reserved. -// - -import Foundation - -// A wrapper class to hold onto instances of NSWindowController for popout note editors -@objcMembers -class NoteWindowsManager: NSObject { - var windowControllers: [NSWindowController] = [] -}