Revision: 9510
          http://sourceforge.net/p/skim-app/code/9510
Author:   hofman
Date:     2017-11-28 17:35:31 +0000 (Tue, 28 Nov 2017)
Log Message:
-----------
Hidden pref to display page bounds in status bar when nothing else is displayed

Modified Paths:
--------------
    trunk/SKMainWindowController.m
    trunk/SKMainWindowController_UI.m
    trunk/SKStringConstants.h
    trunk/SKStringConstants.m

Modified: trunk/SKMainWindowController.m
===================================================================
--- trunk/SKMainWindowController.m      2017-11-27 22:01:10 UTC (rev 9509)
+++ trunk/SKMainWindowController.m      2017-11-28 17:35:31 UTC (rev 9510)
@@ -175,8 +175,6 @@
 #define SKLeftSidePaneWidthKey @"SKLeftSidePaneWidth"
 #define SKRightSidePaneWidthKey @"SKRightSidePaneWidth"
 
-#define SKDisplayNoteBoundsKey @"SKDisplayNoteBounds"
-
 #define SKUseSettingsFromPDFKey @"SKUseSettingsFromPDF"
 
 @interface SKMainWindowController (SKPrivate)
@@ -614,6 +612,9 @@
     if ([[NSUserDefaults standardUserDefaults] 
boolForKey:SKDisplayNoteBoundsKey] && NSEqualRects(rect, NSZeroRect) && 
[pdfView activeAnnotation])
         rect = [[pdfView activeAnnotation] bounds];
     
+    if ([[NSUserDefaults standardUserDefaults] 
boolForKey:SKDisplayPageBoundsKey] && NSEqualRects(rect, NSZeroRect))
+        rect = [[pdfView currentPage] boundsForBox:[pdfView displayBox]];
+
     if (NSEqualRects(rect, NSZeroRect) == NO) {
         if ([statusBar rightState] == NSOnState) {
             BOOL useMetric = [[[NSLocale currentLocale] 
objectForKey:NSLocaleUsesMetricSystem] boolValue];
@@ -2133,6 +2134,9 @@
     }
     
     [secondaryPdfView requiresDisplay];
+    
+    if ([[NSUserDefaults standardUserDefaults] 
boolForKey:SKDisplayPageBoundsKey])
+        [self updateRightStatus];
 }
 
 - (void)handleDocumentBeginWrite:(NSNotification *)notification {

Modified: trunk/SKMainWindowController_UI.m
===================================================================
--- trunk/SKMainWindowController_UI.m   2017-11-27 22:01:10 UTC (rev 9509)
+++ trunk/SKMainWindowController_UI.m   2017-11-28 17:35:31 UTC (rev 9510)
@@ -1796,7 +1796,9 @@
     
     [self synchronizeWindowTitleWithDocumentName];
     [self updateLeftStatus];
-    
+    if ([[NSUserDefaults standardUserDefaults] 
boolForKey:SKDisplayPageBoundsKey])
+        [self updateRightStatus];
+
     if ([self interactionMode] == SKPresentationMode)
         [[self presentationNotesDocument] setCurrentPage:[[[self 
presentationNotesDocument] pdfDocument] pageAtIndex:[page pageIndex]]];
 }
@@ -1803,6 +1805,8 @@
 
 - (void)handleDisplayBoxChangedNotification:(NSNotification *)notification {
     [self resetThumbnails];
+    if ([[NSUserDefaults standardUserDefaults] 
boolForKey:SKDisplayPageBoundsKey])
+        [self updateRightStatus];
 }
 
 - (void)handleSelectionOrMagnificationChangedNotification:(NSNotification 
*)notification {
@@ -1839,7 +1843,8 @@
         [rightSideController.noteOutlineView deselectAll:self];
     }
     [rightSideController.noteOutlineView reloadData];
-    [self updateRightStatus];
+    if ([[NSUserDefaults standardUserDefaults] 
boolForKey:SKDisplayNoteBoundsKey])
+        [self updateRightStatus];
 }
 
 - (void)handleDidAddAnnotationNotification:(NSNotification *)notification {

Modified: trunk/SKStringConstants.h
===================================================================
--- trunk/SKStringConstants.h   2017-11-27 22:01:10 UTC (rev 9509)
+++ trunk/SKStringConstants.h   2017-11-28 17:35:31 UTC (rev 9510)
@@ -132,3 +132,6 @@
 extern NSString *SKCaseInsensitiveFindKey;
 extern NSString *SKDownloadsDirectoryKey;
 extern NSString *SKDisableSearchAfterSpotlighKey;
+extern NSString *SKDisplayNoteBoundsKey;
+extern NSString *SKDisplayPageBoundsKey;
+

Modified: trunk/SKStringConstants.m
===================================================================
--- trunk/SKStringConstants.m   2017-11-27 22:01:10 UTC (rev 9509)
+++ trunk/SKStringConstants.m   2017-11-28 17:35:31 UTC (rev 9510)
@@ -133,3 +133,6 @@
 NSString *SKCaseInsensitiveFindKey = @"SKCaseInsensitiveFind";
 NSString *SKDownloadsDirectoryKey = @"SKDownloadsDirectory";
 NSString *SKDisableSearchAfterSpotlighKey = @"SKDisableSearchAfterSpotligh";
+NSString *SKDisplayNoteBoundsKey = @"SKDisplayNoteBounds";
+NSString *SKDisplayPageBoundsKey = @"SKDisplayPageBounds";
+

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


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit

Reply via email to