diff --git a/AppController.h b/AppController.h index 3ee603e..47ba8e4 100755 --- a/AppController.h +++ b/AppController.h @@ -17,7 +17,7 @@ @class SGHotKey; -@interface AppController : NSObject { +@interface AppController : NSObject { BezelWindow *bezel; SGHotKey *mainHotKey; IBOutlet SRRecorderControl *mainRecorder; diff --git a/AppController.m b/AppController.m index b02f5ee..1f528b3 100755 --- a/AppController.m +++ b/AppController.m @@ -49,7 +49,10 @@ [NSNumber numberWithFloat:320.0], @"bezelHeight", [NSDictionary dictionary], - @"store", nil]]; + @"store", + [NSNumber numberWithBool:YES], + @"skipPasswordFields", + nil]]; return [super init]; } @@ -121,6 +124,13 @@ // Stack position starts @ 0 by default stackPosition = 0; + [[NSNotificationCenter defaultCenter] addObserverForName:@"DBSyncPromptUserDidCancelNotification" + object:nil queue:nil usingBlock:^(NSNotification *notification) { + [self setDropboxSync:NO]; + + //[[DBUserDefaults standardUserDefaults] setDropboxSyncEnabled:NO]; + + }]; [NSApp activateIgnoringOtherApps: YES]; } @@ -283,8 +293,8 @@ pbCount = [[NSNumber numberWithInt:[jcPasteboard changeCount]] retain]; if ( type != nil ) { NSString *contents = [jcPasteboard stringForType:type]; - if ( contents == nil ) { -// NSLog(@"Contents: Empty"); + if ( contents == nil || ([jcPasteboard stringForType:@"PasswordPboardType"] && [[DBUserDefaults standardUserDefaults] boolForKey:@"skipPasswordFields"]) ) { + NSLog(@"Contents: Empty"); } else { if (( [clippingStore jcListCount] == 0 || ! [contents isEqualToString:[clippingStore clippingContentsAtPosition:0]]) && ! [pbCount isEqualTo:pbBlockCount] ) { @@ -652,6 +662,7 @@ } - (IBAction)toggleDropboxSync:(NSButtonCell*)sender { + DBUserDefaults * defaults = [DBUserDefaults standardUserDefaults]; // First, let's check to make sure Dropbox is available on this machine if (sender.state == 1) { @@ -694,16 +705,10 @@ if([DBUserDefaults isDropboxAvailable]) [defaults promptDropboxUnavailable]; else [[DBUserDefaults standardUserDefaults] setDropboxSyncEnabled:YES]; - } else [[DBUserDefaults standardUserDefaults] setDropboxSyncEnabled:NO]; -} - -- (void)syncPromptDidSelectOption:(DBSyncPromptOption)option { - //TODO -} - -- (void)syncPromptDidCancel { - [dropboxCheckbox setState:0]; - [self setDropboxSync:NO]; + } else { + [[DBUserDefaults standardUserDefaults] setDropboxSyncEnabled:NO]; + [dropboxCheckbox setState:NSOffState]; + } } - (void) dealloc { diff --git a/DBUserDefaults.framework/Versions/A/DBUserDefaults b/DBUserDefaults.framework/Versions/A/DBUserDefaults index 61b468e..074c9ff 100755 Binary files a/DBUserDefaults.framework/Versions/A/DBUserDefaults and b/DBUserDefaults.framework/Versions/A/DBUserDefaults differ diff --git a/DBUserDefaults.framework/Versions/A/Resources/DBSyncPrompt.nib b/DBUserDefaults.framework/Versions/A/Resources/DBSyncPrompt.nib index d53f640..5bbed4b 100644 Binary files a/DBUserDefaults.framework/Versions/A/Resources/DBSyncPrompt.nib and b/DBUserDefaults.framework/Versions/A/Resources/DBSyncPrompt.nib differ diff --git a/English.lproj/MainMenu.nib/designable.nib b/English.lproj/MainMenu.nib/designable.nib index e59e0ef..ab7afcd 100644 --- a/English.lproj/MainMenu.nib/designable.nib +++ b/English.lproj/MainMenu.nib/designable.nib @@ -185,7 +185,7 @@ 256 - {{14, 212}, {97, 18}} + {{14, 254}, {97, 18}} @@ -218,7 +218,7 @@ 256 - {{79, 70}, {189, 26}} + {{79, 112}, {189, 26}} @@ -295,7 +295,7 @@ 256 - {{14, 151}, {204, 18}} + {{14, 193}, {204, 18}} @@ -319,7 +319,7 @@ 256 - {{14, 131}, {247, 18}} + {{14, 173}, {247, 18}} @@ -340,10 +340,34 @@ 25 + + + 256 + {{14, 56}, {247, 18}} + + + + YES + + 67239424 + 0 + Don't copy from password fields + + + 1211912703 + 2 + + + + + 200 + 25 + + 256 - {{13, 98}, {76, 23}} + {{13, 140}, {76, 23}} @@ -377,7 +401,7 @@ 256 - {{13, 76}, {33, 14}} + {{13, 118}, {33, 14}} @@ -399,7 +423,7 @@ 256 - {{13, 50}, {62, 14}} + {{13, 92}, {62, 14}} @@ -417,7 +441,7 @@ 256 - {{134, 50}, {95, 14}} + {{134, 92}, {95, 14}} @@ -435,7 +459,7 @@ 256 - {{79, 45}, {25, 22}} + {{79, 87}, {25, 22}} @@ -526,7 +550,7 @@ 256 - {{224, 45}, {24, 22}} + {{224, 87}, {24, 22}} @@ -594,7 +618,7 @@ 256 - {{104, 43}, {19, 27}} + {{104, 85}, {19, 27}} @@ -614,10 +638,10 @@ 256 - {{249, 43}, {19, 27}} + {{249, 85}, {19, 27}} - + YES 917024 @@ -634,7 +658,7 @@ 256 - {{14, 192}, {162, 18}} + {{14, 234}, {162, 18}} @@ -657,7 +681,7 @@ 256 - {{14, 172}, {162, 18}} + {{14, 214}, {162, 18}} @@ -678,13 +702,13 @@ - {555, 242} + {555, 284} - {{-3, 243}, {555, 242}} + {{-3, 201}, {555, 284}} @@ -1216,7 +1240,7 @@ 2322 - {398, 336} + {398, 406} @@ -1391,6 +1415,7 @@ AAEAAQAAAT0AAwAAAAEAAgAAAVIAAwAAAAEAAQAAAVMAAwAAAAIAAQABAAAAAA {{-100, -100}, {15, 170}} + YES _doScroller: 0.4805194805194804 @@ -1412,7 +1437,7 @@ AAEAAQAAAT0AAwAAAAEAAgAAAVIAAwAAAAEAAQAAAVMAAwAAAAIAAQABAAAAAA {{16, 16}, {476, 346}} - 2 + 66 @@ -1885,6 +1910,22 @@ AAEAAQAAAT0AAwAAAAEAAgAAAVIAAwAAAAEAAQAAAVMAAwAAAAIAAQABAAAAAA 896 + + + value: values.skipPasswordFields + + + + + + value: values.skipPasswordFields + value + values.skipPasswordFields + 2 + + + 902 + @@ -2058,6 +2099,7 @@ AAEAAQAAAT0AAwAAAAEAAgAAAVIAAwAAAAEAAQAAAVMAAwAAAAIAAQABAAAAAA + @@ -2100,6 +2142,7 @@ AAEAAQAAAT0AAwAAAAEAAgAAAVIAAwAAAAEAAQAAAVMAAwAAAAIAAQABAAAAAA + Box - Box 264 @@ -2677,6 +2720,20 @@ AAEAAQAAAT0AAwAAAAEAAgAAAVIAAwAAAAEAAQAAAVMAAwAAAAIAAQABAAAAAA + + 897 + + + YES + + + + + + 898 + + + @@ -2796,6 +2853,8 @@ AAEAAQAAAT0AAwAAAAEAAgAAAVIAAwAAAAEAAQAAAVMAAwAAAAIAAQABAAAAAA 808.IBPluginDependency 857.IBPluginDependency 858.IBPluginDependency + 897.IBPluginDependency + 898.IBPluginDependency YES @@ -2947,6 +3006,8 @@ AAEAAQAAAT0AAwAAAAEAAgAAAVIAAwAAAAEAAQAAAVMAAwAAAAIAAQABAAAAAA com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin @@ -2961,7 +3022,7 @@ AAEAAQAAAT0AAwAAAAEAAgAAAVIAAwAAAAEAAQAAAVMAAwAAAAIAAQABAAAAAA - 896 + 902 diff --git a/English.lproj/MainMenu.nib/keyedobjects.nib b/English.lproj/MainMenu.nib/keyedobjects.nib index d45ac8e..74dd231 100644 Binary files a/English.lproj/MainMenu.nib/keyedobjects.nib and b/English.lproj/MainMenu.nib/keyedobjects.nib differ diff --git a/JumpcutEngine/JumpcutClipping.m b/JumpcutEngine/JumpcutClipping.m index faa81a7..ea2ef43 100755 --- a/JumpcutEngine/JumpcutClipping.m +++ b/JumpcutEngine/JumpcutClipping.m @@ -121,18 +121,19 @@ -(void) resetDisplayString { - NSString *newDisplayString, *firstLineOfClipping; + NSString *newDisplayString, *firstLineOfClipping, *trimmedString; NSUInteger start, lineEnd, contentsEnd; NSRange startRange = NSMakeRange(0,0); NSRange contentsRange; // We're resetting the display string, so release the old one. [clipDisplayString release]; // We want to restrict the display string to the clipping contents through the first line break. - [clipContents getLineStart:&start end:&lineEnd contentsEnd:&contentsEnd forRange:startRange]; + trimmedString = [clipContents stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]]; + [trimmedString getLineStart:&start end:&lineEnd contentsEnd:&contentsEnd forRange:startRange]; contentsRange = NSMakeRange(0, contentsEnd); - firstLineOfClipping = [clipContents substringWithRange:contentsRange]; + firstLineOfClipping = [trimmedString substringWithRange:contentsRange]; if ( [firstLineOfClipping length] > clipDisplayLength ) { - newDisplayString = [[NSString stringWithString:[firstLineOfClipping substringToIndex:clipDisplayLength]] stringByAppendingString:@"..."]; + newDisplayString = [[NSString stringWithString:[firstLineOfClipping substringToIndex:clipDisplayLength]] stringByAppendingString:@"…"]; } else { newDisplayString = [NSString stringWithString:firstLineOfClipping]; }