Revision: 3597 http://skim-app.svn.sourceforge.net/skim-app/?rev=3597&view=rev Author: hofman Date: 2008-04-02 07:32:43 -0700 (Wed, 02 Apr 2008)
Log Message: ----------- Add pref to disable auto-update of contents from enclosed text for circle and box also for key events. Modified Paths: -------------- trunk/SKPDFView.m Modified: trunk/SKPDFView.m =================================================================== --- trunk/SKPDFView.m 2008-04-02 14:27:52 UTC (rev 3596) +++ trunk/SKPDFView.m 2008-04-02 14:32:43 UTC (rev 3597) @@ -87,6 +87,7 @@ static NSString *SKLargeMagnificationHeightKey = @"SKLargeMagnificationHeight"; static NSString *SKMoveReadingBarModifiersKey = @"SKMoveReadingBarModifiers"; static NSString *SKResizeReadingBarModifiersKey = @"SKResizeReadingBarModifiers"; +static NSString *SKDisableUpdateContentsFromEnclosedTextKey = @"SKDisableUpdateContentsFromEnclosedText"; static unsigned int moveReadingBarModifiers = NSAlternateKeyMask; static unsigned int resizeReadingBarModifiers = NSAlternateKeyMask | NSShiftKeyMask; @@ -2357,7 +2358,8 @@ if (NSEqualRects(bounds, newBounds) == NO) { [activeAnnotation setBounds:newBounds]; - if ([[activeAnnotation type] isEqualToString:SKSquareString] || [[activeAnnotation type] isEqualToString:SKSquareString]) { + if ([[NSUserDefaults standardUserDefaults] boolForKey:SKDisableUpdateContentsFromEnclosedTextKey] == NO && + ([[activeAnnotation type] isEqualToString:SKCircleString] || [[activeAnnotation type] isEqualToString:SKSquareString])) { NSString *selString = [[[[activeAnnotation page] selectionForRect:newBounds] string] stringByCollapsingWhitespaceAndNewlinesAndRemovingSurroundingWhitespaceAndNewlines]; [activeAnnotation setString:selString]; } @@ -2603,7 +2605,8 @@ if (NSEqualRects(bounds, newBounds) == NO) { [activeAnnotation setBounds:newBounds]; - if ([[activeAnnotation type] isEqualToString:SKSquareString] || [[activeAnnotation type] isEqualToString:SKSquareString]) { + if ([[NSUserDefaults standardUserDefaults] boolForKey:SKDisableUpdateContentsFromEnclosedTextKey] == NO && + ([[activeAnnotation type] isEqualToString:SKCircleString] || [[activeAnnotation type] isEqualToString:SKSquareString])) { NSString *selString = [[[[activeAnnotation page] selectionForRect:newBounds] string] stringByCollapsingWhitespaceAndNewlinesAndRemovingSurroundingWhitespaceAndNewlines]; [activeAnnotation setString:selString]; } @@ -2817,7 +2820,7 @@ [wasSelection release]; wasSelection = nil; if (didDrag && - [[NSUserDefaults standardUserDefaults] boolForKey:@"SKDisableUpdateContentsFromEnclosedText"] == NO && + [[NSUserDefaults standardUserDefaults] boolForKey:SKDisableUpdateContentsFromEnclosedTextKey] == NO && ([[activeAnnotation type] isEqualToString:SKCircleString] || [[activeAnnotation type] isEqualToString:SKSquareString])) { NSString *selString = [[[[activeAnnotation page] selectionForRect:[activeAnnotation bounds]] string] stringByCollapsingWhitespaceAndNewlinesAndRemovingSurroundingWhitespaceAndNewlines]; [activeAnnotation setString:selString]; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. ------------------------------------------------------------------------- Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace _______________________________________________ Skim-app-commit mailing list Skim-app-commit@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/skim-app-commit