Skip to content

Commit c58050e

Browse files
committed
Merge branch 'development'
2 parents bb5b431 + b57a100 commit c58050e

File tree

109 files changed

+19017
-1720
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

109 files changed

+19017
-1720
lines changed

.gitmodules

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
11
[submodule "Submodules/xcconfig"]
22
path = Submodules/xcconfig
33
url = https://github.com/DigiDNA/xcconfig.git
4-
[submodule "Submodules/GitHubUpdates"]
5-
path = Submodules/GitHubUpdates
6-
url = https://github.com/macmade/GitHubUpdates.git

.travis.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
language: objective-c
2+
osx_image: xcode10.2
3+
cache:
4+
directories:
5+
- $HOME/.ccache
6+
install:
7+
- gem install xcpretty
8+
- brew install ccache
9+
- PATH=$PATH:/usr/local/opt/ccache/libexec
10+
- export PYTHONUSERBASE=~/.local
11+
- easy_install --user scan-build
12+
script:
13+
- set -o pipefail && xcodebuild -project "ColorSet.xcodeproj" -scheme "ColorSetKit" build test | xcpretty
14+
before_script:
15+
- ccache -s
16+
- ccache -z
17+
after_script:
18+
- ccache -s
19+
after_success:
20+
- bash Scripts/travis-after.sh
21+
notifications:
22+
slack: digidna:JnibNY2kbGTqfDWH33jMdcMj

Assets/ColorSet.png

-220 KB
Loading

Build/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
*
2+
!.gitignore

ColorSet.sln

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
2+
Microsoft Visual Studio Solution File, Format Version 12.00
3+
# Visual Studio Version 16
4+
VisualStudioVersion = 16.0.29025.244
5+
MinimumVisualStudioVersion = 10.0.40219.1
6+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ColorSetKit", "ColorSetKit\ColorSetKit.csproj", "{E3BF32CB-99E2-4331-AFB6-9281D79E63BC}"
7+
EndProject
8+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ColorSetKit-Test", "ColorSetKit-Test\ColorSetKit-Test.csproj", "{56A92618-CCFE-4313-90C1-EA63DFD154A0}"
9+
EndProject
10+
Global
11+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
12+
Debug|Any CPU = Debug|Any CPU
13+
Release|Any CPU = Release|Any CPU
14+
EndGlobalSection
15+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
16+
{E3BF32CB-99E2-4331-AFB6-9281D79E63BC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
17+
{E3BF32CB-99E2-4331-AFB6-9281D79E63BC}.Debug|Any CPU.Build.0 = Debug|Any CPU
18+
{E3BF32CB-99E2-4331-AFB6-9281D79E63BC}.Release|Any CPU.ActiveCfg = Release|Any CPU
19+
{E3BF32CB-99E2-4331-AFB6-9281D79E63BC}.Release|Any CPU.Build.0 = Release|Any CPU
20+
{56A92618-CCFE-4313-90C1-EA63DFD154A0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
21+
{56A92618-CCFE-4313-90C1-EA63DFD154A0}.Debug|Any CPU.Build.0 = Debug|Any CPU
22+
{56A92618-CCFE-4313-90C1-EA63DFD154A0}.Release|Any CPU.ActiveCfg = Release|Any CPU
23+
{56A92618-CCFE-4313-90C1-EA63DFD154A0}.Release|Any CPU.Build.0 = Release|Any CPU
24+
EndGlobalSection
25+
GlobalSection(SolutionProperties) = preSolution
26+
HideSolutionNode = FALSE
27+
EndGlobalSection
28+
GlobalSection(ExtensibilityGlobals) = postSolution
29+
SolutionGuid = {A5BF84F5-B6D2-4A4C-ADFB-0971E4D60E2C}
30+
EndGlobalSection
31+
EndGlobal

ColorSet.xcodeproj/project.pbxproj

Lines changed: 285 additions & 122 deletions
Large diffs are not rendered by default.

ColorSet.xcodeproj/xcshareddata/xcschemes/ColorSet.xcscheme

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,6 @@
2727
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
2828
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
2929
shouldUseLaunchSchemeArgsEnv = "YES">
30-
<Testables>
31-
</Testables>
3230
<MacroExpansion>
3331
<BuildableReference
3432
BuildableIdentifier = "primary"
@@ -38,8 +36,8 @@
3836
ReferencedContainer = "container:ColorSet.xcodeproj">
3937
</BuildableReference>
4038
</MacroExpansion>
41-
<AdditionalOptions>
42-
</AdditionalOptions>
39+
<Testables>
40+
</Testables>
4341
</TestAction>
4442
<LaunchAction
4543
buildConfiguration = "Debug"
@@ -61,8 +59,6 @@
6159
ReferencedContainer = "container:ColorSet.xcodeproj">
6260
</BuildableReference>
6361
</BuildableProductRunnable>
64-
<AdditionalOptions>
65-
</AdditionalOptions>
6662
</LaunchAction>
6763
<ProfileAction
6864
buildConfiguration = "Release"

ColorSet.xcodeproj/xcshareddata/xcschemes/ColorSetKit.xcscheme

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,27 @@
2727
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
2828
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
2929
shouldUseLaunchSchemeArgsEnv = "YES">
30+
<MacroExpansion>
31+
<BuildableReference
32+
BuildableIdentifier = "primary"
33+
BlueprintIdentifier = "05CD4AB920ED7CD100DBDE99"
34+
BuildableName = "ColorSetKit.framework"
35+
BlueprintName = "ColorSetKit"
36+
ReferencedContainer = "container:ColorSet.xcodeproj">
37+
</BuildableReference>
38+
</MacroExpansion>
3039
<Testables>
40+
<TestableReference
41+
skipped = "NO">
42+
<BuildableReference
43+
BuildableIdentifier = "primary"
44+
BlueprintIdentifier = "057DC44A22B1492200BA6727"
45+
BuildableName = "ColorSetKit-Test.xctest"
46+
BlueprintName = "ColorSetKit-Test"
47+
ReferencedContainer = "container:ColorSet.xcodeproj">
48+
</BuildableReference>
49+
</TestableReference>
3150
</Testables>
32-
<AdditionalOptions>
33-
</AdditionalOptions>
3451
</TestAction>
3552
<LaunchAction
3653
buildConfiguration = "Debug"
@@ -51,8 +68,6 @@
5168
ReferencedContainer = "container:ColorSet.xcodeproj">
5269
</BuildableReference>
5370
</MacroExpansion>
54-
<AdditionalOptions>
55-
</AdditionalOptions>
5671
</LaunchAction>
5772
<ProfileAction
5873
buildConfiguration = "Release"

ColorSet/Classes/ApplicationDelegate.swift

Lines changed: 41 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,19 +23,29 @@
2323
******************************************************************************/
2424

2525
import Cocoa
26-
import GitHubUpdates
26+
import ColorSetKit
2727

2828
@NSApplicationMain
29-
3029
class ApplicationDelegate: NSResponder, NSApplicationDelegate
3130
{
3231
private var controllers = [ NSWindowController ]()
3332
private var aboutWindowController: NSWindowController?
34-
@IBOutlet private var updater: GitHubUpdater?
3533

3634
func applicationDidFinishLaunching( _ notification: Notification )
3735
{
38-
self.updater?.checkForUpdatesInBackground()
36+
DispatchQueue.main.asyncAfter( deadline: .now() + .milliseconds( 500 ) )
37+
{
38+
if self.controllers.count == 0
39+
{
40+
self.newDocument( nil )
41+
}
42+
}
43+
44+
NotificationCenter.default.addObserver( self, selector: #selector( windowWillClose( _: ) ), name: NSWindow.willCloseNotification, object: nil )
45+
46+
#if DEBUG
47+
UserDefaults.standard.register( defaults: [ "NSApplicationCrashOnExceptions" : true ] )
48+
#endif
3949
}
4050

4151
func applicationWillTerminate( _ notification: Notification )
@@ -120,6 +130,18 @@ class ApplicationDelegate: NSResponder, NSApplicationDelegate
120130
item.color = color
121131
item.variant = p.value.variant
122132

133+
for lp in p.value.lightnesses
134+
{
135+
let lightness = LightnessPairItem( base: item )
136+
137+
lightness.lightness1.lightness = lp.lightness1.lightness
138+
lightness.lightness1.name = lp.lightness1.name
139+
lightness.lightness2.lightness = lp.lightness2.lightness
140+
lightness.lightness2.name = lp.lightness2.name
141+
142+
item.lightnessPairs.append( lightness )
143+
}
144+
123145
colors.append( item )
124146
}
125147

@@ -133,4 +155,19 @@ class ApplicationDelegate: NSResponder, NSApplicationDelegate
133155

134156
return true
135157
}
158+
159+
@objc private func windowWillClose( _ notification: Notification )
160+
{
161+
self.controllers.removeAll
162+
{
163+
c in
164+
165+
guard let window = notification.object as? NSWindow else
166+
{
167+
return false
168+
}
169+
170+
return c.window == window
171+
}
172+
}
136173
}

0 commit comments

Comments
 (0)