Revision: 3665
http://skim-app.svn.sourceforge.net/skim-app/?rev=3665&view=rev
Author: hofman
Date: 2008-04-07 09:24:33 -0700 (Mon, 07 Apr 2008)
Log Message:
-----------
Add a new hidden pref to allow selecting text behind notes when the caps lock
is pressed.
Modified Paths:
--------------
trunk/SKPDFView.m
Modified: trunk/SKPDFView.m
===================================================================
--- trunk/SKPDFView.m 2008-04-07 14:27:40 UTC (rev 3664)
+++ trunk/SKPDFView.m 2008-04-07 16:24:33 UTC (rev 3665)
@@ -91,6 +91,7 @@
static NSString *SKMoveReadingBarModifiersKey = @"SKMoveReadingBarModifiers";
static NSString *SKResizeReadingBarModifiersKey =
@"SKResizeReadingBarModifiers";
static NSString *SKDisableUpdateContentsFromEnclosedTextKey =
@"SKDisableUpdateContentsFromEnclosedText";
+static NSString *SKSelectTextBehindNotesOnCapsLockKey =
@"SKSelectTextBehindNotesOnCapsLock";
static unsigned int moveReadingBarModifiers = NSAlternateKeyMask;
static unsigned int resizeReadingBarModifiers = NSAlternateKeyMask |
NSShiftKeyMask;
@@ -2708,6 +2709,7 @@
int i;
NSPoint pagePoint;
PDFPage *page;
+ BOOL canSelectNotes = [[NSUserDefaults standardUserDefaults]
boolForKey:SKSelectTextBehindNotesOnCapsLockKey] == NO || ([theEvent
modifierFlags] & NSAlphaShiftKeyMask) == 0;
// Mouse in display view coordinates.
mouseDownLoc = [theEvent locationInWindow];
@@ -2730,7 +2732,7 @@
// Hit test annotation.
if ([annotation isNoteAnnotation]) {
- if ([annotation hitTest:pagePoint] && (editField == nil ||
annotation != activeAnnotation)) {
+ if ([annotation hitTest:pagePoint] && (editField == nil ||
annotation != activeAnnotation) && canSelectNotes) {
mouseDownInAnnotation = YES;
newActiveAnnotation = annotation;
// Remember click point relative to annotation origin.
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 2008 JavaOne(SM) Conference
Register now and save $200. Hurry, offer ends at 11:59 p.m.,
Monday, April 7! Use priority code J8TLD2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit