Revision: 7253
          http://skim-app.svn.sourceforge.net/skim-app/?rev=7253&view=rev
Author:   hofman
Date:     2011-05-25 09:58:53 +0000 (Wed, 25 May 2011)

Log Message:
-----------
static variable for hidden pref that may be called a lot

Modified Paths:
--------------
    trunk/SKPDFView.m

Modified: trunk/SKPDFView.m
===================================================================
--- trunk/SKPDFView.m   2011-05-24 17:22:59 UTC (rev 7252)
+++ trunk/SKPDFView.m   2011-05-25 09:58:53 UTC (rev 7253)
@@ -111,6 +111,8 @@
 static NSUInteger moveReadingBarModifiers = NSAlternateKeyMask;
 static NSUInteger resizeReadingBarModifiers = NSAlternateKeyMask | 
NSShiftKeyMask;
 
+static BOOL useToolModeCursors = NO;
+
 static inline NSInteger SKIndexOfRectAtYInOrderedRects(CGFloat y,  
NSPointerArray *rectArray, BOOL lower);
 
 static void SKDrawGrabHandle(NSPoint point, CGFloat radius, BOOL active);
@@ -198,6 +200,9 @@
     
     [[NSUserDefaults standardUserDefaults] registerDefaults:[NSDictionary 
dictionaryWithObjectsAndKeys:NSLocalizedString(@"Double-click to edit.", 
@"Default text for new text note"), SKDefaultFreeTextNoteContentsKey, 
NSLocalizedString(@"New note", @"Default text for new anchored note"), 
SKDefaultAnchoredNoteContentsKey, nil]];
     
+    
+    useToolModeCursors = [[NSUserDefaults standardUserDefaults] 
boolForKey:SKUseToolModeCursorsKey];
+
     SKSwizzlePDFDisplayViewMethods();
 }
 
@@ -4131,7 +4136,7 @@
 }
 
 - (NSCursor *)cursorForNoteToolMode {
-    if ([[NSUserDefaults standardUserDefaults] 
boolForKey:SKUseToolModeCursorsKey]) {
+    if (useToolModeCursors) {
         switch (annotationMode) {
             case SKFreeTextNote:  return [NSCursor textNoteCursor];
             case SKAnchoredNote:  return [NSCursor anchoredNoteCursor];


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

------------------------------------------------------------------------------
vRanger cuts backup time in half-while increasing security.
With the market-leading solution for virtual backup and recovery, 
you get blazing-fast, flexible, and affordable data protection.
Download your free trial now. 
http://p.sf.net/sfu/quest-d2dcopy1
_______________________________________________
Skim-app-commit mailing list
Skim-app-commit@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/skim-app-commit

Reply via email to