Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 41 additions & 4 deletions CodeEdit.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
043C321427E31FF6006AE443 /* CodeEditDocumentController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 043C321327E31FF6006AE443 /* CodeEditDocumentController.swift */; };
043C321627E3201F006AE443 /* WorkspaceDocument.swift in Sources */ = {isa = PBXBuildFile; fileRef = 043C321527E3201F006AE443 /* WorkspaceDocument.swift */; };
043C321A27E32295006AE443 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 043C321927E32295006AE443 /* MainMenu.xib */; };
04540D5B27DD08C300E91B77 /* SettingsView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04F2BF0E27DBB28E0024EAB1 /* SettingsView.swift */; };
04540D5C27DD08C300E91B77 /* GeneralSettingsView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04F2BF1127DBB3C10024EAB1 /* GeneralSettingsView.swift */; };
04540D5E27DD08C300E91B77 /* WorkspaceView.swift in Sources */ = {isa = PBXBuildFile; fileRef = B658FB3127DA9E0F00EA4DBD /* WorkspaceView.swift */; };
04660F6427E3ACAF00477777 /* Appearances.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04660F6327E3ACAF00477777 /* Appearances.swift */; };
Expand All @@ -36,6 +35,11 @@
5C403B8F27E20F8000788241 /* WorkspaceClient in Frameworks */ = {isa = PBXBuildFile; productRef = 5C403B8E27E20F8000788241 /* WorkspaceClient */; };
5CF38A5E27E48E6C0096A0F7 /* CodeFile in Frameworks */ = {isa = PBXBuildFile; productRef = 5CF38A5D27E48E6C0096A0F7 /* CodeFile */; };
5CFA753B27E896B60002F01B /* GitClient in Frameworks */ = {isa = PBXBuildFile; productRef = 5CFA753A27E896B60002F01B /* GitClient */; };
903D6F3827E9E8C300EC4943 /* Preferences in Frameworks */ = {isa = PBXBuildFile; productRef = 903D6F3727E9E8C300EC4943 /* Preferences */; };
903D6F3A27E9E8F900EC4943 /* PaneIdentifier.swift in Sources */ = {isa = PBXBuildFile; fileRef = 903D6F3927E9E8F900EC4943 /* PaneIdentifier.swift */; };
90626F8327E9EDA1008926FE /* ThemeSettingsView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 90626F8227E9EDA1008926FE /* ThemeSettingsView.swift */; };
90626F8527E9EFE4008926FE /* Theme.swift in Sources */ = {isa = PBXBuildFile; fileRef = 90626F8427E9EFE4008926FE /* Theme.swift */; };
90626F8827E9F2D8008926FE /* Color+Hex.swift in Sources */ = {isa = PBXBuildFile; fileRef = 90626F8727E9F2D8008926FE /* Color+Hex.swift */; };
B658FB3427DA9E1000EA4DBD /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = B658FB3327DA9E1000EA4DBD /* Assets.xcassets */; };
B658FB3727DA9E1000EA4DBD /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = B658FB3627DA9E1000EA4DBD /* Preview Assets.xcassets */; };
B65E614627E6765D00255275 /* Introspect in Frameworks */ = {isa = PBXBuildFile; productRef = B65E614527E6765D00255275 /* Introspect */; };
Expand Down Expand Up @@ -82,7 +86,6 @@
0485EB2227E7791400138301 /* QuickOpenPreviewView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = QuickOpenPreviewView.swift; sourceTree = "<group>"; };
04ADA0C827E5D29000BF00B2 /* ru */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ru; path = ru.lproj/Localizable.strings; sourceTree = "<group>"; };
04ADA0CA27E5D41F00BF00B2 /* be */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = be; path = be.lproj/Localizable.strings; sourceTree = "<group>"; };
04F2BF0E27DBB28E0024EAB1 /* SettingsView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SettingsView.swift; sourceTree = "<group>"; };
04F2BF1127DBB3C10024EAB1 /* GeneralSettingsView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GeneralSettingsView.swift; sourceTree = "<group>"; };
12F71F7127E833A000095416 /* ja */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ja; path = ja.lproj/Localizable.strings; sourceTree = "<group>"; };
20F8067027E65A5200EB7827 /* af */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = af; path = af.lproj/Localizable.strings; sourceTree = "<group>"; };
Expand All @@ -101,6 +104,10 @@
70F2E28327E848720002BA81 /* zh-Hans */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hans"; path = "zh-Hans.lproj/Localizable.strings"; sourceTree = "<group>"; };
7A4D129627E8E7BD00D4AE07 /* it */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = it; path = it.lproj/Localizable.strings; sourceTree = "<group>"; };
85D7EE9527E928B900CB9F10 /* tr */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = tr; path = tr.lproj/Localizable.strings; sourceTree = "<group>"; };
903D6F3927E9E8F900EC4943 /* PaneIdentifier.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PaneIdentifier.swift; sourceTree = "<group>"; };
90626F8227E9EDA1008926FE /* ThemeSettingsView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ThemeSettingsView.swift; sourceTree = "<group>"; };
90626F8427E9EFE4008926FE /* Theme.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Theme.swift; sourceTree = "<group>"; };
90626F8727E9F2D8008926FE /* Color+Hex.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Color+Hex.swift"; sourceTree = "<group>"; };
B658FB2C27DA9E0F00EA4DBD /* CodeEdit.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = CodeEdit.app; sourceTree = BUILT_PRODUCTS_DIR; };
B658FB3127DA9E0F00EA4DBD /* WorkspaceView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WorkspaceView.swift; sourceTree = "<group>"; };
B658FB3327DA9E1000EA4DBD /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
Expand Down Expand Up @@ -129,6 +136,7 @@
B65E614627E6765D00255275 /* Introspect in Frameworks */,
D70F5E2C27E4E8CF004EE4B9 /* WelcomeModule in Frameworks */,
5CFA753B27E896B60002F01B /* GitClient in Frameworks */,
903D6F3827E9E8C300EC4943 /* Preferences in Frameworks */,
28CE5EA027E6493D0065D29C /* StatusBar in Frameworks */,
5CF38A5E27E48E6C0096A0F7 /* CodeFile in Frameworks */,
);
Expand Down Expand Up @@ -168,6 +176,8 @@
04660F6327E3ACAF00477777 /* Appearances.swift */,
04660F6527E3ACEF00477777 /* ReopenBehavior.swift */,
289978EC27E4E97E00BB0357 /* FileIconStyle.swift */,
903D6F3927E9E8F900EC4943 /* PaneIdentifier.swift */,
90626F8427E9EFE4008926FE /* Theme.swift */,
);
path = Models;
sourceTree = "<group>";
Expand All @@ -186,8 +196,8 @@
isa = PBXGroup;
children = (
04660F6227E3ACA300477777 /* Models */,
04F2BF0E27DBB28E0024EAB1 /* SettingsView.swift */,
04F2BF1127DBB3C10024EAB1 /* GeneralSettingsView.swift */,
90626F8227E9EDA1008926FE /* ThemeSettingsView.swift */,
);
path = Settings;
sourceTree = "<group>";
Expand Down Expand Up @@ -236,6 +246,14 @@
name = Frameworks;
sourceTree = "<group>";
};
90626F8627E9F2CD008926FE /* Extension */ = {
isa = PBXGroup;
children = (
90626F8727E9F2D8008926FE /* Color+Hex.swift */,
);
path = Extension;
sourceTree = "<group>";
};
B658FB2327DA9E0F00EA4DBD = {
isa = PBXGroup;
children = (
Expand All @@ -258,6 +276,7 @@
B658FB2E27DA9E0F00EA4DBD /* CodeEdit */ = {
isa = PBXGroup;
children = (
90626F8627E9F2CD008926FE /* Extension */,
B6EE988E27E8877C00CDD8AB /* InspectorSidebar */,
0485EB1727E7016400138301 /* Quick Open */,
04660F6027E3A68A00477777 /* Info.plist */,
Expand Down Expand Up @@ -342,6 +361,7 @@
28CE5E9F27E6493D0065D29C /* StatusBar */,
0485EB2427E7B9C800138301 /* Overlays */,
5CFA753A27E896B60002F01B /* GitClient */,
903D6F3727E9E8C300EC4943 /* Preferences */,
);
productName = CodeEdit;
productReference = B658FB2C27DA9E0F00EA4DBD /* CodeEdit.app */;
Expand Down Expand Up @@ -427,6 +447,7 @@
mainGroup = B658FB2327DA9E0F00EA4DBD;
packageReferences = (
B65E614427E6765D00255275 /* XCRemoteSwiftPackageReference "SwiftUI-Introspect" */,
903D6F3627E9E8C300EC4943 /* XCRemoteSwiftPackageReference "Preferences" */,
);
productRefGroup = B658FB2D27DA9E0F00EA4DBD /* Products */;
projectDirPath = "";
Expand Down Expand Up @@ -511,10 +532,10 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
903D6F3A27E9E8F900EC4943 /* PaneIdentifier.swift in Sources */,
2B7A583527E4BA0100D25D4E /* AppDelegate.swift in Sources */,
2875A46D27E3BE5B007805F8 /* BreadcrumbsView.swift in Sources */,
0485EB1D27E7338100138301 /* QuickOpenItem.swift in Sources */,
04540D5B27DD08C300E91B77 /* SettingsView.swift in Sources */,
D72E1A8927E44D7C00EB11B9 /* WelcomeWindowView.swift in Sources */,
04540D5C27DD08C300E91B77 /* GeneralSettingsView.swift in Sources */,
B6EE989227E887C600CDD8AB /* InspectorSidebarToolbar.swift in Sources */,
Expand All @@ -531,10 +552,13 @@
287776EF27E3515300D46668 /* TabBarItem.swift in Sources */,
D72E1A8727E4242900EB11B9 /* RecentProjectsView.swift in Sources */,
04660F6A27E51E5C00477777 /* CodeEditWindowController.swift in Sources */,
90626F8827E9F2D8008926FE /* Color+Hex.swift in Sources */,
287776E727E3413200D46668 /* NavigatorSidebar.swift in Sources */,
287776ED27E350D800D46668 /* NavigatorSidebarItem.swift in Sources */,
90626F8327E9EDA1008926FE /* ThemeSettingsView.swift in Sources */,
B6EE989027E8879A00CDD8AB /* InspectorSidebar.swift in Sources */,
289978ED27E4E97E00BB0357 /* FileIconStyle.swift in Sources */,
90626F8527E9EFE4008926FE /* Theme.swift in Sources */,
04660F6627E3ACEF00477777 /* ReopenBehavior.swift in Sources */,
D72E1A8327E3B0D400EB11B9 /* WelcomeView.swift in Sources */,
043C321627E3201F006AE443 /* WorkspaceDocument.swift in Sources */,
Expand Down Expand Up @@ -912,6 +936,14 @@
/* End XCConfigurationList section */

/* Begin XCRemoteSwiftPackageReference section */
903D6F3627E9E8C300EC4943 /* XCRemoteSwiftPackageReference "Preferences" */ = {
isa = XCRemoteSwiftPackageReference;
repositoryURL = "https://github.com/sindresorhus/Preferences";
requirement = {
branch = main;
kind = branch;
};
};
B65E614427E6765D00255275 /* XCRemoteSwiftPackageReference "SwiftUI-Introspect" */ = {
isa = XCRemoteSwiftPackageReference;
repositoryURL = "https://github.com/siteline/SwiftUI-Introspect";
Expand Down Expand Up @@ -943,6 +975,11 @@
isa = XCSwiftPackageProductDependency;
productName = GitClient;
};
903D6F3727E9E8C300EC4943 /* Preferences */ = {
isa = XCSwiftPackageProductDependency;
package = 903D6F3627E9E8C300EC4943 /* XCRemoteSwiftPackageReference "Preferences" */;
productName = Preferences;
};
B65E614527E6765D00255275 /* Introspect */ = {
isa = XCSwiftPackageProductDependency;
package = B65E614427E6765D00255275 /* XCRemoteSwiftPackageReference "SwiftUI-Introspect" */;
Expand Down
7 changes: 7 additions & 0 deletions CodeEdit.xcodeproj/xcshareddata/xcschemes/CodeEdit.xcscheme
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,13 @@
ReferencedContainer = "container:CodeEdit.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
<EnvironmentVariables>
<EnvironmentVariable
key = "OS_ACTIVITY_MODE"
value = "disable"
isEnabled = "YES">
</EnvironmentVariable>
</EnvironmentVariables>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
Expand Down
9 changes: 9 additions & 0 deletions CodeEdit.xcworkspace/xcshareddata/swiftpm/Package.resolved

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

41 changes: 22 additions & 19 deletions CodeEdit/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
//

import SwiftUI
import Preferences
import Cocoa

class CodeEditApplication: NSApplication {
let strongDelegate = AppDelegate()
Expand Down Expand Up @@ -87,26 +89,27 @@ class AppDelegate: NSObject, NSApplicationDelegate, ObservableObject {

// MARK: - Open windows

@IBAction func openPreferences(_ sender: Any) {
if let window = NSApp.windows.filter({ window in
return (window.contentView as? NSHostingView<SettingsView>) != nil
}).first {
window.makeKeyAndOrderFront(self)
return
}
private lazy var preferencesWindowController = PreferencesWindowController(
panes: [
Preferences.Pane(
identifier: Preferences.PaneIdentifier.general,
title: "General",
toolbarIcon: NSImage(systemSymbolName: "gearshape", accessibilityDescription: "")!) {
GeneralSettingsView()
},

Preferences.Pane(
identifier: Preferences.PaneIdentifier.theme,
title: "Theme",
toolbarIcon: NSImage(systemSymbolName: "paintbrush", accessibilityDescription: "")!) {
ThemeSettingsView()
}
]
)

let window = NSWindow(
contentRect: NSRect(x: 0, y: 0, width: 500, height: 400),
styleMask: [.titled, .closable],
backing: .buffered, defer: false)
window.center()
window.toolbar = NSToolbar()
window.title = "Settings"
window.toolbarStyle = .unifiedCompact
_ = NSWindowController(window: window)
let contentView = SettingsView()
window.contentView = NSHostingView(rootView: contentView)
window.makeKeyAndOrderFront(sender)
@IBAction func openPreferences(_ sender: Any) {
preferencesWindowController.show()
preferencesWindowController.window?.center()
}

@IBAction func openWelcome(_ sender: Any) {
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
26 changes: 26 additions & 0 deletions CodeEdit/Assets.xcassets/AgateDisplay.imageset/Contents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"images" : [
{
"filename" : "CleanShot 2022-03-22 at 19.54.15@2x-1.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "CleanShot 2022-03-22 at 19.54.15@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "CleanShot 2022-03-22 at 19.54.15@2x-2.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
},
"properties" : {
"preserves-vector-representation" : true
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"images" : [
{
"filename" : "CleanShot 2022-03-22 at 20.13.29@2x-1.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "CleanShot 2022-03-22 at 20.13.29@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "CleanShot 2022-03-22 at 20.13.29@2x-2.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"images" : [
{
"filename" : "CleanShot 2022-03-22 at 20.14.11@2x-1.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "CleanShot 2022-03-22 at 20.14.11@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "CleanShot 2022-03-22 at 20.14.11@2x-2.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
23 changes: 23 additions & 0 deletions CodeEdit/Assets.xcassets/DefaultDisplay.imageset/Contents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"images" : [
{
"filename" : "CleanShot 2022-03-22 at 20.12.34@2x-1.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "CleanShot 2022-03-22 at 20.12.34@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "CleanShot 2022-03-22 at 20.12.34@2x-2.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
23 changes: 23 additions & 0 deletions CodeEdit/Assets.xcassets/OceanDisplay.imageset/Contents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"images" : [
{
"filename" : "CleanShot 2022-03-22 at 20.14.56@2x-2.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "CleanShot 2022-03-22 at 20.14.56@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "CleanShot 2022-03-22 at 20.14.56@2x-1.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Loading