Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Color palette support #24

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
12 changes: 12 additions & 0 deletions Color Picker Pro.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@
55FE70C014210E9C007C8878 /* SRRecorderControl.m in Sources */ = {isa = PBXBuildFile; fileRef = 55FE70BA14210E9C007C8878 /* SRRecorderControl.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
55FE70C114210E9C007C8878 /* SRValidator.m in Sources */ = {isa = PBXBuildFile; fileRef = 55FE70BC14210E9C007C8878 /* SRValidator.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
55FE70C314210ECE007C8878 /* ShortcutRecorder.strings in Resources */ = {isa = PBXBuildFile; fileRef = 55FE70C214210ECE007C8878 /* ShortcutRecorder.strings */; };
7901C23A1758C9600012C7E8 /* PaletteReader.m in Sources */ = {isa = PBXBuildFile; fileRef = 7901C2391758C9600012C7E8 /* PaletteReader.m */; };
7901C26B1758E7B50012C7E8 /* DTColor+HTML.m in Sources */ = {isa = PBXBuildFile; fileRef = 7901C26A1758E7B50012C7E8 /* DTColor+HTML.m */; };
/* End PBXBuildFile section */

/* Begin PBXCopyFilesBuildPhase section */
Expand Down Expand Up @@ -122,6 +124,10 @@
55FE70BB14210E9C007C8878 /* SRValidator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SRValidator.h; sourceTree = "<group>"; };
55FE70BC14210E9C007C8878 /* SRValidator.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SRValidator.m; sourceTree = "<group>"; };
55FE70C214210ECE007C8878 /* ShortcutRecorder.strings */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.strings; path = ShortcutRecorder.strings; sourceTree = "<group>"; };
7901C2381758C9600012C7E8 /* PaletteReader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PaletteReader.h; sourceTree = "<group>"; };
7901C2391758C9600012C7E8 /* PaletteReader.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PaletteReader.m; sourceTree = "<group>"; };
7901C2691758E7AA0012C7E8 /* DTColor+HTML.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "DTColor+HTML.h"; sourceTree = "<group>"; };
7901C26A1758E7B50012C7E8 /* DTColor+HTML.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "DTColor+HTML.m"; sourceTree = "<group>"; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
Expand Down Expand Up @@ -217,6 +223,8 @@
55D4EC8513FFF18D00D13344 /* ColorPicker */ = {
isa = PBXGroup;
children = (
7901C26A1758E7B50012C7E8 /* DTColor+HTML.m */,
7901C2691758E7AA0012C7E8 /* DTColor+HTML.h */,
55FE70B114210E87007C8878 /* ShortcutRecorder */,
555BB731141DE5C100AE82A9 /* Resources */,
55D4EC8613FFF18D00D13344 /* Supporting Files */,
Expand Down Expand Up @@ -245,6 +253,8 @@
55A883401415F8EE0076BB4A /* PreferencesController.m */,
55A8834E14162EF80076BB4A /* HelpController.h */,
55A8834F14162EF80076BB4A /* HelpController.m */,
7901C2381758C9600012C7E8 /* PaletteReader.h */,
7901C2391758C9600012C7E8 /* PaletteReader.m */,
);
path = ColorPicker;
sourceTree = "<group>";
Expand Down Expand Up @@ -373,6 +383,8 @@
55FE70BF14210E9C007C8878 /* SRRecorderCell.m in Sources */,
55FE70C014210E9C007C8878 /* SRRecorderControl.m in Sources */,
55FE70C114210E9C007C8878 /* SRValidator.m in Sources */,
7901C23A1758C9600012C7E8 /* PaletteReader.m in Sources */,
7901C26B1758E7B50012C7E8 /* DTColor+HTML.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down
3 changes: 2 additions & 1 deletion ColorPicker/AppController.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#import <Foundation/Foundation.h>
#import "CustomWindow.h"
#import "CustomStatusItem.h"
#import "PaletteReader.h"

@class ColorPickerView;
@class RSLoginItems;
Expand All @@ -21,7 +22,7 @@
@property (retain) NSTimer *updateTimer;
@property (assign) BOOL updateMouseLocation;
@property (assign) NSPoint mouseLocation;

@property (retain) PaletteReader *paletteReader;
- (void)toggleShowWindow;
- (void)toggleShowWindowFromPoint:(NSPoint)point forceAnchoring:(BOOL)forceAnchoring;

Expand Down
4 changes: 4 additions & 0 deletions ColorPicker/AppController.m
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,13 @@ @implementation AppController
- (void)awakeFromNib
{
self.loginItems = [[RSLoginItems alloc] init];
self.paletteReader = [[PaletteReader alloc] init];


// Count app runs
NSUserDefaults *defs = [NSUserDefaults standardUserDefaults];
[[self paletteReader] checkForColorPalette];

int timesRun = (int)[defs integerForKey:kUserDefaultsKeyTimesRun];
if (!timesRun)
timesRun = 1;
Expand Down
Loading