Revision: 4464
          http://skim-app.svn.sourceforge.net/skim-app/?rev=4464&view=rev
Author:   hofman
Date:     2008-08-28 10:12:48 +0000 (Thu, 28 Aug 2008)

Log Message:
-----------
Cache pref for using logical page numbering in a global variable for efficiency.

Modified Paths:
--------------
    trunk/PDFPage_SKExtensions.m
    trunk/SKMainWindowController.h
    trunk/SKMainWindowController.m

Modified: trunk/PDFPage_SKExtensions.m
===================================================================
--- trunk/PDFPage_SKExtensions.m        2008-08-27 21:42:41 UTC (rev 4463)
+++ trunk/PDFPage_SKExtensions.m        2008-08-28 10:12:48 UTC (rev 4464)
@@ -49,6 +49,7 @@
 #import "NSGeometry_SKExtensions.h"
 #import "SKCFCallBacks.h"
 #import "NSUserDefaults_SKExtensions.h"
+#import "SKMainWindowController.h"
 
 NSString *SKPDFPageBoundsDidChangeNotification = 
@"SKPDFPageBoundsDidChangeNotification";
 
@@ -330,7 +331,7 @@
 
 - (NSString *)displayLabel {
     NSString *label = nil;
-    if ([[NSUserDefaults standardUserDefaults] 
boolForKey:SKLogicalPageNumberingKey] == NO)
+    if (SKUsesLogicalPageNumbering == NO)
         label = [self label];
     return label ?: [self logicalLabel];
 }

Modified: trunk/SKMainWindowController.h
===================================================================
--- trunk/SKMainWindowController.h      2008-08-27 21:42:41 UTC (rev 4463)
+++ trunk/SKMainWindowController.h      2008-08-28 10:12:48 UTC (rev 4464)
@@ -83,6 +83,8 @@
 
 extern NSString *SKMainWindowPageColumnIdentifer;
 
+extern BOOL SKUsesLogicalPageNumbering;
+
 @class PDFAnnotation, PDFOutline, PDFSelection, SKThumbnail, 
SKGroupedSearchResult;
 @class SKPDFView, SKSecondaryPDFView, SKTocOutlineView, SKNoteOutlineView, 
SKThumbnailTableView, SKSnapshotTableView, SKSplitView, BDSKCollapsibleView, 
BDSKEdgeView, BDSKGradientView, SKColorSwatch, SKStatusBar;
 @class SKFullScreenWindow, SKNavigationWindow, SKSideWindow, 
SKSnapshotWindowController, SKProgressController, SKPageSheetController, 
SKScaleSheetController, SKPasswordSheetController, SKBookmarkSheetController;

Modified: trunk/SKMainWindowController.m
===================================================================
--- trunk/SKMainWindowController.m      2008-08-27 21:42:41 UTC (rev 4463)
+++ trunk/SKMainWindowController.m      2008-08-28 10:12:48 UTC (rev 4464)
@@ -211,6 +211,8 @@
         segmentedControlHeight = 25.0;
         segmentedControlOffset = 0.0;
     }
+
+    SKUsesLogicalPageNumbering = [[NSUserDefaults standardUserDefaults] 
boolForKey:SKLogicalPageNumberingKey];
 }
 
 + (BOOL)automaticallyNotifiesObserversForKey:(NSString *)key {
@@ -3363,6 +3365,7 @@
             [groupedFindTableView setFont:font];
             [self updatePageColumnWidthForTableView:outlineView];
         } else if ([key isEqualToString:SKLogicalPageNumberingKey]) {
+            SKUsesLogicalPageNumbering = [[NSUserDefaults 
standardUserDefaults] boolForKey:SKLogicalPageNumberingKey];
             [self updatePageLabelsAndOutline];
         }
         


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

Reply via email to