Revision: 5380
          http://skim-app.svn.sourceforge.net/skim-app/?rev=5380&view=rev
Author:   hofman
Date:     2009-05-13 17:35:11 +0000 (Wed, 13 May 2009)

Log Message:
-----------
three modes for fullscreen/presentation navigation window activation: none, 
bottom, or everywhere.

Modified Paths:
--------------
    trunk/InitialUserDefaults.plist
    trunk/SKPDFView.h
    trunk/SKPDFView.m
    trunk/SKStringConstants.h
    trunk/SKStringConstants.m

Modified: trunk/InitialUserDefaults.plist
===================================================================
--- trunk/InitialUserDefaults.plist     2009-05-13 13:18:29 UTC (rev 5379)
+++ trunk/InitialUserDefaults.plist     2009-05-13 17:35:11 UTC (rev 5380)
@@ -224,10 +224,10 @@
         <real>128.0</real>
         <key>SKDefaultNoteHeight</key>
         <real>64.0</real>
-        <key>SKActivateFullScreenNavigationAtBottom</key>
-        <true/>
-        <key>SKActivatePresentationNavigationAtBottom</key>
-        <true/>
+        <key>SKHasFullScreenNavigation</key>
+        <integer>1</integer>
+        <key>SKHasPresentationNavigation</key>
+        <integer>1</integer>
         <key>SKAutoHidePresentationContents</key>
         <true/>
         <key>SKEnableAppleRemote</key>

Modified: trunk/SKPDFView.h
===================================================================
--- trunk/SKPDFView.h   2009-05-13 13:18:29 UTC (rev 5379)
+++ trunk/SKPDFView.h   2009-05-13 17:35:11 UTC (rev 5380)
@@ -99,7 +99,7 @@
     
     BOOL hideNotes;
     
-    BOOL activateNavigationAtBottom;
+    NSInteger navigationMode;
     NSTimer *autohideTimer;
     SKNavigationWindow *navWindow;
     

Modified: trunk/SKPDFView.m
===================================================================
--- trunk/SKPDFView.m   2009-05-13 13:18:29 UTC (rev 5379)
+++ trunk/SKPDFView.m   2009-05-13 17:35:11 UTC (rev 5380)
@@ -118,6 +118,12 @@
 static void SKCGContextDrawGrabHandle(CGContextRef context, CGPoint point, 
CGFloat radius, bool active);
 static void SKCGContextDrawGrabHandles(CGContextRef context, CGRect rect, 
CGFloat radius, NSInteger mask);
 
+enum {
+    SKNavigationNone,
+    SKNavigationBottom,
+    SKNavigationEverywhere,
+};
+
 #pragma mark -
 
 @interface PDFView (SKLeopardPrivate)
@@ -1214,8 +1220,8 @@
     }
     
     // in presentation mode only show the navigation window only by moving the 
mouse to the bottom edge
-    BOOL shouldShowNavWindow = (interactionMode != SKNormalMode) && 
(activateNavigationAtBottom == NO || [theEvent locationInWindow].y < 5.0);
-    if (activateNavigationAtBottom || shouldShowNavWindow) {
+    BOOL shouldShowNavWindow = (navigationMode == SKNavigationEverywhere) || 
(navigationMode == SKNavigationBottom && [theEvent locationInWindow].y < 5.0);
+    if (navigationMode || shouldShowNavWindow) {
         if (shouldShowNavWindow && [navWindow isVisible] == NO) {
             [navWindow orderFront:self];
         }
@@ -2521,7 +2527,7 @@
 }
 
 - (void)enableNavigationForScreen:(NSScreen *)screen {
-    activateNavigationAtBottom = [[NSUserDefaults standardUserDefaults] 
boolForKey:interactionMode == SKPresentationMode ? 
SKActivatePresentationNavigationAtBottomKey : 
SKActivateFullScreenNavigationAtBottomKey];
+    navigationMode = [[NSUserDefaults standardUserDefaults] 
integerForKey:interactionMode == SKPresentationMode ? 
SKHasPresentationNavigationKey : SKHasFullScreenNavigationKey];
     
     // always recreate the navWindow, since moving between screens of 
different resolution can mess up the location (in spite of moveToScreen:)
     if (navWindow != nil)
@@ -2537,7 +2543,7 @@
 }
 
 - (void)disableNavigation {
-    activateNavigationAtBottom = NO;
+    navigationMode = SKNavigationNone;
     
     [navWindow orderOut:self];
 }

Modified: trunk/SKStringConstants.h
===================================================================
--- trunk/SKStringConstants.h   2009-05-13 13:18:29 UTC (rev 5379)
+++ trunk/SKStringConstants.h   2009-05-13 17:35:11 UTC (rev 5380)
@@ -111,8 +111,8 @@
 extern NSString *SKReadMissingNotesFromSkimFileOptionKey;
 extern NSString *SKSavePasswordOptionKey;
 extern NSString *SKBlankAllScreensInFullScreenKey;
-extern NSString *SKActivateFullScreenNavigationAtBottomKey;
-extern NSString *SKActivatePresentationNavigationAtBottomKey;
+extern NSString *SKHasFullScreenNavigationKey;
+extern NSString *SKHasPresentationNavigationKey;
 extern NSString *SKAutoHidePresentationContentsKey;
 extern NSString *SKAutoOpenDownloadsWindowKey;
 extern NSString *SKAutoRemoveFinishedDownloadsKey;

Modified: trunk/SKStringConstants.m
===================================================================
--- trunk/SKStringConstants.m   2009-05-13 13:18:29 UTC (rev 5379)
+++ trunk/SKStringConstants.m   2009-05-13 17:35:11 UTC (rev 5380)
@@ -112,8 +112,8 @@
 NSString *SKReadMissingNotesFromSkimFileOptionKey = 
@"SKReadMissingNotesFromSkimFileOption";
 NSString *SKSavePasswordOptionKey = @"SKSavePasswordOption";
 NSString *SKBlankAllScreensInFullScreenKey = @"SKBlankAllScreensInFullScreen";
-NSString *SKActivateFullScreenNavigationAtBottomKey = 
@"SKActivateFullScreenNavigationAtBottom";
-NSString *SKActivatePresentationNavigationAtBottomKey = 
@"SKActivatePresentationNavigationAtBottom";
+NSString *SKHasFullScreenNavigationKey = @"SKHasFullScreenNavigation";
+NSString *SKHasPresentationNavigationKey = @"SKHasPresentationNavigation";
 NSString *SKAutoHidePresentationContentsKey = 
@"SKAutoHidePresentationContents";
 NSString *SKAutoOpenDownloadsWindowKey = @"SKAutoOpenDownloadsWindow";
 NSString *SKAutoRemoveFinishedDownloadsKey = @"SKAutoRemoveFinishedDownloads";


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

------------------------------------------------------------------------------
The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
production scanning environment may not be a perfect world - but thanks to
Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700
Series Scanner you'll get full speed at 300 dpi even with all image 
processing features enabled. http://p.sf.net/sfu/kodak-com
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit

Reply via email to