Revision: 15189
          http://sourceforge.net/p/skim-app/code/15189
Author:   hofman
Date:     2025-05-11 21:24:30 +0000 (Sun, 11 May 2025)
Log Message:
-----------
Rename method to avoid stupid compile warning

Modified Paths:
--------------
    trunk/SKPresentationOptionsSheetController.m
    trunk/SKPresentationView.h
    trunk/SKPresentationView.m

Modified: trunk/SKPresentationOptionsSheetController.m
===================================================================
--- trunk/SKPresentationOptionsSheetController.m        2025-05-11 21:14:34 UTC 
(rev 15188)
+++ trunk/SKPresentationOptionsSheetController.m        2025-05-11 21:24:30 UTC 
(rev 15189)
@@ -363,6 +363,8 @@
         [bgView addSubviewWithConstraints:previewView];
     }
     
+    [[previewView transitionController] setTransition:info];
+    
     [previewWindow setTitle:[info localizedStyleName]];
     CGFloat titleHeight = NSHeight([previewWindow frame]) - 
NSHeight([previewWindow contentLayoutRect]);
     rect.size.height += titleHeight - 28.0;
@@ -370,10 +372,7 @@
     [previewWindow layoutIfNeeded];
     [previewWindow center];
     
-    [[previewView transitionController] setTransition:info];
-    
-    PDFPage *page = [[controller pdfDocument] pageAtIndex:idx];
-    void (^displayPreview)(void) = ^{
+    [previewView displayPage:[[controller pdfDocument] pageAtIndex:idx] 
completionHandler:^{
         [previewWindow makeKeyAndOrderFront:nil];
         DISPATCH_MAIN_AFTER_SEC(1.0, ^{
             [previewView animateToNextPage:^{
@@ -385,9 +384,7 @@
                 });
             }];
         });
-    };
-    
-    [previewView setPage:page completionHandler:displayPreview];
+    }];
 }
 
 - (NSArray *)availableTransitions {

Modified: trunk/SKPresentationView.h
===================================================================
--- trunk/SKPresentationView.h  2025-05-11 21:14:34 UTC (rev 15188)
+++ trunk/SKPresentationView.h  2025-05-11 21:24:30 UTC (rev 15189)
@@ -58,7 +58,7 @@
 - (void)goToNextPage:(nullable id)sender;
 - (void)goToPreviousPage:(nullable id)sender;
 
-- (void)setPage:(PDFPage *)page completionHandler:(void (^ 
_Nullable)(void))completionHandler;
+- (void)displayPage:(PDFPage *)page completionHandler:(void (^ 
_Nullable)(void))completionHandler;
 - (void)animateToNextPage:(void (^)(void))completionHandler;
 
 @end

Modified: trunk/SKPresentationView.m
===================================================================
--- trunk/SKPresentationView.m  2025-05-11 21:14:34 UTC (rev 15188)
+++ trunk/SKPresentationView.m  2025-05-11 21:24:30 UTC (rev 15189)
@@ -143,7 +143,7 @@
 
 #pragma mark Transitions
 
-- (void)setPage:(PDFPage *)newPage completionHandler:(void 
(^)(void))completionHandler {
+- (void)displayPage:(PDFPage *)newPage completionHandler:(void 
(^)(void))completionHandler {
     page = newPage;
     [self displayPage:completionHandler];
     [[NSNotificationCenter defaultCenter] 
postNotificationName:SKPresentationViewPageChangedNotification object:self];
@@ -169,7 +169,7 @@
         SKTransitionAnimation animation = [transitionController 
animationAtIndex:idx forView:self];
         if (animation) {
             NSRect rect = NSUnionRect([self pageRect:page], [self 
pageRect:toPage]);
-            [self setPage:toPage completionHandler:^{ animation(rect, forward, 
nil); }];
+            [self displayPage:toPage completionHandler:^{ animation(rect, 
forward, nil); }];
             return YES;
         }
     }
@@ -184,9 +184,9 @@
         SKTransitionAnimation animation = [transitionController 
animationAtIndex:idx forView:self];
         if (animation) {
             NSRect rect = NSUnionRect([self pageRect:page], [self 
pageRect:toPage]);
-            [self setPage:toPage completionHandler:^{ animation(rect, YES, 
completionHandler); }];
+            [self displayPage:toPage completionHandler:^{ animation(rect, YES, 
completionHandler); }];
         } else {
-            [self setPage:toPage completionHandler:completionHandler];
+            [self displayPage:toPage completionHandler:completionHandler];
         }
     } else {
         completionHandler();
@@ -197,7 +197,7 @@
 
 - (void)setPage:(PDFPage *)newPage {
     if (newPage != page)
-        [self setPage:newPage completionHandler:nil];
+        [self displayPage:newPage completionHandler:nil];
 }
 
 - (BOOL)autoScales { return YES; }

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



_______________________________________________
Skim-app-commit mailing list
Skim-app-commit@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/skim-app-commit

Reply via email to