Revision: 4732
          http://skim-app.svn.sourceforge.net/skim-app/?rev=4732&view=rev
Author:   hofman
Date:     2008-10-03 14:58:01 +0000 (Fri, 03 Oct 2008)

Log Message:
-----------
reorganize fullscreen code

Modified Paths:
--------------
    trunk/SKFullScreenWindow.m
    trunk/SKMainWindowController.m

Modified: trunk/SKFullScreenWindow.m
===================================================================
--- trunk/SKFullScreenWindow.m  2008-10-03 13:22:03 UTC (rev 4731)
+++ trunk/SKFullScreenWindow.m  2008-10-03 14:58:01 UTC (rev 4732)
@@ -130,6 +130,7 @@
     [fadeOutDict release];
     
     [animation setAnimationBlockingMode:block ? NSAnimationBlocking : 
NSAnimationNonblockingThreaded];
+    [animation setAnimationCurve:block ? NSAnimationEaseIn : 
NSAnimationEaseInOut];
     [animation setDuration:0.7];
     [animation setDelegate:self];
     [animation startAnimation];

Modified: trunk/SKMainWindowController.m
===================================================================
--- trunk/SKMainWindowController.m      2008-10-03 13:22:03 UTC (rev 4731)
+++ trunk/SKMainWindowController.m      2008-10-03 14:58:01 UTC (rev 4732)
@@ -2481,32 +2481,6 @@
 }
 
 - (void)removeFullScreen {
-    [pdfView setBackgroundColor:[[NSUserDefaults standardUserDefaults] 
colorForKey:SKBackgroundColorKey]];
-    [pdfView layoutDocumentView];
-    
-    [fullScreenWindow setLevel:NSPopUpMenuWindowLevel];
-    
-    SetSystemUIMode(kUIModeNormal, 0);
-    
-    NSEnumerator *wcEnum = [[[self document] windowControllers] 
objectEnumerator];
-    NSWindowController *wc = [wcEnum nextObject];
-    
-    while (wc = [wcEnum nextObject]) {
-        if ([wc isNoteWindowController] || [wc isSnapshotWindowController])
-            [(id)wc setForceOnTop:NO];
-    }
-    
-    [fullScreenWindow setDelegate:nil];
-    [self setWindow:mainWindow];
-    [mainWindow orderWindow:NSWindowBelow relativeTo:[fullScreenWindow 
windowNumber]];
-    [mainWindow makeKeyWindow];
-    [mainWindow display];
-    [fullScreenWindow fadeOutBlocking:NO];
-    [mainWindow makeFirstResponder:pdfView];
-    [mainWindow recalculateKeyViewLoop];
-    [mainWindow setDelegate:self];
-    
-    [blankingWindows makeObjectsPerformSelector:@selector(fadeOut)];
 }
 
 - (void)saveNormalSetup {
@@ -2569,11 +2543,6 @@
     [scrollView setHasVerticalScroller:[[savedNormalSetup 
objectForKey:SKMainWindowHasVerticalScrollerKey] boolValue]];
     [scrollView setAutohidesScrollers:[[savedNormalSetup 
objectForKey:SKMainWindowAutoHidesScrollersKey] boolValue]];
     
-    NSColor *backgroundColor = [[NSUserDefaults standardUserDefaults] 
colorForKey:SKFullScreenBackgroundColorKey];
-    [pdfView setBackgroundColor:backgroundColor];
-    [fullScreenWindow setBackgroundColor:backgroundColor];
-    [fullScreenWindow setLevel:NSNormalWindowLevel];
-    
     [self hideLeftSideWindow];
     
     isPresentation = NO;
@@ -2594,6 +2563,11 @@
     else
         [self goFullScreen];
     
+    NSColor *backgroundColor = [[NSUserDefaults standardUserDefaults] 
colorForKey:SKFullScreenBackgroundColorKey];
+    [pdfView setBackgroundColor:backgroundColor];
+    [fullScreenWindow setBackgroundColor:backgroundColor];
+    [fullScreenWindow setLevel:NSNormalWindowLevel];
+    
     NSDictionary *fullScreenSetup = [[NSUserDefaults standardUserDefaults] 
dictionaryForKey:SKDefaultFullScreenPDFDisplaySettingsKey];
     if ([fullScreenSetup count])
         [self applyPDFSettings:fullScreenSetup];
@@ -2642,18 +2616,41 @@
     [pdfView setInteractionMode:SKNormalMode screen:[[self window] screen]];
     [pdfView setFrame:[[pdfEdgeView contentView] bounds]];
     [pdfEdgeView addSubview:pdfView]; // this should be done before 
exitPresentationMode to get a smooth transition
+    [pdfView setBackgroundColor:[[NSUserDefaults standardUserDefaults] 
colorForKey:SKBackgroundColorKey]];
+    [pdfView layoutDocumentView];
     
+    if ([self isPresentation])
+        [self exitPresentationMode];
+    else
+        [self applyPDFSettings:savedNormalSetup];
+    
     [fullScreenWindow orderWindow:NSWindowBelow relativeTo:[bgWindow 
windowNumber]];
     [fullScreenWindow displayIfNeeded];
     [bgWindow orderOut:nil];
     [bgWindow release];
+    [fullScreenWindow setLevel:NSPopUpMenuWindowLevel];
     
-    if ([self isPresentation])
-        [self exitPresentationMode];
-    else
-        [self applyPDFSettings:savedNormalSetup];
-   
-    [self removeFullScreen];
+    SetSystemUIMode(kUIModeNormal, 0);
+    
+    NSEnumerator *wcEnum = [[[self document] windowControllers] 
objectEnumerator];
+    NSWindowController *wc = [wcEnum nextObject];
+    
+    while (wc = [wcEnum nextObject]) {
+        if ([wc isNoteWindowController] || [wc isSnapshotWindowController])
+            [(id)wc setForceOnTop:NO];
+    }
+    
+    [fullScreenWindow setDelegate:nil];
+    [self setWindow:mainWindow];
+    [mainWindow orderWindow:NSWindowBelow relativeTo:[fullScreenWindow 
windowNumber]];
+    [mainWindow makeKeyWindow];
+    [mainWindow display];
+    [fullScreenWindow fadeOutBlocking:NO];
+    [mainWindow makeFirstResponder:pdfView];
+    [mainWindow recalculateKeyViewLoop];
+    [mainWindow setDelegate:self];
+    
+    [blankingWindows makeObjectsPerformSelector:@selector(fadeOut)];
 }
 
 #pragma mark Swapping tables


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