Revision: 15631
          http://sourceforge.net/p/skim-app/code/15631
Author:   hofman
Date:     2025-07-09 14:45:56 +0000 (Wed, 09 Jul 2025)
Log Message:
-----------
remove magnifyWithEvent: overrides, as they will never be called, and have not 
bbeen implemented in PDFView for a long time. Also 
[SKDisablePinchZoom](#pinch-zoom) | boolean | false 

Modified Paths:
--------------
    trunk/SKSecondaryPDFView.m
    trunk/SKSnapshotPDFView.m
    trunk/SKStringConstants.h
    trunk/SKStringConstants.m

Modified: trunk/SKSecondaryPDFView.m
===================================================================
--- trunk/SKSecondaryPDFView.m  2025-07-09 14:02:28 UTC (rev 15630)
+++ trunk/SKSecondaryPDFView.m  2025-07-09 14:45:56 UTC (rev 15631)
@@ -102,9 +102,8 @@
     
     [[NSNotificationCenter defaultCenter] addObserver:self 
selector:@selector(handlePageChangedNotification:)
                                                  
name:PDFViewPageChangedNotification object:self];
-    if ([PDFView instancesRespondToSelector:@selector(magnifyWithEvent:)] == 
NO || [PDFView instanceMethodForSelector:@selector(magnifyWithEvent:)] == 
[NSView instanceMethodForSelector:@selector(magnifyWithEvent:)])
-        [[NSNotificationCenter defaultCenter] addObserver:self 
selector:@selector(handlePDFViewScaleChangedNotification:)
-                                                     
name:PDFViewScaleChangedNotification object:self];
+    [[NSNotificationCenter defaultCenter] addObserver:self 
selector:@selector(handlePDFViewScaleChangedNotification:)
+                                                 
name:PDFViewScaleChangedNotification object:self];
 }
 
 - (instancetype)initWithFrame:(NSRect)frameRect {
@@ -671,17 +670,6 @@
         [super endGestureWithEvent:theEvent];
 }
 
-- (void)magnifyWithEvent:(NSEvent *)theEvent {
-    if ([[NSUserDefaults standardUserDefaults] 
boolForKey:SKDisablePinchZoomKey] == NO) {
-        if ([theEvent phase] == NSEventPhaseBegan)
-            startScale = [self scaleFactor];
-        CGFloat magnifyFactor = (1.0 + fmax(-0.5, fmin(1.0 , [theEvent 
magnification])));
-        [super setScaleFactor:magnifyFactor * [self scaleFactor]];
-        if (([theEvent phase] == NSEventPhaseEnded || [theEvent phase] == 
NSEventPhaseCancelled) && fabs(startScale - [self scaleFactor]) > 0.001)
-            [self setScaleFactor:fmax([self scaleFactor], 
SKMinDefaultScaleMenuFactor) adjustPopup:YES];
-    }
-}
-
 #pragma mark Dragging
 
 - (void)mouseDown:(NSEvent *)theEvent{

Modified: trunk/SKSnapshotPDFView.m
===================================================================
--- trunk/SKSnapshotPDFView.m   2025-07-09 14:02:28 UTC (rev 15630)
+++ trunk/SKSnapshotPDFView.m   2025-07-09 14:45:56 UTC (rev 15631)
@@ -104,9 +104,8 @@
                                                  
name:NSViewBoundsDidChangeNotification object:[[self scrollView] contentView]];
     [[NSNotificationCenter defaultCenter] addObserver:self 
selector:@selector(handlePDFContentViewFrameChangedDelayedNotification:)
                                                  
name:SKPDFContentViewChangedNotification object:self];
-    if ([PDFView instancesRespondToSelector:@selector(magnifyWithEvent:)] == 
NO || [PDFView instanceMethodForSelector:@selector(magnifyWithEvent:)] == 
[NSView instanceMethodForSelector:@selector(magnifyWithEvent:)])
-        [[NSNotificationCenter defaultCenter] addObserver:self 
selector:@selector(handlePDFViewScaleChangedNotification:)
-                                                     
name:PDFViewScaleChangedNotification object:self];
+    [[NSNotificationCenter defaultCenter] addObserver:self 
selector:@selector(handlePDFViewScaleChangedNotification:)
+                                                 
name:PDFViewScaleChangedNotification object:self];
 }
 
 - (instancetype)initWithFrame:(NSRect)frameRect {
@@ -593,17 +592,6 @@
         [super endGestureWithEvent:theEvent];
 }
 
-- (void)magnifyWithEvent:(NSEvent *)theEvent {
-    if ([[NSUserDefaults standardUserDefaults] 
boolForKey:SKDisablePinchZoomKey] == NO) {
-        if ([theEvent phase] == NSEventPhaseBegan)
-            startScale = [self scaleFactor];
-        CGFloat magnifyFactor = (1.0 + fmax(-0.5, fmin(1.0 , [theEvent 
magnification])));
-        [super setScaleFactor:magnifyFactor * [self scaleFactor]];
-        if (([theEvent phase] == NSEventPhaseEnded || [theEvent phase] == 
NSEventPhaseCancelled) && fabs(startScale - [self scaleFactor]) > 0.001)
-            [self setScaleFactor:fmax([self scaleFactor], 
SKMinDefaultScaleMenuFactor) adjustPopup:YES];
-    }
-}
-
 #pragma mark Dragging
 
 - (void)mouseDown:(NSEvent *)theEvent{

Modified: trunk/SKStringConstants.h
===================================================================
--- trunk/SKStringConstants.h   2025-07-09 14:02:28 UTC (rev 15630)
+++ trunk/SKStringConstants.h   2025-07-09 14:45:56 UTC (rev 15631)
@@ -126,7 +126,6 @@
 extern NSString *SKSequentialPageNumberingKey;
 extern NSString *SKUseUserNameKey;
 extern NSString *SKUserNameKey;
-extern NSString *SKDisablePinchZoomKey;
 extern NSString *SKDisableModificationDateKey;
 extern NSString *SKDisableAnimationsKey;
 extern NSString *SKDisableUpdateContentsFromEnclosedTextKey;

Modified: trunk/SKStringConstants.m
===================================================================
--- trunk/SKStringConstants.m   2025-07-09 14:02:28 UTC (rev 15630)
+++ trunk/SKStringConstants.m   2025-07-09 14:45:56 UTC (rev 15631)
@@ -126,7 +126,6 @@
 NSString *SKSequentialPageNumberingKey = @"SKSequentialPageNumbering";
 NSString *SKUseUserNameKey = @"SKUseUserName";
 NSString *SKUserNameKey = @"SKUserName";
-NSString *SKDisablePinchZoomKey = @"SKDisablePinchZoom";
 NSString *SKDisableModificationDateKey = @"SKDisableModificationDate";
 NSString *SKDisableAnimationsKey = @"SKDisableAnimations";
 NSString *SKDisableUpdateContentsFromEnclosedTextKey = 
@"SKDisableUpdateContentsFromEnclosedText";

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