Revision: 4385
http://skim-app.svn.sourceforge.net/skim-app/?rev=4385&view=rev
Author: hofman
Date: 2008-08-12 09:00:28 +0000 (Tue, 12 Aug 2008)
Log Message:
-----------
add hidden default to disable animated search highlights
Modified Paths:
--------------
trunk/SKMainWindowController.m
Modified: trunk/SKMainWindowController.m
===================================================================
--- trunk/SKMainWindowController.m 2008-08-12 00:36:51 UTC (rev 4384)
+++ trunk/SKMainWindowController.m 2008-08-12 09:00:28 UTC (rev 4385)
@@ -143,6 +143,7 @@
static NSString *SKUsesDrawersKey = @"SKUsesDrawers";
static NSString *SKSplitPDFCopiesZoomKey = @"SKSplitPDFCopiesZoom";
+static NSString *SKDisableAnimatedSearchHighlightKey =
@"SKDisableAnimatedSearchHighlight";
@interface NSResponder (SKExtensions)
- (BOOL)isDescendantOf:(NSView *)aView;
@@ -2922,7 +2923,7 @@
[self addAnnotationsForSelection:selection];
temporaryAnnotationTimer = [[NSTimer
scheduledTimerWithTimeInterval:10 target:self
selector:@selector(temporaryAnnotationTimerFired:) userInfo:NULL repeats:NO]
retain];
}
- if ([pdfView
respondsToSelector:@selector(setCurrentSelection:animate:)])
+ if ([pdfView
respondsToSelector:@selector(setCurrentSelection:animate:)] && [[NSUserDefaults
standardUserDefaults] boolForKey:SKDisableAnimatedSearchHighlightKey] == NO)
[pdfView setCurrentSelection:selection animate:YES];
} else {
NSBeep();
@@ -2963,14 +2964,14 @@
if (highlightTimer)
[self removeHighlightedSelections:highlightTimer];
- if ([pdfView respondsToSelector:@selector(setHighlightedSelections:)] &&
[currentSel respondsToSelector:@selector(setColor:)] && [findResults count] >
1) {
+ if ([pdfView respondsToSelector:@selector(setHighlightedSelections:)] &&
[[NSUserDefaults standardUserDefaults]
boolForKey:SKDisableAnimatedSearchHighlightKey] == NO && [currentSel
respondsToSelector:@selector(setColor:)] && [findResults count] > 1) {
PDFSelection *tmpSel = [[currentSel copy] autorelease];
[tmpSel setColor:[NSColor yellowColor]];
[pdfView setHighlightedSelections:[NSArray arrayWithObject:tmpSel]];
highlightTimer = [[NSTimer scheduledTimerWithTimeInterval:1.0
target:self selector:@selector(removeHighlightedSelections:) userInfo:nil
repeats:NO] retain];
}
- if ([pdfView respondsToSelector:@selector(setCurrentSelection:animate:)]
&& firstSel)
+ if ([pdfView respondsToSelector:@selector(setCurrentSelection:animate:)]
&& [[NSUserDefaults standardUserDefaults]
boolForKey:SKDisableAnimatedSearchHighlightKey] == NO && firstSel)
[pdfView setCurrentSelection:firstSel animate:YES];
if (currentSel)
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit