diff --git a/AppController.h b/AppController.h index 533e94c..9926002 100755 --- a/AppController.h +++ b/AppController.h @@ -97,4 +97,6 @@ -(IBAction) toggleMainHotKey:(id)sender; -(void) setHotKeyPreferenceForRecorder:(SRRecorderControl *)aRecorder; +- (IBAction)enableDropboxButtonClicked:(NSButton*)sender; + @end diff --git a/AppController.m b/AppController.m index 8ab686a..51ec67d 100755 --- a/AppController.m +++ b/AppController.m @@ -14,6 +14,7 @@ #import "SRRecorderCell.h" #import "UKLoginItemRegistry.h" #import "NSWindow+TrueCenter.h" +#import "DBUserDefaults.h" #define _DISPLENGTH 40 @@ -21,7 +22,7 @@ - (id)init { - [[NSUserDefaults standardUserDefaults] registerDefaults:[NSDictionary dictionaryWithObjectsAndKeys: + [[DBUserDefaults standardUserDefaults] registerDefaults:[NSDictionary dictionaryWithObjectsAndKeys: [NSNumber numberWithInt:10], @"displayNum", [NSDictionary dictionaryWithObjects:[NSArray arrayWithObjects:[NSNumber numberWithInt:9],[NSNumber numberWithLong:1179648],nil] forKeys:[NSArray arrayWithObjects:@"keyCode",@"modifierFlags",nil]], @@ -56,14 +57,14 @@ { // We no longer get autosave from ShortcutRecorder, so let's set the recorder by hand - if ( [[NSUserDefaults standardUserDefaults] dictionaryForKey:@"ShortcutRecorder mainHotkey"] ) { - [mainRecorder setKeyCombo:SRMakeKeyCombo([[[[NSUserDefaults standardUserDefaults] dictionaryForKey:@"ShortcutRecorder mainHotkey"] objectForKey:@"keyCode"] intValue], - [[[[NSUserDefaults standardUserDefaults] dictionaryForKey:@"ShortcutRecorder mainHotkey"] objectForKey:@"modifierFlags"] intValue] ) + if ( [[DBUserDefaults standardUserDefaults] dictionaryForKey:@"ShortcutRecorder mainHotkey"] ) { + [mainRecorder setKeyCombo:SRMakeKeyCombo([[[[DBUserDefaults standardUserDefaults] dictionaryForKey:@"ShortcutRecorder mainHotkey"] objectForKey:@"keyCode"] intValue], + [[[[DBUserDefaults standardUserDefaults] dictionaryForKey:@"ShortcutRecorder mainHotkey"] objectForKey:@"modifierFlags"] intValue] ) ]; }; // Initialize the JumpcutStore - clippingStore = [[JumpcutStore alloc] initRemembering:[[NSUserDefaults standardUserDefaults] integerForKey:@"rememberNum"] - displaying:[[NSUserDefaults standardUserDefaults] integerForKey:@"displayNum"] + clippingStore = [[JumpcutStore alloc] initRemembering:[[DBUserDefaults standardUserDefaults] integerForKey:@"rememberNum"] + displaying:[[DBUserDefaults standardUserDefaults] integerForKey:@"displayNum"] withDisplayLength:_DISPLENGTH]; NSRect screenFrame = [[NSScreen mainScreen] frame]; @@ -72,8 +73,8 @@ // Set up the bezel window NSRect windowFrame = NSMakeRect(0, 0, - [[NSUserDefaults standardUserDefaults] floatForKey:@"bezelWidth"], - [[NSUserDefaults standardUserDefaults] floatForKey:@"bezelHeight"]); + [[DBUserDefaults standardUserDefaults] floatForKey:@"bezelWidth"], + [[DBUserDefaults standardUserDefaults] floatForKey:@"bezelHeight"]); bezel = [[BezelWindow alloc] initWithContentRect:windowFrame styleMask:NSBorderlessWindowMask backing:NSBackingStoreBuffered @@ -90,9 +91,9 @@ statusItem = [[[NSStatusBar systemStatusBar] statusItemWithLength:NSVariableStatusItemLength] retain]; [statusItem setHighlightMode:YES]; - if ( [[NSUserDefaults standardUserDefaults] integerForKey:@"menuIcon"] == 1 ) { + if ( [[DBUserDefaults standardUserDefaults] integerForKey:@"menuIcon"] == 1 ) { [statusItem setTitle:[NSString stringWithFormat:@"%C",0x2704]]; - } else if ( [[NSUserDefaults standardUserDefaults] integerForKey:@"menuIcon"] == 2 ) { + } else if ( [[DBUserDefaults standardUserDefaults] integerForKey:@"menuIcon"] == 2 ) { [statusItem setTitle:[NSString stringWithFormat:@"%C",0x2702]]; } else { [statusItem setImage:[NSImage imageNamed:@"com.generalarcade.flycut.16.png"]]; @@ -102,7 +103,7 @@ // If our preferences indicate that we are saving, load the dictionary from the saved plist // and use it to get everything set up. - if ( [[NSUserDefaults standardUserDefaults] integerForKey:@"savePreference"] >= 1 ) { + if ( [[DBUserDefaults standardUserDefaults] integerForKey:@"savePreference"] >= 1 ) { [self loadEngineFromPList]; } // Build our listener timer @@ -175,25 +176,25 @@ int newRemember = [sender intValue]; if ( newRemember < [clippingStore jcListCount] && ! issuedRememberResizeWarning && - ! [[NSUserDefaults standardUserDefaults] boolForKey:@"stifleRememberResizeWarning"] + ! [[DBUserDefaults standardUserDefaults] boolForKey:@"stifleRememberResizeWarning"] ) { choice = NSRunAlertPanel(@"Resize Stack", @"Resizing the stack to a value below its present size will cause clippings to be lost.", @"Resize", @"Cancel", @"Don't Warn Me Again"); if ( choice == NSAlertAlternateReturn ) { - [[NSUserDefaults standardUserDefaults] setValue:[NSNumber numberWithInt:[clippingStore jcListCount]] + [[DBUserDefaults standardUserDefaults] setValue:[NSNumber numberWithInt:[clippingStore jcListCount]] forKey:@"rememberNum"]; [self updateMenu]; return; } else if ( choice == NSAlertOtherReturn ) { - [[NSUserDefaults standardUserDefaults] setValue:[NSNumber numberWithBool:YES] + [[DBUserDefaults standardUserDefaults] setValue:[NSNumber numberWithBool:YES] forKey:@"stifleRememberResizeWarning"]; } else { issuedRememberResizeWarning = YES; } } - if ( newRemember < [[NSUserDefaults standardUserDefaults] integerForKey:@"displayNum"] ) { - [[NSUserDefaults standardUserDefaults] setValue:[NSNumber numberWithInt:newRemember] + if ( newRemember < [[DBUserDefaults standardUserDefaults] integerForKey:@"displayNum"] ) { + [[DBUserDefaults standardUserDefaults] setValue:[NSNumber numberWithInt:newRemember] forKey:@"displayNum"]; } [clippingStore setRememberNum:newRemember]; @@ -209,10 +210,10 @@ { int checkLoginRegistry = [UKLoginItemRegistry indexForLoginItemWithPath:[[NSBundle mainBundle] bundlePath]]; if ( checkLoginRegistry >= 1 ) { - [[NSUserDefaults standardUserDefaults] setValue:[NSNumber numberWithBool:YES] + [[DBUserDefaults standardUserDefaults] setValue:[NSNumber numberWithBool:YES] forKey:@"loadOnStartup"]; } else { - [[NSUserDefaults standardUserDefaults] setValue:[NSNumber numberWithBool:NO] + [[DBUserDefaults standardUserDefaults] setValue:[NSNumber numberWithBool:NO] forKey:@"loadOnStartup"]; } @@ -224,7 +225,7 @@ } -(IBAction)toggleLoadOnStartup:(id)sender { - if ( [[NSUserDefaults standardUserDefaults] boolForKey:@"loadOnStartup"] ) { + if ( [[DBUserDefaults standardUserDefaults] boolForKey:@"loadOnStartup"] ) { [UKLoginItemRegistry addLoginItemWithPath:[[NSBundle mainBundle] bundlePath] hideIt:NO]; } else { [UKLoginItemRegistry removeLoginItemWithPath:[[NSBundle mainBundle] bundlePath]]; @@ -293,7 +294,7 @@ // if ( [clippingStore jcListCount] > 1 ) stackPosition++; stackPosition = 0; [self updateMenu]; - if ( [[NSUserDefaults standardUserDefaults] integerForKey:@"savePreference"] >= 2 ) { + if ( [[DBUserDefaults standardUserDefaults] integerForKey:@"savePreference"] >= 2 ) { [self saveEngine]; } } @@ -430,7 +431,7 @@ { if ( ! isBezelDisplayed ) { [NSApp activateIgnoringOtherApps:YES]; - if ( [[NSUserDefaults standardUserDefaults] boolForKey:@"stickyBezel"] ) { + if ( [[DBUserDefaults standardUserDefaults] boolForKey:@"stickyBezel"] ) { isBezelPinned = YES; } [self showBezel]; @@ -468,7 +469,7 @@ if ( choice == NSAlertDefaultReturn ) { [clippingStore clearList]; [self updateMenu]; - if ( [[NSUserDefaults standardUserDefaults] integerForKey:@"savePreference"] >= 1 ) { + if ( [[DBUserDefaults standardUserDefaults] integerForKey:@"savePreference"] >= 1 ) { [self saveEngine]; } [bezel setText:@""]; @@ -477,7 +478,7 @@ - (void)updateMenu { - NSArray *returnedDisplayStrings = [clippingStore previousDisplayStrings:[[NSUserDefaults standardUserDefaults] integerForKey:@"displayNum"]]; + NSArray *returnedDisplayStrings = [clippingStore previousDisplayStrings:[[DBUserDefaults standardUserDefaults] integerForKey:@"displayNum"]]; NSArray *menuItems = [[[jcMenu itemArray] reverseObjectEnumerator] allObjects]; @@ -511,7 +512,7 @@ { int index=[[sender menu] indexOfItem:sender]; [self addClipToPasteboardFromCount:index]; - if ( [[NSUserDefaults standardUserDefaults] boolForKey:@"menuSelectionPastes"] ) { + if ( [[DBUserDefaults standardUserDefaults] boolForKey:@"menuSelectionPastes"] ) { [self performSelector:@selector(hideApp) withObject:nil]; [self performSelector:@selector(fakeCommandV) withObject:nil afterDelay:0.2]; } @@ -558,7 +559,7 @@ -(void) loadEngineFromPList { - NSDictionary *loadDict = [[[NSUserDefaults standardUserDefaults] dictionaryForKey:@"store"] copy]; + NSDictionary *loadDict = [[[DBUserDefaults standardUserDefaults] dictionaryForKey:@"store"] copy]; NSArray *savedJCList; NSRange loadRange; @@ -569,7 +570,7 @@ savedJCList = [loadDict objectForKey:@"jcList"]; if ( [savedJCList isKindOfClass:[NSArray class]] ) { - int rememberNumPref = [[NSUserDefaults standardUserDefaults] + int rememberNumPref = [[DBUserDefaults standardUserDefaults] integerForKey:@"rememberNum"]; // There's probably a nicer way to prevent the range from going out of bounds, but this works. rangeCap = [savedJCList count] < rememberNumPref ? [savedJCList count] : rememberNumPref; @@ -592,7 +593,7 @@ [bezel setCharString:[NSString stringWithFormat:@"%d of %d", stackPosition + 1, [clippingStore jcListCount]]]; [bezel setText:[clippingStore clippingContentsAtPosition:stackPosition]]; } else { - if ( [[NSUserDefaults standardUserDefaults] boolForKey:@"wraparoundBezel"] ) { + if ( [[DBUserDefaults standardUserDefaults] boolForKey:@"wraparoundBezel"] ) { stackPosition = 0; [bezel setCharString:[NSString stringWithFormat:@"%d of %d", 1, [clippingStore jcListCount]]]; [bezel setText:[clippingStore clippingContentsAtPosition:stackPosition]]; @@ -606,7 +607,7 @@ { stackPosition--; if ( stackPosition < 0 ) { - if ( [[NSUserDefaults standardUserDefaults] boolForKey:@"wraparoundBezel"] ) { + if ( [[DBUserDefaults standardUserDefaults] boolForKey:@"wraparoundBezel"] ) { stackPosition = [clippingStore jcListCount] - 1; [bezel setCharString:[NSString stringWithFormat:@"%d of %d", stackPosition + 1, [clippingStore jcListCount]]]; [bezel setText:[clippingStore clippingContentsAtPosition:stackPosition]]; @@ -626,11 +627,11 @@ NSMutableArray *jcListArray = [NSMutableArray array]; saveDict = [NSMutableDictionary dictionaryWithCapacity:3]; [saveDict setObject:@"0.7" forKey:@"version"]; - [saveDict setObject:[NSNumber numberWithInt:[[NSUserDefaults standardUserDefaults] integerForKey:@"rememberNum"]] + [saveDict setObject:[NSNumber numberWithInt:[[DBUserDefaults standardUserDefaults] integerForKey:@"rememberNum"]] forKey:@"rememberNum"]; [saveDict setObject:[NSNumber numberWithInt:_DISPLENGTH] forKey:@"displayLen"]; - [saveDict setObject:[NSNumber numberWithInt:[[NSUserDefaults standardUserDefaults] integerForKey:@"displayNum"]] + [saveDict setObject:[NSNumber numberWithInt:[[DBUserDefaults standardUserDefaults] integerForKey:@"displayNum"]] forKey:@"displayNum"]; for (int i = 0 ; i < [clippingStore jcListCount]; i++) [jcListArray addObject:[NSDictionary dictionaryWithObjectsAndKeys: @@ -638,13 +639,13 @@ [clippingStore clippingTypeAtPosition:i], @"Type", [NSNumber numberWithInt:i], @"Position",nil]]; [saveDict setObject:jcListArray forKey:@"jcList"]; - [[NSUserDefaults standardUserDefaults] setObject:saveDict forKey:@"store"]; - [[NSUserDefaults standardUserDefaults] synchronize]; + [[DBUserDefaults standardUserDefaults] setObject:saveDict forKey:@"store"]; + [[DBUserDefaults standardUserDefaults] synchronize]; } - (void)setHotKeyPreferenceForRecorder:(SRRecorderControl *)aRecorder { if (aRecorder == mainRecorder) { - [[NSUserDefaults standardUserDefaults] setObject: + [[DBUserDefaults standardUserDefaults] setObject: [NSDictionary dictionaryWithObjects:[NSArray arrayWithObjects:[NSNumber numberWithInt:[mainRecorder keyCombo].code],[NSNumber numberWithInt:[mainRecorder keyCombo].flags],nil] forKeys:[NSArray arrayWithObjects:@"keyCode",@"modifierFlags",nil]] forKey:@"ShortcutRecorder mainHotkey"]; } @@ -662,8 +663,18 @@ NSLog(@"code: %d, flags: %u", newKeyCombo.code, newKeyCombo.flags); } +- (IBAction)enableDropboxButtonClicked:(NSButton*)sender +{ + DBUserDefaults * defaults = [DBUserDefaults standardUserDefaults]; + // First, let's check to make sure Dropbox is available on this machine + if([DBUserDefaults isDropboxAvailable]) + [defaults promptDropboxUnavailable]; + else [[DBUserDefaults standardUserDefaults] setDropboxSyncEnabled:YES]; +} + + - (void)applicationWillTerminate:(NSNotification *)notification { - if ( [[NSUserDefaults standardUserDefaults] integerForKey:@"savePreference"] >= 1 ) { + if ( [[DBUserDefaults standardUserDefaults] integerForKey:@"savePreference"] >= 1 ) { NSLog(@"Saving on exit"); [self saveEngine]; } diff --git a/DBUserDefaults.framework/DBUserDefaults b/DBUserDefaults.framework/DBUserDefaults new file mode 120000 index 0000000..4e693df --- /dev/null +++ b/DBUserDefaults.framework/DBUserDefaults @@ -0,0 +1 @@ +Versions/Current/DBUserDefaults \ No newline at end of file diff --git a/DBUserDefaults.framework/Headers b/DBUserDefaults.framework/Headers new file mode 120000 index 0000000..a177d2a --- /dev/null +++ b/DBUserDefaults.framework/Headers @@ -0,0 +1 @@ +Versions/Current/Headers \ No newline at end of file diff --git a/DBUserDefaults.framework/Resources b/DBUserDefaults.framework/Resources new file mode 120000 index 0000000..953ee36 --- /dev/null +++ b/DBUserDefaults.framework/Resources @@ -0,0 +1 @@ +Versions/Current/Resources \ No newline at end of file diff --git a/DBUserDefaults.framework/Versions/A/DBUserDefaults b/DBUserDefaults.framework/Versions/A/DBUserDefaults new file mode 100755 index 0000000..61b468e Binary files /dev/null and b/DBUserDefaults.framework/Versions/A/DBUserDefaults differ diff --git a/DBUserDefaults.framework/Versions/A/Headers/DBSyncPromptDelegate.h b/DBUserDefaults.framework/Versions/A/Headers/DBSyncPromptDelegate.h new file mode 100644 index 0000000..ccff954 --- /dev/null +++ b/DBUserDefaults.framework/Versions/A/Headers/DBSyncPromptDelegate.h @@ -0,0 +1,59 @@ +// License Agreement for Source Code provided by Mizage LLC +// +// This software is supplied to you by Mizage LLC in consideration of your +// agreement to the following terms, and your use, installation, modification +// or redistribution of this software constitutes acceptance of these terms. If +// you do not agree with these terms, please do not use, install, modify or +// redistribute this software. +// +// In consideration of your agreement to abide by the following terms, and +// subject to these terms, Mizage LLC grants you a personal, non-exclusive +// license, to use, reproduce, modify and redistribute the software, with or +// without modifications, in source and/or binary forms; provided that if you +// redistribute the software in its entirety and without modifications, you +// must retain this notice and the following text and disclaimers in all such +// redistributions of the software, and that in all cases attribution of Mizage +// LLC as the original author of the source code shall be included in all such +// resulting software products or distributions. Neither the name, trademarks, +// service marks or logos of Mizage LLC may be used to endorse or promote +// products derived from the software without specific prior written permission +// from Mizage LLC. Except as expressly stated in this notice, no other rights +// or licenses, express or implied, are granted by Mizage LLC herein, including +// but not limited to any patent rights that may be infringed by your +// derivative works or by other works in which the software may be +// incorporated. +// +// The software is provided by Mizage LLC on an "AS IS" basis. MIZAGE LLC MAKES +// NO WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED +// WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A PARTICULAR +// PURPOSE, REGARDING THE SOFTWARE OR ITS USE AND OPERATION ALONE OR IN +// COMBINATION WITH YOUR PRODUCTS. +// +// IN NO EVENT SHALL MIZAGE LLC BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL +// OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +// INTERRUPTION) ARISING IN ANY WAY OUT OF THE USE, REPRODUCTION, MODIFICATION +// AND/OR DISTRIBUTION OF THE SOFTWARE, HOWEVER CAUSED AND WHETHER UNDER THEORY +// OF CONTRACT, TORT (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, +// EVEN IF MIZAGE LLC HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +#import + +// The options available for a sync prompt +typedef enum DBSyncPromptOption_ +{ + DBSyncPromptOptionLocal = 0, + DBSyncPromptOptionDropbox +} DBSyncPromptOption; + + +// Used to inform the delegate of actions taken in the sync prompt window +@protocol DBSyncPromptDelegate + +- (void)syncPromptDidSelectOption:(DBSyncPromptOption)option; + +@optional +- (void)syncPromptDidCancel; + +@end diff --git a/DBUserDefaults.framework/Versions/A/Headers/DBUserDefaults.h b/DBUserDefaults.framework/Versions/A/Headers/DBUserDefaults.h new file mode 100644 index 0000000..31fec77 --- /dev/null +++ b/DBUserDefaults.framework/Versions/A/Headers/DBUserDefaults.h @@ -0,0 +1,114 @@ +// License Agreement for Source Code provided by Mizage LLC +// +// This software is supplied to you by Mizage LLC in consideration of your +// agreement to the following terms, and your use, installation, modification +// or redistribution of this software constitutes acceptance of these terms. If +// you do not agree with these terms, please do not use, install, modify or +// redistribute this software. +// +// In consideration of your agreement to abide by the following terms, and +// subject to these terms, Mizage LLC grants you a personal, non-exclusive +// license, to use, reproduce, modify and redistribute the software, with or +// without modifications, in source and/or binary forms; provided that if you +// redistribute the software in its entirety and without modifications, you +// must retain this notice and the following text and disclaimers in all such +// redistributions of the software, and that in all cases attribution of Mizage +// LLC as the original author of the source code shall be included in all such +// resulting software products or distributions. Neither the name, trademarks, +// service marks or logos of Mizage LLC may be used to endorse or promote +// products derived from the software without specific prior written permission +// from Mizage LLC. Except as expressly stated in this notice, no other rights +// or licenses, express or implied, are granted by Mizage LLC herein, including +// but not limited to any patent rights that may be infringed by your +// derivative works or by other works in which the software may be +// incorporated. +// +// The software is provided by Mizage LLC on an "AS IS" basis. MIZAGE LLC MAKES +// NO WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED +// WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A PARTICULAR +// PURPOSE, REGARDING THE SOFTWARE OR ITS USE AND OPERATION ALONE OR IN +// COMBINATION WITH YOUR PRODUCTS. +// +// IN NO EVENT SHALL MIZAGE LLC BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL +// OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +// INTERRUPTION) ARISING IN ANY WAY OUT OF THE USE, REPRODUCTION, MODIFICATION +// AND/OR DISTRIBUTION OF THE SOFTWARE, HOWEVER CAUSED AND WHETHER UNDER THEORY +// OF CONTRACT, TORT (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, +// EVEN IF MIZAGE LLC HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +#import + +#import "DBSyncPromptDelegate.h" + +@class DBSyncPrompt; + +// Fired any time the user defaults change. +extern NSString* const DBUserDefaultsDidChangeNotification; + +// Fired when the preferences are updated from Dropbox. You should use this +// notification to reapply all the preferences in your application. +extern NSString* const DBUserDefaultsDidSyncNotification; + + +// DBUserDefaults is a class that gives you a partial replacement for +// NSUserDefaults that synchronizes data to a folder on Dropbox. This allows +// a user to have consistent settings for their application across all their +// Macs. + +@interface DBUserDefaults : NSUserDefaults +{ + NSLock* deadbolt_; //Used to lock access to the defaults dictionary + NSMutableDictionary* defaults_; //Stores the user data +} + +// Determines if Dropbox sync is possible ++ (BOOL)isDropboxAvailable; + +// Determies if Dropbox sync is enabled ++ (BOOL)isDropboxSyncEnabled; + +// Informs the user that Dropbox is not installed +- (void)promptDropboxUnavailable; + +// Sets the status of the Dropbox sync +- (void)setDropboxSyncEnabled:(BOOL)enabled; + +@end + +@interface DBUserDefaults (NSUserDefaultsPartialReplacement) + +#pragma mark - NSUserDefaults (Partial) Replacement + ++ (DBUserDefaults*)standardUserDefaults; ++ (void)resetStandardUserDefaults; + +- (id)objectForKey:(NSString*)defaultName; +- (void)setObject:(id)value forKey:(NSString*)defaultName; +- (void)removeObjectForKey:(NSString*)defaultName; + +- (NSString*)stringForKey:(NSString*)defaultName; +- (NSArray*)arrayForKey:(NSString*)defaultName; +- (NSDictionary*)dictionaryForKey:(NSString*)defaultName; +- (NSData*)dataForKey:(NSString*)defaultName; +- (NSArray*)stringArrayForKey:(NSString*)defaultName; +- (NSInteger)integerForKey:(NSString*)defaultName; +- (float)floatForKey:(NSString*)defaultName; +- (double)doubleForKey:(NSString*)defaultName; +- (BOOL)boolForKey:(NSString*)defaultName; +- (NSURL*)URLForKey:(NSString*)defaultName AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER; + +- (void)setInteger:(NSInteger)value forKey:(NSString*)defaultName; +- (void)setFloat:(float)value forKey:(NSString*)defaultName; +- (void)setDouble:(double)value forKey:(NSString*)defaultName; +- (void)setBool:(BOOL)value forKey:(NSString*)defaultName; +- (void)setURL:(NSURL*)url forKey:(NSString*)defaultName AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER; + +- (void)registerDefaults:(NSDictionary*)registrationDictionary; + +- (NSDictionary*)dictionaryRepresentation; + +- (BOOL)synchronize; + +@end diff --git a/DBUserDefaults.framework/Versions/A/Resources/DBSyncPrompt.nib b/DBUserDefaults.framework/Versions/A/Resources/DBSyncPrompt.nib new file mode 100644 index 0000000..d53f640 Binary files /dev/null and b/DBUserDefaults.framework/Versions/A/Resources/DBSyncPrompt.nib differ diff --git a/DBUserDefaults.framework/Versions/A/Resources/Info.plist b/DBUserDefaults.framework/Versions/A/Resources/Info.plist new file mode 100644 index 0000000..f98b9ff --- /dev/null +++ b/DBUserDefaults.framework/Versions/A/Resources/Info.plist @@ -0,0 +1,42 @@ + + + + + BuildMachineOSBuild + 10K549 + CFBundleDevelopmentRegion + English + CFBundleExecutable + DBUserDefaults + CFBundleIdentifier + com.mizage.DBUserDefaults + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + DBUserDefaults + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1 + DTCompiler + com.apple.compilers.llvm.clang.1_0 + DTPlatformBuild + 10M2518 + DTPlatformVersion + PG + DTSDKBuild + 10M2518 + DTSDKName + macosx10.6 + DTXcode + 0400 + DTXcodeBuild + 10M2518 + NSHumanReadableCopyright + See included License.txt file + + diff --git a/DBUserDefaults.framework/Versions/A/Resources/License.txt b/DBUserDefaults.framework/Versions/A/Resources/License.txt new file mode 100644 index 0000000..ab5391d --- /dev/null +++ b/DBUserDefaults.framework/Versions/A/Resources/License.txt @@ -0,0 +1,38 @@ +License Agreement for Source Code provided by Mizage LLC + +This software is supplied to you by Mizage LLC in consideration of your +agreement to the following terms, and your use, installation, modification +or redistribution of this software constitutes acceptance of these terms. If +you do not agree with these terms, please do not use, install, modify or +redistribute this software. + +In consideration of your agreement to abide by the following terms, and +subject to these terms, Mizage LLC grants you a personal, non-exclusive +license, to use, reproduce, modify and redistribute the software, with or +without modifications, in source and/or binary forms; provided that if you +redistribute the software in its entirety and without modifications, you +must retain this notice and the following text and disclaimers in all such +redistributions of the software, and that in all cases attribution of Mizage +LLC as the original author of the source code shall be included in all such +resulting software products or distributions. Neither the name, trademarks, +service marks or logos of Mizage LLC may be used to endorse or promote +products derived from the software without specific prior written permission +from Mizage LLC. Except as expressly stated in this notice, no other rights +or licenses, express or implied, are granted by Mizage LLC herein, including +but not limited to any patent rights that may be infringed by your +derivative works or by other works in which the software may be +incorporated. + +The software is provided by Mizage LLC on an "AS IS" basis. MIZAGE LLC MAKES +NO WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED +WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE, REGARDING THE SOFTWARE OR ITS USE AND OPERATION ALONE OR IN +COMBINATION WITH YOUR PRODUCTS. + +IN NO EVENT SHALL MIZAGE LLC BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL +OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) ARISING IN ANY WAY OUT OF THE USE, REPRODUCTION, MODIFICATION +AND/OR DISTRIBUTION OF THE SOFTWARE, HOWEVER CAUSED AND WHETHER UNDER THEORY +OF CONTRACT, TORT (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, +EVEN IF MIZAGE LLC HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file diff --git a/DBUserDefaults.framework/Versions/A/Resources/bgspotlight.png b/DBUserDefaults.framework/Versions/A/Resources/bgspotlight.png new file mode 100644 index 0000000..ec74fa9 Binary files /dev/null and b/DBUserDefaults.framework/Versions/A/Resources/bgspotlight.png differ diff --git a/DBUserDefaults.framework/Versions/A/Resources/box.icns b/DBUserDefaults.framework/Versions/A/Resources/box.icns new file mode 100755 index 0000000..efd9358 Binary files /dev/null and b/DBUserDefaults.framework/Versions/A/Resources/box.icns differ diff --git a/DBUserDefaults.framework/Versions/A/Resources/docicon-pref.png b/DBUserDefaults.framework/Versions/A/Resources/docicon-pref.png new file mode 100644 index 0000000..1ee7031 Binary files /dev/null and b/DBUserDefaults.framework/Versions/A/Resources/docicon-pref.png differ diff --git a/DBUserDefaults.framework/Versions/A/Resources/en.lproj/InfoPlist.strings b/DBUserDefaults.framework/Versions/A/Resources/en.lproj/InfoPlist.strings new file mode 100644 index 0000000..dea12de Binary files /dev/null and b/DBUserDefaults.framework/Versions/A/Resources/en.lproj/InfoPlist.strings differ diff --git a/DBUserDefaults.framework/Versions/A/Resources/iconbox-active.png b/DBUserDefaults.framework/Versions/A/Resources/iconbox-active.png new file mode 100644 index 0000000..2442a34 Binary files /dev/null and b/DBUserDefaults.framework/Versions/A/Resources/iconbox-active.png differ diff --git a/DBUserDefaults.framework/Versions/A/Resources/iconbox-inactive-click.png b/DBUserDefaults.framework/Versions/A/Resources/iconbox-inactive-click.png new file mode 100644 index 0000000..5c31251 Binary files /dev/null and b/DBUserDefaults.framework/Versions/A/Resources/iconbox-inactive-click.png differ diff --git a/DBUserDefaults.framework/Versions/A/Resources/iconbox-inactive.png b/DBUserDefaults.framework/Versions/A/Resources/iconbox-inactive.png new file mode 100644 index 0000000..c2618e4 Binary files /dev/null and b/DBUserDefaults.framework/Versions/A/Resources/iconbox-inactive.png differ diff --git a/DBUserDefaults.framework/Versions/A/Resources/transmitting-1.png b/DBUserDefaults.framework/Versions/A/Resources/transmitting-1.png new file mode 100644 index 0000000..aa4d543 Binary files /dev/null and b/DBUserDefaults.framework/Versions/A/Resources/transmitting-1.png differ diff --git a/DBUserDefaults.framework/Versions/A/Resources/transmitting-2.png b/DBUserDefaults.framework/Versions/A/Resources/transmitting-2.png new file mode 100644 index 0000000..9db915d Binary files /dev/null and b/DBUserDefaults.framework/Versions/A/Resources/transmitting-2.png differ diff --git a/DBUserDefaults.framework/Versions/A/Resources/transmitting-3.png b/DBUserDefaults.framework/Versions/A/Resources/transmitting-3.png new file mode 100644 index 0000000..9d8cd87 Binary files /dev/null and b/DBUserDefaults.framework/Versions/A/Resources/transmitting-3.png differ diff --git a/DBUserDefaults.framework/Versions/A/Resources/transmitting-4.png b/DBUserDefaults.framework/Versions/A/Resources/transmitting-4.png new file mode 100644 index 0000000..4a818fc Binary files /dev/null and b/DBUserDefaults.framework/Versions/A/Resources/transmitting-4.png differ diff --git a/DBUserDefaults.framework/Versions/A/Resources/transmitting-5.png b/DBUserDefaults.framework/Versions/A/Resources/transmitting-5.png new file mode 100644 index 0000000..7524a61 Binary files /dev/null and b/DBUserDefaults.framework/Versions/A/Resources/transmitting-5.png differ diff --git a/DBUserDefaults.framework/Versions/A/Resources/transmitting-6.png b/DBUserDefaults.framework/Versions/A/Resources/transmitting-6.png new file mode 100644 index 0000000..724890b Binary files /dev/null and b/DBUserDefaults.framework/Versions/A/Resources/transmitting-6.png differ diff --git a/DBUserDefaults.framework/Versions/Current b/DBUserDefaults.framework/Versions/Current new file mode 120000 index 0000000..8c7e5a6 --- /dev/null +++ b/DBUserDefaults.framework/Versions/Current @@ -0,0 +1 @@ +A \ No newline at end of file diff --git a/English.lproj/MainMenu.nib/designable.nib b/English.lproj/MainMenu.nib/designable.nib index 7f7bbf2..84576d3 100644 --- a/English.lproj/MainMenu.nib/designable.nib +++ b/English.lproj/MainMenu.nib/designable.nib @@ -2,13 +2,13 @@ 1050 - 11B26 - 1617 - 1138 - 566.00 + 10K549 + 1305 + 1038.36 + 461.00 com.apple.InterfaceBuilder.CocoaPlugin - 1617 + 1305 YES @@ -135,6 +135,9 @@ AppController + + YES + 3 2 @@ -147,7 +150,6 @@ View - {213, 107} @@ -160,13 +162,13 @@ {549, 471} - + YES net.sf.jumpcut.preferences.general.tiff - + 256 YES @@ -183,8 +185,9 @@ 256 - {{14, 156}, {97, 18}} + {{14, 198}, {97, 18}} + YES @@ -215,8 +218,9 @@ 256 - {{134, 56}, {152, 26}} + {{134, 98}, {152, 26}} + YES @@ -291,8 +295,9 @@ 256 - {{14, 95}, {204, 18}} + {{14, 137}, {204, 18}} + YES @@ -314,8 +319,9 @@ 256 - {{13, 63}, {64, 17}} + {{13, 105}, {64, 17}} + YES @@ -347,8 +353,9 @@ 256 - {{99, 62}, {33, 14}} + {{99, 104}, {33, 14}} + YES @@ -368,8 +375,9 @@ 256 - {{70, 34}, {62, 14}} + {{70, 76}, {62, 14}} + YES @@ -385,8 +393,9 @@ 256 - {{191, 34}, {95, 14}} + {{191, 76}, {95, 14}} + YES @@ -402,8 +411,9 @@ 256 - {{136, 29}, {25, 22}} + {{136, 71}, {25, 22}} + YES @@ -492,8 +502,9 @@ 256 - {{281, 29}, {24, 22}} + {{281, 71}, {24, 22}} + YES @@ -559,8 +570,9 @@ 256 - {{161, 27}, {19, 27}} + {{161, 69}, {19, 27}} + YES @@ -578,8 +590,10 @@ 256 - {{306, 27}, {19, 27}} + {{306, 69}, {19, 27}} + + YES 917024 @@ -596,8 +610,9 @@ 256 - {{14, 136}, {162, 18}} + {{14, 178}, {162, 18}} + YES @@ -618,8 +633,9 @@ 256 - {{14, 116}, {162, 18}} + {{14, 158}, {162, 18}} + YES @@ -637,14 +653,38 @@ 25 + + + 268 + {{9, 35}, {174, 32}} + + + + YES + + 67239424 + 134217728 + Enable Dropbox Sync + + + -2038284033 + 129 + + + 200 + 25 + + - {555, 186} + {555, 228} + - {{-3, 299}, {555, 186}} + {{-3, 257}, {555, 228}} + {0, 0} @@ -666,6 +706,8 @@ {549, 471} + + General @@ -715,6 +757,7 @@ 256 {{247, 48}, {281, 61}} + YES 67239424 @@ -913,6 +956,7 @@ 256 {{118, 42}, {130, 26}} + YES -2076049856 @@ -1143,7 +1187,7 @@ com.generalarcade.flycut.32.png - + 256 YES @@ -1172,8 +1216,7 @@ 2322 {517, 308} - - + @@ -1300,18 +1343,15 @@ Y291cmFnZW1lbnQuA - - 0 6 - {517, 10000000} + {517, 1e+07} {517, 198} {{1, 1}, {517, 344}} - @@ -1348,7 +1388,6 @@ AAEAAQAAAT0AAwAAAAEAAgAAAVIAAwAAAAEAAQAAAVMAAwAAAAIAAQABAAAAAA -2147483392 {{-100, -100}, {15, 170}} - _doScroller: @@ -1360,7 +1399,6 @@ AAEAAQAAAT0AAwAAAAEAAgAAAVIAAwAAAAEAAQAAAVMAAwAAAAIAAQABAAAAAA -2147483392 {{-100, -100}, {87, 18}} - 1 @@ -1371,9 +1409,8 @@ AAEAAQAAAT0AAwAAAAEAAgAAAVIAAwAAAAEAAQAAAVMAAwAAAAIAAQABAAAAAA {{16, 16}, {519, 346}} - - - 133122 + + 2 @@ -1382,13 +1419,11 @@ AAEAAQAAAT0AAwAAAAEAAgAAAVIAAwAAAAEAAQAAAVMAAwAAAAIAAQABAAAAAA {555, 376} - {{-3, 109}, {555, 376}} - {0, 0} @@ -1410,8 +1445,6 @@ AAEAAQAAAT0AAwAAAAEAAgAAAVIAAwAAAAEAAQAAAVMAAwAAAAIAAQABAAAAAA {549, 471} - - Acknowledgements @@ -1419,26 +1452,25 @@ AAEAAQAAAT0AAwAAAAEAAgAAAVIAAwAAAAEAAQAAAVMAAwAAAAIAAQABAAAAAA - + 6 YES YES YES - + - {549, 471} + {{7, 11}, {549, 471}} - {{0, 0}, {1680, 1028}} + {{0, 0}, {1280, 778}} {213, 129} - {10000000000000, 10000000000000} - YES + {1e+13, 1e+13} YES @@ -1482,38 +1514,6 @@ AAEAAQAAAT0AAwAAAAEAAgAAAVIAAwAAAAEAAQAAAVMAAwAAAAIAAQABAAAAAA 220 - - - value: values.stickyBezel - - - - - - value: values.stickyBezel - value - values.stickyBezel - 2 - - - 401 - - - - selectedIndex: values.savePreference - - - - - - selectedIndex: values.savePreference - selectedIndex - values.savePreference - 2 - - - 403 - clearClippingList: @@ -1522,87 +1522,6 @@ AAEAAQAAAT0AAwAAAAEAAgAAAVIAAwAAAAEAAQAAAVMAAwAAAAIAAQABAAAAAA 404 - - - value: values.rememberNum - - - - - - value: values.rememberNum - value - values.rememberNum - 2 - - - 474 - - - - value: values.displayNum - - - - - - value: values.displayNum - value - values.displayNum - 2 - - - 475 - - - - maxValue: values.rememberNum - - - - - - maxValue: values.rememberNum - maxValue - values.rememberNum - 2 - - - 478 - - - - value: values.displayNum - - - - - - value: values.displayNum - value - values.displayNum - - 2 - - - 479 - - - - value: values.rememberNum - - - - - - value: values.rememberNum - value - values.rememberNum - 2 - - - 482 - setRememberNumPref: @@ -1635,38 +1554,6 @@ AAEAAQAAAT0AAwAAAAEAAgAAAVIAAwAAAAEAAQAAAVMAAwAAAAIAAQABAAAAAA 504 - - - value: values.bezelAlpha - - - - - - value: values.bezelAlpha - value - values.bezelAlpha - 2 - - - 523 - - - - selectedIndex: values.menuIcon - - - - - - selectedIndex: values.menuIcon - selectedIndex - values.menuIcon - 2 - - - 525 - setBezelAlpha: @@ -1699,38 +1586,6 @@ AAEAAQAAAT0AAwAAAAEAAgAAAVIAAwAAAAEAAQAAAVMAAwAAAAIAAQABAAAAAA 591 - - - value: values.menuSelectionPastes - - - - - - value: values.menuSelectionPastes - value - values.menuSelectionPastes - 2 - - - 697 - - - - value: values.wraparoundBezel - - - - - - value: values.wraparoundBezel - value - values.wraparoundBezel - 2 - - - 698 - activateAndOrderFrontStandardAboutPanel: @@ -1739,22 +1594,6 @@ AAEAAQAAAT0AAwAAAAEAAgAAAVIAAwAAAAEAAQAAAVMAAwAAAAIAAQABAAAAAA 735 - - - value: values.loadOnStartup - - - - - - value: values.loadOnStartup - value - values.loadOnStartup - 2 - - - 772 - toggleLoadOnStartup: @@ -1763,38 +1602,6 @@ AAEAAQAAAT0AAwAAAAEAAgAAAVIAAwAAAAEAAQAAAVMAAwAAAAIAAQABAAAAAA 773 - - - value: values.bezelWidth - - - - - - value: values.bezelWidth - value - values.bezelWidth - 2 - - - 802 - - - - value: values.bezelHeight - - - - - - value: values.bezelHeight - value - values.bezelHeight - 2 - - - 803 - setBezelHeight: @@ -1827,6 +1634,239 @@ AAEAAQAAAT0AAwAAAAEAAgAAAVIAAwAAAAEAAQAAAVMAAwAAAAIAAQABAAAAAA 807 + + + value: values.stickyBezel + + + + + + value: values.stickyBezel + value + values.stickyBezel + 2 + + + 811 + + + + value: values.wraparoundBezel + + + + + + value: values.wraparoundBezel + value + values.wraparoundBezel + 2 + + + 814 + + + + value: values.menuSelectionPastes + + + + + + value: values.menuSelectionPastes + value + values.menuSelectionPastes + 2 + + + 817 + + + + value: values.loadOnStartup + + + + + + value: values.loadOnStartup + value + values.loadOnStartup + 2 + + + 820 + + + + selectedIndex: values.savePreference + + + + + + selectedIndex: values.savePreference + selectedIndex + values.savePreference + 2 + + + 823 + + + + value: values.rememberNum + + + + + + value: values.rememberNum + value + values.rememberNum + 2 + + + 826 + + + + value: values.rememberNum + + + + + + value: values.rememberNum + value + values.rememberNum + 2 + + + 829 + + + + value: values.displayNum + + + + + + value: values.displayNum + value + values.displayNum + 2 + + + 832 + + + + value: values.bezelWidth + + + + + + value: values.bezelWidth + value + values.bezelWidth + 2 + + + 838 + + + + value: values.bezelHeight + + + + + + value: values.bezelHeight + value + values.bezelHeight + 2 + + + 841 + + + + selectedIndex: values.menuIcon + + + + + + selectedIndex: values.menuIcon + selectedIndex + values.menuIcon + 2 + + + 844 + + + + value: values.bezelAlpha + + + + + + value: values.bezelAlpha + value + values.bezelAlpha + 2 + + + 847 + + + + maxValue: values.rememberNum + + + + + + maxValue: values.rememberNum + maxValue + values.rememberNum + 2 + + + 852 + + + + value: values.displayNum + + + + + + value: values.displayNum + value + values.displayNum + + 2 + + + 853 + + + + enableDropboxButtonClicked: + + + + 856 + @@ -2029,6 +2069,7 @@ AAEAAQAAAT0AAwAAAAEAAgAAAVIAAwAAAAEAAQAAAVMAAwAAAAIAAQABAAAAAA + @@ -2599,6 +2640,25 @@ AAEAAQAAAT0AAwAAAAEAAgAAAVIAAwAAAAEAAQAAAVMAAwAAAAIAAQABAAAAAA + + 808 + + + + + 854 + + + YES + + + + + + 855 + + + @@ -2714,6 +2774,10 @@ AAEAAQAAAT0AAwAAAAEAAgAAAVIAAwAAAAEAAQAAAVMAAwAAAAIAAQABAAAAAA 789.IBPluginDependency 790.IBPluginDependency 791.IBPluginDependency + 808.CustomClassName + 808.IBPluginDependency + 854.IBPluginDependency + 855.IBPluginDependency YES @@ -2861,6 +2925,10 @@ AAEAAQAAAT0AAwAAAAEAAgAAAVIAAwAAAAEAAQAAAVMAAwAAAAIAAQABAAAAAA com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin + DBUserDefaultsController + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin @@ -2875,7 +2943,7 @@ AAEAAQAAAT0AAwAAAAEAAgAAAVIAAwAAAAEAAQAAAVMAAwAAAAIAAQABAAAAAA - 807 + 856 @@ -2889,6 +2957,7 @@ AAEAAQAAAT0AAwAAAAEAAgAAAVIAAwAAAAEAAQAAAVMAAwAAAAIAAQABAAAAAA YES activateAndOrderFrontStandardAboutPanel: clearClippingList: + enableDropboxButtonClicked: processMenuClippingSelection: setBezelAlpha: setBezelHeight: @@ -2904,6 +2973,7 @@ AAEAAQAAAT0AAwAAAAEAAgAAAVIAAwAAAAEAAQAAAVMAAwAAAAIAAQABAAAAAA YES id id + NSButton id id id @@ -2922,6 +2992,7 @@ AAEAAQAAAT0AAwAAAAEAAgAAAVIAAwAAAAEAAQAAAVMAAwAAAAIAAQABAAAAAA YES activateAndOrderFrontStandardAboutPanel: clearClippingList: + enableDropboxButtonClicked: processMenuClippingSelection: setBezelAlpha: setBezelHeight: @@ -2943,6 +3014,10 @@ AAEAAQAAAT0AAwAAAAEAAgAAAVIAAwAAAAEAAQAAAVMAAwAAAAIAAQABAAAAAA clearClippingList: id + + enableDropboxButtonClicked: + NSButton + processMenuClippingSelection: id @@ -3043,6 +3118,14 @@ AAEAAQAAAT0AAwAAAAEAAgAAAVIAAwAAAAEAAQAAAVMAAwAAAAIAAQABAAAAAA ./Classes/AppController.h + + DBUserDefaultsController + NSUserDefaultsController + + IBProjectSource + ./Classes/DBUserDefaultsController.h + + SRRecorderControl NSControl diff --git a/English.lproj/MainMenu.nib/keyedobjects.nib b/English.lproj/MainMenu.nib/keyedobjects.nib index 3875cf7..61612dc 100644 Binary files a/English.lproj/MainMenu.nib/keyedobjects.nib and b/English.lproj/MainMenu.nib/keyedobjects.nib differ diff --git a/Flycut.xcodeproj/project.pbxproj b/Flycut.xcodeproj/project.pbxproj index 516543e..f838687 100755 --- a/Flycut.xcodeproj/project.pbxproj +++ b/Flycut.xcodeproj/project.pbxproj @@ -61,6 +61,12 @@ 8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */; }; AABE497C09FF9CD000A6A239 /* AppController.m in Sources */ = {isa = PBXBuildFile; fileRef = AABE497B09FF9CD000A6A239 /* AppController.m */; }; AAFAC85F0A1BD9DD00DC6025 /* Carbon.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AAFAC84A0A1BD9DD00DC6025 /* Carbon.framework */; }; + DB46BEEB143466ED0025EA0E /* DBUserDefaults.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DB46BEEA143466ED0025EA0E /* DBUserDefaults.framework */; }; + DB46BEEF14346A7C0025EA0E /* DBUserDefaultsController.h in Headers */ = {isa = PBXBuildFile; fileRef = DB46BEED14346A7C0025EA0E /* DBUserDefaultsController.h */; }; + DB46BEF014346A7C0025EA0E /* DBUserDefaultsController.m in Sources */ = {isa = PBXBuildFile; fileRef = DB46BEEE14346A7C0025EA0E /* DBUserDefaultsController.m */; }; + DB46BEF114346B2F0025EA0E /* DBUserDefaults.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = DB46BEEA143466ED0025EA0E /* DBUserDefaults.framework */; }; + DB46BEF314346C660025EA0E /* DBSyncPromptDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = DB46BEF214346C660025EA0E /* DBSyncPromptDelegate.h */; }; + DB46BEF514346C6D0025EA0E /* DBUserDefaults.h in Headers */ = {isa = PBXBuildFile; fileRef = DB46BEF414346C6D0025EA0E /* DBUserDefaults.h */; }; /* End PBXBuildFile section */ /* Begin PBXCopyFilesBuildPhase section */ @@ -88,6 +94,7 @@ dstPath = ""; dstSubfolderSpec = 10; files = ( + DB46BEF114346B2F0025EA0E /* DBUserDefaults.framework in CopyFiles */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -156,6 +163,11 @@ AABE497A09FF9CD000A6A239 /* AppController.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = AppController.h; sourceTree = ""; }; AABE497B09FF9CD000A6A239 /* AppController.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; path = AppController.m; sourceTree = ""; }; AAFAC84A0A1BD9DD00DC6025 /* Carbon.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Carbon.framework; path = /System/Library/Frameworks/Carbon.framework; sourceTree = ""; }; + DB46BEEA143466ED0025EA0E /* DBUserDefaults.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = DBUserDefaults.framework; sourceTree = ""; }; + DB46BEED14346A7C0025EA0E /* DBUserDefaultsController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DBUserDefaultsController.h; sourceTree = ""; }; + DB46BEEE14346A7C0025EA0E /* DBUserDefaultsController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DBUserDefaultsController.m; sourceTree = ""; }; + DB46BEF214346C660025EA0E /* DBSyncPromptDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = DBSyncPromptDelegate.h; path = ../DBUserDefaults.framework/Headers/DBSyncPromptDelegate.h; sourceTree = ""; }; + DB46BEF414346C6D0025EA0E /* DBUserDefaults.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = DBUserDefaults.h; path = ../DBUserDefaults.framework/Headers/DBUserDefaults.h; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -165,6 +177,7 @@ files = ( 8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */, AAFAC85F0A1BD9DD00DC6025 /* Carbon.framework in Frameworks */, + DB46BEEB143466ED0025EA0E /* DBUserDefaults.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -174,6 +187,7 @@ 080E96DDFE201D6D7F000001 /* Classes */ = { isa = PBXGroup; children = ( + DB46BEEC14346A7C0025EA0E /* DBUserDefaultsController */, AABE497A09FF9CD000A6A239 /* AppController.h */, AABE497B09FF9CD000A6A239 /* AppController.m */, 7761C89B139BDF12000FB3AB /* ShortcutRecorder */, @@ -189,6 +203,7 @@ 1058C7A0FEA54F0111CA2CBB /* Linked Frameworks */ = { isa = PBXGroup; children = ( + DB46BEEA143466ED0025EA0E /* DBUserDefaults.framework */, AAFAC84A0A1BD9DD00DC6025 /* Carbon.framework */, 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */, ); @@ -344,6 +359,17 @@ path = SGHotKeysLib; sourceTree = ""; }; + DB46BEEC14346A7C0025EA0E /* DBUserDefaultsController */ = { + isa = PBXGroup; + children = ( + DB46BEED14346A7C0025EA0E /* DBUserDefaultsController.h */, + DB46BEEE14346A7C0025EA0E /* DBUserDefaultsController.m */, + DB46BEF214346C660025EA0E /* DBSyncPromptDelegate.h */, + DB46BEF414346C6D0025EA0E /* DBUserDefaults.h */, + ); + path = DBUserDefaultsController; + sourceTree = ""; + }; /* End PBXGroup section */ /* Begin PBXHeadersBuildPhase section */ @@ -351,6 +377,8 @@ isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( + DB46BEF314346C660025EA0E /* DBSyncPromptDelegate.h in Headers */, + DB46BEF514346C6D0025EA0E /* DBUserDefaults.h in Headers */, 77A4F3AD139BD72300F39666 /* SGHotKey.h in Headers */, 77A4F3AF139BD72300F39666 /* SGHotKeyCenter.h in Headers */, 77A4F3B1139BD72300F39666 /* SGKeyCodeTranslator.h in Headers */, @@ -369,6 +397,7 @@ 7761C8B0139BDF12000FB3AB /* SRRecorderControl.h in Headers */, 7761C8B2139BDF12000FB3AB /* SRValidator.h in Headers */, 773ABFB113E9AA1A00AE3969 /* NSWindow+TrueCenter.h in Headers */, + DB46BEEF14346A7C0025EA0E /* DBUserDefaultsController.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -473,6 +502,7 @@ 7761C8B1139BDF12000FB3AB /* SRRecorderControl.m in Sources */, 7761C8B3139BDF12000FB3AB /* SRValidator.m in Sources */, 773ABFB213E9AA1A00AE3969 /* NSWindow+TrueCenter.m in Sources */, + DB46BEF014346A7C0025EA0E /* DBUserDefaultsController.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; diff --git a/ShortcutRecorder/SRRecorderCell.m b/ShortcutRecorder/SRRecorderCell.m index 0039258..c458f3a 100644 --- a/ShortcutRecorder/SRRecorderCell.m +++ b/ShortcutRecorder/SRRecorderCell.m @@ -15,6 +15,7 @@ #import "SRRecorderControl.h" #import "SRKeyCodeTransformer.h" #import "SRValidator.h" +#import "DBUserDefaultsController.h" @interface SRRecorderCell (Private) - (void)_privateInit; @@ -1185,7 +1186,7 @@ if (defaultsKey != nil && [defaultsKey length]) { - id values = [[NSUserDefaultsController sharedUserDefaultsController] values]; + id values = [[DBUserDefaultsController sharedUserDefaultsController] values]; NSDictionary *defaultsValue = [NSDictionary dictionaryWithObjectsAndKeys: [NSNumber numberWithShort: keyCombo.code], @"keyCode", @@ -1212,7 +1213,7 @@ if (defaultsKey != nil && [defaultsKey length]) { - id values = [[NSUserDefaultsController sharedUserDefaultsController] values]; + id values = [[DBUserDefaultsController sharedUserDefaultsController] values]; NSDictionary *savedCombo = [values valueForKey: [self _defaultsKeyForAutosaveName: defaultsKey]]; NSInteger keyCode = [[savedCombo valueForKey: @"keyCode"] shortValue]; diff --git a/UI/BezelWindow.m b/UI/BezelWindow.m index 20e14d6..b745dab 100755 --- a/UI/BezelWindow.m +++ b/UI/BezelWindow.m @@ -9,6 +9,7 @@ // at for details. #import "BezelWindow.h" +#import "DBUserDefaults.h" static const float lineHeight = 16; @@ -30,7 +31,7 @@ static const float lineHeight = 16; [self setOpaque:NO]; [self setHasShadow:NO]; [self setMovableByWindowBackground:NO]; - [self setBackgroundColor:[self sizedBezelBackgroundWithRadius:25.0 withAlpha:[[NSUserDefaults standardUserDefaults] floatForKey:@"bezelAlpha"]]]; + [self setBackgroundColor:[self sizedBezelBackgroundWithRadius:25.0 withAlpha:[[DBUserDefaults standardUserDefaults] floatForKey:@"bezelAlpha"]]]; NSRect textFrame = NSMakeRect(12, 36, self.frame.size.width - 24, self.frame.size.height - 50); textField = [[RoundRecTextField alloc] initWithFrame:textFrame]; [[self contentView] addSubview:textField]; @@ -60,7 +61,7 @@ static const float lineHeight = 16; - (void) update { [super update]; - [self setBackgroundColor:[self sizedBezelBackgroundWithRadius:25.0 withAlpha:[[NSUserDefaults standardUserDefaults] floatForKey:@"bezelAlpha"]]]; + [self setBackgroundColor:[self sizedBezelBackgroundWithRadius:25.0 withAlpha:[[DBUserDefaults standardUserDefaults] floatForKey:@"bezelAlpha"]]]; NSRect textFrame = NSMakeRect(12, 36, self.frame.size.width - 24, self.frame.size.height - 50); [textField setFrame:textFrame]; NSRect charFrame = NSMakeRect(([self frame].size.width - (3 * lineHeight)) / 2, 7, 4 * lineHeight, 1.2 * lineHeight); @@ -70,7 +71,7 @@ static const float lineHeight = 16; - (void) setAlpha:(float)newValue { - [self setBackgroundColor:[self sizedBezelBackgroundWithRadius:25.0 withAlpha:[[NSUserDefaults standardUserDefaults] floatForKey:@"bezelAlpha"]]]; + [self setBackgroundColor:[self sizedBezelBackgroundWithRadius:25.0 withAlpha:[[DBUserDefaults standardUserDefaults] floatForKey:@"bezelAlpha"]]]; [[self contentView] setNeedsDisplay:YES]; }