Revision: 13713
          http://sourceforge.net/p/skim-app/code/13713
Author:   hofman
Date:     2023-11-01 18:12:46 +0000 (Wed, 01 Nov 2023)
Log Message:
-----------
Remove warning suppression and code paths for older system support

Modified Paths:
--------------
    trunk/NSColor_SKExtensions.h
    trunk/NSColor_SKExtensions.m
    trunk/NSDocument_SKExtensions.m
    trunk/NSImage_SKExtensions.m
    trunk/NSView_SKExtensions.m
    trunk/NSWindow_SKExtensions.m
    trunk/PDFAnnotationInk_SKExtensions.m
    trunk/PDFAnnotationLine_SKExtensions.m
    trunk/PDFAnnotation_SKExtensions.m
    trunk/PDFDestination_SKExtensions.m
    trunk/PDFDocumentView_SKExtensions.m
    trunk/PDFDocument_SKExtensions.m
    trunk/PDFOutline_SKExtensions.h
    trunk/PDFOutline_SKExtensions.m
    trunk/PDFPage_SKExtensions.m
    trunk/PDFView_SKExtensions.h
    trunk/PDFView_SKExtensions.m
    trunk/SKApplicationController.m
    trunk/SKBasePDFView.m
    trunk/SKBookmarkController.h
    trunk/SKBookmarkController.m
    trunk/SKColorPicker.h
    trunk/SKCompatibility.h
    trunk/SKConversionProgressController.h
    trunk/SKConversionProgressController.m
    trunk/SKDocumentController.m
    trunk/SKDownloadController.h
    trunk/SKDownloadController.m
    trunk/SKDownloadPreferenceController.h
    trunk/SKDownloadPreferenceController.m
    trunk/SKImageToolTipWindow.m
    trunk/SKLeftSideViewController.m
    trunk/SKLevelIndicatorCell.m
    trunk/SKLoupeController.m
    trunk/SKMainDocument.m
    trunk/SKMainToolbarController.m
    trunk/SKMainTouchBarController.h
    trunk/SKMainTouchBarController.m
    trunk/SKMainWindow.m
    trunk/SKMainWindowController.m
    trunk/SKMainWindowController_Actions.m
    trunk/SKMainWindowController_FullScreen.m
    trunk/SKMainWindowController_UI.m
    trunk/SKNoteWindowController.m
    trunk/SKNotesDocument.m
    trunk/SKOutlineView.m
    trunk/SKPDFDocument.m
    trunk/SKPDFView.m
    trunk/SKPreferenceController.h
    trunk/SKPreferenceController.m
    trunk/SKPresentationOptionsSheetController.h
    trunk/SKPresentationOptionsSheetController.m
    trunk/SKReleaseNotesController.m
    trunk/SKRightSideViewController.m
    trunk/SKSnapshotWindow.m
    trunk/SKSnapshotWindowController.m
    trunk/SKTableView.m
    trunk/SKTextFieldSheetController.h
    trunk/SKTextFieldSheetController.m
    trunk/SKTextNoteEditor.m
    trunk/SKThumbnailView.m

Modified: trunk/NSColor_SKExtensions.h
===================================================================
--- trunk/NSColor_SKExtensions.h        2023-11-01 16:21:22 UTC (rev 13712)
+++ trunk/NSColor_SKExtensions.h        2023-11-01 18:12:46 UTC (rev 13713)
@@ -97,10 +97,3 @@
 - (NSString *)hexString;
 
 @end
-
-#if SDK_BEFORE(10_13)
-@interface NSColor (SKHighSierraDeclarations)
-+ (NSColor *)findHighlightColor;
-+ (NSColor *)separatorColor;
-@end
-#endif

Modified: trunk/NSColor_SKExtensions.m
===================================================================
--- trunk/NSColor_SKExtensions.m        2023-11-01 16:21:22 UTC (rev 13712)
+++ trunk/NSColor_SKExtensions.m        2023-11-01 18:12:46 UTC (rev 13713)
@@ -44,11 +44,6 @@
 
 @implementation NSColor (SKExtensions)
 
-+ (void)load {
-    SKAddClassMethodImplementationFromSelector(self, 
@selector(separatorColor), @selector(gridColor));
-    SKAddClassMethodImplementationFromSelector(self, 
@selector(findHighlightColor), @selector(yellowColor));
-}
-
 #pragma mark Note Highlight Colors
 
 static NSColor *activeSelectionHighlightColor = nil;

Modified: trunk/NSDocument_SKExtensions.m
===================================================================
--- trunk/NSDocument_SKExtensions.m     2023-11-01 16:21:22 UTC (rev 13712)
+++ trunk/NSDocument_SKExtensions.m     2023-11-01 18:12:46 UTC (rev 13713)
@@ -120,12 +120,10 @@
     if (window)
         [setup setObject:NSStringFromRect([window frame]) 
forKey:SKDocumentSetupWindowFrameKey];
     
-    if (RUNNING_AFTER(10_11)) {
-        NSArray *windows = [[NSApp orderedDocuments] 
valueForKey:@"mainWindow"];
-        NSString *tabs = [[self mainWindow] tabIndexesInWindows:windows];
-        if (tabs)
-            [setup setObject:tabs forKey:SKDocumentSetupTabsKey];
-    }
+    NSArray *windows = [[NSApp orderedDocuments] valueForKey:@"mainWindow"];
+    NSString *tabs = [[self mainWindow] tabIndexesInWindows:windows];
+    if (tabs)
+        [setup setObject:tabs forKey:SKDocumentSetupTabsKey];
     
     return setup;
 }

Modified: trunk/NSImage_SKExtensions.m
===================================================================
--- trunk/NSImage_SKExtensions.m        2023-11-01 16:21:22 UTC (rev 13712)
+++ trunk/NSImage_SKExtensions.m        2023-11-01 18:12:46 UTC (rev 13713)
@@ -291,15 +291,6 @@
 }
 
 - (id)initVectorWithSize:(NSSize)size drawingHandler:(void (^)(NSRect 
dstRect))drawingHandler {
-    if (RUNNING_BEFORE(10_11)) {
-        self = [self initWithSize:size];
-        if (self) {
-            [self lockFocus];
-            if (drawingHandler) drawingHandler((NSRect){NSZeroPoint, size});
-            [self unlockFocus];
-            return self;
-        }
-    }
     return [self initPDFWithSize:size drawingHandler:drawingHandler];
 }
 
@@ -315,19 +306,13 @@
     CGColorSpaceRelease(colorspace);
     CGFunctionRelease(function);
     NSImage *image = [[[NSImage alloc] initWithSize:NSMakeSize(24.0, 24.0)] 
autorelease];;
-    if (RUNNING_BEFORE(10_11)) {
-        [image lockFocus];
+    NSSize size = NSMakeSize(24.0, 24.0);
+    CGFloat scale;
+    void (^drawingHandler)(NSRect) = ^(NSRect rect){
         CGContextDrawShading([[NSGraphicsContext currentContext] CGContext], 
shading);
-        [image unlockFocus];
-    } else {
-        NSSize size = NSMakeSize(24.0, 24.0);
-        CGFloat scale;
-        void (^drawingHandler)(NSRect) = ^(NSRect rect){
-            CGContextDrawShading([[NSGraphicsContext currentContext] 
CGContext], shading);
-        };
-        for (scale = 1.0; scale <= 8.0; scale *= 2.0)
-            [image addRepresentation:[NSBitmapImageRep imageRepWithSize:size 
scale:scale drawingHandler:drawingHandler]];
-    }
+    };
+    for (scale = 1.0; scale <= 8.0; scale *= 2.0)
+        [image addRepresentation:[NSBitmapImageRep imageRepWithSize:size 
scale:scale drawingHandler:drawingHandler]];
     CGShadingRelease(shading);
     return image;
 }
@@ -1627,8 +1612,6 @@
 + (void)makeCursorImages {
     
     MAKE_VECTOR_IMAGE(SKImageNameResizeDiagonal45Cursor, NO, 16.0, 16.0,
-        if (RUNNING_BEFORE(10_11))
-            [[NSGraphicsContext currentContext] 
setImageInterpolation:NSImageInterpolationNone];
         [[NSGraphicsContext currentContext] setShouldAntialias:NO];
         [[NSColor whiteColor] setFill];
         NSBezierPath *path = [NSBezierPath bezierPath];
@@ -1652,8 +1635,7 @@
         [path lineToPoint:NSMakePoint(2.0, 9.5)];
         [path closePath];
         [NSGraphicsContext saveGraphicsState];
-        if (RUNNING_AFTER(10_11))
-            [NSShadow setShadowWithWhite:0.0 alpha:0.33333 blurRadius:1.0 
yOffset:-1.0];
+        [NSShadow setShadowWithWhite:0.0 alpha:0.33333 blurRadius:1.0 
yOffset:-1.0];
         [path fill];
         [NSGraphicsContext restoreGraphicsState];
         [[NSColor blackColor] setFill];
@@ -1678,12 +1660,9 @@
         [path lineToPoint:NSMakePoint(3.0, 7.0)];
         [path closePath];
         [path fill];
-        [[NSGraphicsContext currentContext] 
setImageInterpolation:NSImageInterpolationDefault];
     );
     
     MAKE_VECTOR_IMAGE(SKImageNameResizeDiagonal135Cursor, NO, 16.0, 16.0,
-        if (RUNNING_BEFORE(10_11))
-            [[NSGraphicsContext currentContext] 
setImageInterpolation:NSImageInterpolationNone];
         [[NSGraphicsContext currentContext] setShouldAntialias:NO];
         [[NSColor whiteColor] setFill];
         NSBezierPath *path = [NSBezierPath bezierPath];
@@ -1707,8 +1686,7 @@
         [path lineToPoint:NSMakePoint(6.5, 2.0)];
         [path closePath];
         [NSGraphicsContext saveGraphicsState];
-        if (RUNNING_AFTER(10_11))
-            [NSShadow setShadowWithWhite:0.0 alpha:0.33333 blurRadius:1.0 
yOffset:-1.0];
+        [NSShadow setShadowWithWhite:0.0 alpha:0.33333 blurRadius:1.0 
yOffset:-1.0];
         [path fill];
         [NSGraphicsContext restoreGraphicsState];
         [[NSColor blackColor] setFill];
@@ -1733,7 +1711,6 @@
         [path lineToPoint:NSMakePoint(9.0, 3.0)];
         [path closePath];
         [path fill];
-        [[NSGraphicsContext currentContext] 
setImageInterpolation:NSImageInterpolationDefault];
     );
     
     MAKE_VECTOR_IMAGE(SKImageNameZoomInCursor, NO, 18.0, 18.0,
@@ -1745,8 +1722,7 @@
         [path lineToPoint:NSMakePoint(9.5, 6.5)];
         [path closePath];
         [NSGraphicsContext saveGraphicsState];
-        if (RUNNING_AFTER(10_11))
-            [NSShadow setShadowWithWhite:0.0 alpha:0.33333 blurRadius:1.0 
yOffset:-1.0];
+        [NSShadow setShadowWithWhite:0.0 alpha:0.33333 blurRadius:1.0 
yOffset:-1.0];
         [path fill];
         [NSGraphicsContext restoreGraphicsState];
         [[NSColor blackColor] setStroke];
@@ -1776,8 +1752,7 @@
         [path lineToPoint:NSMakePoint(9.5, 6.5)];
         [path closePath];
         [NSGraphicsContext saveGraphicsState];
-        if (RUNNING_AFTER(10_11))
-            [NSShadow setShadowWithWhite:0.0 alpha:0.33333 blurRadius:1.0 
yOffset:-1.0];
+        [NSShadow setShadowWithWhite:0.0 alpha:0.33333 blurRadius:1.0 
yOffset:-1.0];
         [path fill];
         [NSGraphicsContext restoreGraphicsState];
         [[NSColor blackColor] setStroke];
@@ -1797,14 +1772,11 @@
     );
     
     MAKE_VECTOR_IMAGE(SKImageNameCameraCursor, NO, 18.0, 16.0,
-        if (RUNNING_BEFORE(10_11))
-            [[NSGraphicsContext currentContext] 
setImageInterpolation:NSImageInterpolationNone];
         [[NSColor whiteColor] set];
         NSBezierPath *path = [NSBezierPath bezierPathWithRect:NSMakeRect(1.0, 
2.0, 16.0, 11.0)];
         [path appendBezierPathWithOvalInRect:NSMakeRect(4.7, 6.7, 8.6, 8.6)];
         [NSGraphicsContext saveGraphicsState];
-        if (RUNNING_AFTER(10_11))
-            [NSShadow setShadowWithWhite:0.0 alpha:0.33333 blurRadius:1.0 
yOffset:-1.0];
+        [NSShadow setShadowWithWhite:0.0 alpha:0.33333 blurRadius:1.0 
yOffset:-1.0];
         [path fill];
         [NSGraphicsContext restoreGraphicsState];
         [[NSColor blackColor] set];
@@ -1817,7 +1789,6 @@
         [path appendBezierPathWithArcWithCenter:NSMakePoint(9.0, 8.0) 
radius:1.8 startAngle:45.0 endAngle:225.0];
         [path closePath];
         [path fill];
-        [[NSGraphicsContext currentContext] 
setImageInterpolation:NSImageInterpolationDefault];
     );
     
     NSSize size = [[[NSCursor openHandCursor] image] size];
@@ -1827,8 +1798,7 @@
     MAKE_VECTOR_IMAGE(SKImageNameOpenHandBarCursor, NO, 32.0, 32.0,
         [[NSColor blackColor] setFill];
         [NSGraphicsContext saveGraphicsState];
-        if (RUNNING_AFTER(10_11))
-            [NSShadow setShadowWithWhite:0.0 alpha:0.33333 blurRadius:1.0 
yOffset:-1.0];
+        [NSShadow setShadowWithWhite:0.0 alpha:0.33333 blurRadius:1.0 
yOffset:-1.0];
         [NSBezierPath fillRect:NSMakeRect(2.0, 14.0, 28.0, 4.0)];
         [NSGraphicsContext restoreGraphicsState];
         [[[NSCursor openHandCursor] image] drawInRect:NSMakeRect(0.0, 0.0, 
32.0, 32.0) fromRect:NSZeroRect operation:NSCompositingOperationSourceOver 
fraction:1.0];
@@ -1837,8 +1807,7 @@
     MAKE_VECTOR_IMAGE(SKImageNameClosedHandBarCursor, NO, 32.0, 32.0,
         [[NSColor blackColor] setFill];
         [NSGraphicsContext saveGraphicsState];
-        if (RUNNING_AFTER(10_11))
-            [NSShadow setShadowWithWhite:0.0 alpha:0.33333 blurRadius:1.0 
yOffset:-1.0];
+        [NSShadow setShadowWithWhite:0.0 alpha:0.33333 blurRadius:1.0 
yOffset:-1.0];
         [NSBezierPath fillRect:NSMakeRect(2.0, 14.0, 28.0, 4.0)];
         [NSGraphicsContext restoreGraphicsState];
         [[[NSCursor closedHandCursor] image] drawInRect:NSMakeRect(0.0, 0.0, 
32.0, 32.0) fromRect:NSZeroRect operation:NSCompositingOperationSourceOver 
fraction:1.0];
@@ -1962,8 +1931,7 @@
     [self makeNoteImages];
     [self makeToolbarImages];
     [self makeColoredToolbarImages];
-    if (RUNNING_AFTER(10_11))
-        [self makeTouchBarImages];
+    [self makeTouchBarImages];
     [self makeAdornImages];
     [self makeTextAlignImages];
     [self makeCursorImages];

Modified: trunk/NSView_SKExtensions.m
===================================================================
--- trunk/NSView_SKExtensions.m 2023-11-01 16:21:22 UTC (rev 13712)
+++ trunk/NSView_SKExtensions.m 2023-11-01 18:12:46 UTC (rev 13713)
@@ -41,12 +41,6 @@
 #import "SKFontWell.h"
 #import "SKStringConstants.h"
 
-#if SDK_BEFORE(10_12)
-@interface NSWorkSpace (BDSKSierraDeclarations)
-- (void)accessibilityDisplayShouldReduceMotion;
-@end
-#endif
-
 @implementation NSView (SKExtensions)
 
 - (id)descendantOfClass:(Class)aClass {
@@ -138,11 +132,8 @@
 + (BOOL)shouldShowSlideAnimation {
     if ([[NSUserDefaults standardUserDefaults] 
boolForKey:SKDisableAnimationsKey])
         return NO;
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored "-Wpartial-availability"
-    if (RUNNING_AFTER(10_12) && [[NSWorkspace sharedWorkspace] 
accessibilityDisplayShouldReduceMotion])
+    if ([[NSWorkspace sharedWorkspace] accessibilityDisplayShouldReduceMotion])
         return NO;
-#pragma clang diagnostic pop
     return YES;
 }
 

Modified: trunk/NSWindow_SKExtensions.m
===================================================================
--- trunk/NSWindow_SKExtensions.m       2023-11-01 16:21:22 UTC (rev 13712)
+++ trunk/NSWindow_SKExtensions.m       2023-11-01 18:12:46 UTC (rev 13713)
@@ -43,12 +43,11 @@
 @implementation NSWindow (SKExtensions)
 
 + (void)addTabs:(NSArray *)tabInfos forWindows:(NSArray *)windows {
-    if (RUNNING_BEFORE(10_12) || [windows count] < 2)
+    if ([windows count] < 2)
         return;
     // if windows are opened tabbed, first untab them
     for (NSWindow *window in windows) {
-        if ([window respondsToSelector:@selector(moveTabToNewWindow:)] &&
-            [[window tabbedWindows] count] > 1)
+        if ([[window tabbedWindows] count] > 1)
             [window moveTabToNewWindow:nil];
     }
     if ([windows count] == [tabInfos count])
@@ -106,41 +105,23 @@
                     [frontWindow addTabbedWindow:window ordered:NSWindowAbove];
             }
             // make sure we select the frontWindow, addTabbedWindow:ordered: 
sometimes changes it
-            if (RUNNING_AFTER(10_12))
-                [frontWindow setValue:frontWindow 
forKeyPath:@"tabGroup.selectedWindow"];
+            [frontWindow setValue:frontWindow 
forKeyPath:@"tabGroup.selectedWindow"];
         }
     }
 }
 
-static inline BOOL isWindowTabSelected(NSWindow *window, NSArray 
*tabbedWindows) {
-    if (RUNNING_AFTER(10_12))
-        return [window valueForKeyPath:@"tabGroup.selectedWindow"] == window;
-    if ([tabbedWindows count] > 1) {
-        NSArray *orderedWindows = [NSApp orderedWindows];
-        NSUInteger i = [orderedWindows indexOfObjectIdenticalTo:window];
-        for (NSWindow *tabbedWindow in tabbedWindows) {
-            NSUInteger j = [orderedWindows 
indexOfObjectIdenticalTo:tabbedWindow];
-            if (i > j)
-                return NO;
-        }
-    }
-    return YES;
-}
-
 - (NSString *)tabIndexesInWindows:(NSArray *)windows {
-    if (RUNNING_AFTER(10_11)) {
-        NSArray *tabbedWindows = [self tabbedWindows];
-        if ([tabbedWindows count] < 2) {
-            return [NSString stringWithFormat:@"(%lu)", (unsigned 
long)[windows indexOfObjectIdenticalTo:self]];
-        } else if (isWindowTabSelected(self, tabbedWindows)) {
-            NSMutableString *tabs = [NSMutableString string];
-            for (NSWindow *win in tabbedWindows) {
-                [tabs appendString:[tabs length] > 0 ? @", " : @"("];
-                [tabs appendFormat:@"%lu", (unsigned long)[windows 
indexOfObjectIdenticalTo:win]];
-            }
-            [tabs appendString:@")"];
-            return tabs;
+    NSArray *tabbedWindows = [self tabbedWindows];
+    if ([tabbedWindows count] < 2) {
+        return [NSString stringWithFormat:@"(%lu)", (unsigned long)[windows 
indexOfObjectIdenticalTo:self]];
+    } else if ([[self tabGroup] selectedWindow] == self) {
+        NSMutableString *tabs = [NSMutableString string];
+        for (NSWindow *win in tabbedWindows) {
+            [tabs appendString:[tabs length] > 0 ? @", " : @"("];
+            [tabs appendFormat:@"%lu", (unsigned long)[windows 
indexOfObjectIdenticalTo:win]];
         }
+        [tabs appendString:@")"];
+        return tabs;
     }
     return nil;
 }

Modified: trunk/PDFAnnotationInk_SKExtensions.m
===================================================================
--- trunk/PDFAnnotationInk_SKExtensions.m       2023-11-01 16:21:22 UTC (rev 
13712)
+++ trunk/PDFAnnotationInk_SKExtensions.m       2023-11-01 18:12:46 UTC (rev 
13713)
@@ -55,51 +55,11 @@
 NSString *SKPDFAnnotationBezierPathsKey = @"bezierPaths";
 NSString *SKPDFAnnotationScriptingPointListsKey = @"scriptingPointLists";
 
-#if SDK_BEFORE(10_12)
-@interface PDFAnnotation (SKSierraDeclarations)
-// before 10.12 this was a private method, called by drawWithBox:
-- (void)drawWithBox:(PDFDisplayBox)box inContext:(CGContextRef)context;
-@end
-#endif
-
 @implementation PDFAnnotationInk (SKExtensions)
 
-static void (*original_drawWithBox_inContext)(id, SEL, PDFDisplayBox, 
CGContextRef) = NULL;
-
-- (void)replacement_drawWithBox:(PDFDisplayBox)box 
inContext:(CGContextRef)context {
-    if ([self hasAppearanceStream]) {
-        original_drawWithBox_inContext(self, _cmd, box, context);
-    } else {
-        CGContextSaveGState(context);
-        [[self page] transformContext:context forBox:box];
-        CGContextTranslateCTM(context, NSMinX([self bounds]), NSMinY([self 
bounds]));
-        CGContextSetStrokeColorWithColor(context, [[self color] CGColor]);
-        CGContextSetLineWidth(context, [self lineWidth]);
-        CGContextSetLineJoin(context, kCGLineJoinRound);
-        if ([self borderStyle] == kPDFBorderStyleDashed) {
-            NSArray *dashPattern = [self dashPattern];
-            NSUInteger i, count = [dashPattern count];
-            CGFloat dash[count];
-            for (i = 0; i < count; i++)
-                dash[i] = [[dashPattern objectAtIndex:i] doubleValue];
-            CGContextSetLineDash(context, 0.0, dash, count);
-            CGContextSetLineCap(context, kCGLineCapButt);
-        } else {
-            CGContextSetLineCap(context, kCGLineCapRound);
-        }
-        CGContextBeginPath(context);
-        for (NSBezierPath *path in [self paths])
-            CGContextAddPath(context, [path CGPath]);
-        CGContextStrokePath(context);
-        CGContextRestoreGState(context);
-    }
-}
-
 static CGAffineTransform (*CGContextGetBaseCTM_func)(CGContextRef) = NULL;
 
 + (void)load {
-    if (RUNNING(10_11))
-        original_drawWithBox_inContext = (void (*)(id, SEL, PDFDisplayBox, 
CGContextRef))SKReplaceInstanceMethodImplementationFromSelector(self, 
@selector(drawWithBox:inContext:), 
@selector(replacement_drawWithBox:inContext:));
     CGContextGetBaseCTM_func = 
(typeof(CGContextGetBaseCTM_func))CFBundleGetFunctionPointerForName(CFBundleGetBundleWithIdentifier(CFSTR("com.apple.CoreGraphics")),
 CFSTR("CGContextGetBaseCTM"));
 }
 

Modified: trunk/PDFAnnotationLine_SKExtensions.m
===================================================================
--- trunk/PDFAnnotationLine_SKExtensions.m      2023-11-01 16:21:22 UTC (rev 
13712)
+++ trunk/PDFAnnotationLine_SKExtensions.m      2023-11-01 18:12:46 UTC (rev 
13713)
@@ -60,16 +60,8 @@
 NSString *SKPDFAnnotationScriptingStartLineStyleKey = 
@"scriptingStartLineStyle";
 NSString *SKPDFAnnotationScriptingEndLineStyleKey = @"scriptingEndLineStyle";
 
-#if SDK_BEFORE(10_12)
-@interface PDFAnnotation (SKSierraDeclarations)
-// before 10.12 this was a private method, called by drawWithBox:
-- (void)drawWithBox:(PDFDisplayBox)box inContext:(CGContextRef)context;
-@end
-#endif
-
 @implementation PDFAnnotationLine (SKExtensions)
 
-static void (*original_drawWithBox_inContext)(id, SEL, PDFDisplayBox, 
CGContextRef) = NULL;
 static void (*original_setBounds)(id, SEL, NSRect) = NULL;
 
 static inline void addLineTipToPath(CGMutablePathRef path, NSPoint point, 
CGFloat angle, PDFLineStyle lineStyle, CGFloat lineWidth) {
@@ -104,46 +96,6 @@
     }
 }
 
-- (void)replacement_drawWithBox:(PDFDisplayBox)box 
inContext:(CGContextRef)context {
-    if ([self hasAppearanceStream]) {
-        original_drawWithBox_inContext(self, _cmd, box, context);
-    } else {
-        NSPoint origin = [self bounds].origin;
-        NSPoint startPoint = SKAddPoints(origin, [self startPoint]);
-        NSPoint endPoint = SKAddPoints(origin, [self endPoint]);
-        CGFloat angle = atan2(endPoint.y - startPoint.y, endPoint.x - 
startPoint.x);
-        CGFloat lineWidth = [self lineWidth];
-        CGMutablePathRef path = CGPathCreateMutable();
-        CGContextSaveGState(context);
-        [[self page] transformContext:context forBox:box];
-        CGContextSetStrokeColorWithColor(context, [[self color] CGColor]);
-        CGContextSetLineWidth(context, lineWidth);
-        CGContextSetLineJoin(context, kCGLineJoinRound);
-        if ([self borderStyle] == kPDFBorderStyleDashed) {
-            NSArray *dashPattern = [self dashPattern];
-            NSInteger i, count = [dashPattern count];
-            CGFloat dash[count];
-            for (i = 0; i < count; i++)
-                dash[i] = [[dashPattern objectAtIndex:i] doubleValue];
-            CGContextSetLineDash(context, 0.0, dash, count);
-            CGContextSetLineCap(context, kCGLineCapButt);
-        } else {
-            CGContextSetLineCap(context, kCGLineCapRound);
-        }
-        CGPathMoveToPoint(path, NULL, startPoint.x, startPoint.y);
-        CGPathAddLineToPoint(path, NULL, endPoint.x, endPoint.y);
-        if ([self startLineStyle] != kPDFLineStyleNone)
-            addLineTipToPath(path, startPoint, angle + M_PI, [self 
startLineStyle], lineWidth);
-        if ([self endLineStyle] != kPDFLineStyleNone)
-            addLineTipToPath(path, endPoint, angle, [self endLineStyle], 
lineWidth);
-        CGContextBeginPath(context);
-        CGContextAddPath(context, path);
-        CGPathRelease(path);
-        CGContextStrokePath(context);
-        CGContextRestoreGState(context);
-    }
-}
-
 - (void)replacement_setBounds:(NSRect)newBounds {
     NSPoint startPoint = [self startPoint];
     NSPoint endPoint = [self endPoint];
@@ -153,8 +105,6 @@
 }
 
 + (void)load {
-    if (RUNNING(10_11))
-        original_drawWithBox_inContext = (void (*)(id, SEL, PDFDisplayBox, 
CGContextRef))SKReplaceInstanceMethodImplementationFromSelector(self, 
@selector(drawWithBox:inContext:), 
@selector(replacement_drawWithBox:inContext:));
     if (RUNNING(10_13))
         original_setBounds = (void (*)(id, SEL, 
NSRect))SKReplaceInstanceMethodImplementationFromSelector(self, 
@selector(setBounds:), @selector(replacement_setBounds:));
 }

Modified: trunk/PDFAnnotation_SKExtensions.m
===================================================================
--- trunk/PDFAnnotation_SKExtensions.m  2023-11-01 16:21:22 UTC (rev 13712)
+++ trunk/PDFAnnotation_SKExtensions.m  2023-11-01 18:12:46 UTC (rev 13713)
@@ -102,12 +102,7 @@
 - (NSColor *)fallback_interiorColor { return nil; }
 
 - (NSString *)fallback_fieldName {
-    if ([[self type] isEqualToString:SKNWidgetString] && [self 
respondsToSelector:@selector(valueForAnnotationKey:)])
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored "-Wpartial-availability"
-        return [self valueForAnnotationKey:@"/T"];
-#pragma clang diagnostic pop
-    return nil;
+    return [self valueForAnnotationKey:@"/T"];
 }
 
 + (void)load {
@@ -449,42 +444,20 @@
 - (PDFSelection *)selection { return nil; }
 
 - (id)objectValue {
-    if ([[self type] isEqualToString:SKNWidgetString]) {
-        if ([self widgetType] == kSKNPDFWidgetTypeButton) {
-            if ([self respondsToSelector:@selector(buttonWidgetState)])
-                return [NSNumber numberWithInteger:[self buttonWidgetState]];
-            else if ([self 
respondsToSelector:@selector(valueForAnnotationKey:)])
-                return [NSNumber numberWithInteger:[[self 
valueForAnnotationKey:@"/V"] isEqual:@"Off"] ? 0 : 1];
-        } else {
-            if ([self respondsToSelector:@selector(widgetStringValue)])
-                return [self widgetStringValue];
-            else if ([self 
respondsToSelector:@selector(valueForAnnotationKey:)])
-                return [self valueForAnnotationKey:@"/V"];
-        }
-        return nil;
-    } else {
+    if ([[self type] isEqualToString:SKNWidgetString] == NO)
         return [self string];
-    }
+    else if ([self widgetType] == kSKNPDFWidgetTypeButton)
+        return [NSNumber numberWithInteger:[self buttonWidgetState]];
+    else
+        return [self widgetStringValue];
 }
 
 - (void)setObjectValue:(id)newObjectValue {
     if ([[self type] isEqualToString:SKNWidgetString]) {
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored "-Wpartial-availability"
-        if ([self widgetType] == kSKNPDFWidgetTypeButton) {
-            if ([self respondsToSelector:@selector(setButtonWidgetState:)])
-                [self setButtonWidgetState:[newObjectValue integerValue]];
-            else if ([self 
respondsToSelector:@selector(setValue:forAnnotationKey:)])
-                [self setValue:[newObjectValue integerValue] == 0 ? @"Off" : 
@"Yes" forAnnotationKey:@"/V"];
-        } else {
-            if ([self respondsToSelector:@selector(setWidgetStringValue:)])
-                [self setWidgetStringValue:newObjectValue];
-            else if ([newObjectValue isKindOfClass:[NSString class]] && [self 
respondsToSelector:@selector(setValue:forAnnotationKey:)])
-                [self setValue:newObjectValue forAnnotationKey:@"/V"];
-            else if ([self 
respondsToSelector:@selector(removeValueForAnnotationKey:)])
-                [self removeValueForAnnotationKey:@"/V"];
-        }
-#pragma clang diagnostic pop
+        if ([self widgetType] == kSKNPDFWidgetTypeButton)
+            [self setButtonWidgetState:[newObjectValue integerValue]];
+        else
+            [self setWidgetStringValue:newObjectValue];
     } else if ([newObjectValue isKindOfClass:[NSString class]]) {
         [self setString:newObjectValue];
     }
@@ -492,18 +465,13 @@
 
 - (SKNPDFWidgetType)widgetType {
     if ([[self type] isEqualToString:SKNWidgetString]) {
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored "-Wpartial-availability"
-        if ([self respondsToSelector:@selector(valueForAnnotationKey:)]) {
-            NSString *ft = [self valueForAnnotationKey:@"/FT"];
-            if ([ft isEqualToString:@"/Tx"])
-                return kSKNPDFWidgetTypeText;
-            else if ([ft isEqualToString:@"/Btn"])
-                return kSKNPDFWidgetTypeButton;
-            else if ([ft isEqualToString:@"/Ch"])
-                return kSKNPDFWidgetTypeChoice;
-        }
-#pragma clang diagnostic pop
+        NSString *ft = [self valueForAnnotationKey:@"/FT"];
+        if ([ft isEqualToString:@"/Tx"])
+            return kSKNPDFWidgetTypeText;
+        else if ([ft isEqualToString:@"/Btn"])
+            return kSKNPDFWidgetTypeButton;
+        else if ([ft isEqualToString:@"/Ch"])
+            return kSKNPDFWidgetTypeChoice;
     }
     return kSKNPDFWidgetTypeUnknown;
 }

Modified: trunk/PDFDestination_SKExtensions.m
===================================================================
--- trunk/PDFDestination_SKExtensions.m 2023-11-01 16:21:22 UTC (rev 13712)
+++ trunk/PDFDestination_SKExtensions.m 2023-11-01 18:12:46 UTC (rev 13713)
@@ -40,9 +40,6 @@
 #import "PDFPage_SKExtensions.h"
 #import "PDFView_SKExtensions.h"
 
-// don't use the constant, which is only defined on 10.13+
-#define kPDFDestinationUnspecifiedValue FLT_MAX
-
 @implementation PDFDestination (SKExtensions)
 
 - (PDFDestination *)effectiveDestinationForView:(PDFView *)pdfView {
@@ -58,7 +55,7 @@
         if ((rotation % 180) != 0)
             size = NSMakeSize(size.height, size.width);
         // the -type property always returns 0, and not the value from the ivar
-        @try { type = [[self valueForKeyPath:RUNNING_BEFORE(10_12) ? 
@"_pdfPriv.type" : @"_private.type"] integerValue]; }
+        @try { type = [[self valueForKeyPath:@"_private.type"] integerValue]; }
         @catch (id e) {}
         switch (type) {
             case 0:
@@ -73,7 +70,7 @@
                 break;
             case 2: // FitH
                 bounds = pdfView ? [pdfView layoutBoundsForPage:page] : [page 
boundsForBox:kPDFDisplayBoxCropBox];
-                @try { point.y = [[self valueForKeyPath:RUNNING_BEFORE(10_12) 
? @"_pdfPriv.top" : @"_private.top"] doubleValue]; }
+                @try { point.y = [[self valueForKeyPath:@"_private.top"] 
doubleValue]; }
                 @catch (id e) { override = NO; }
                 if (override && pdfView && NSIsEmptyRect(bounds) == NO)
                     zoomX = zoomY = size.width / NSWidth(bounds);
@@ -85,7 +82,7 @@
                 break;
             case 3: // FitV
                 bounds = pdfView ? [pdfView layoutBoundsForPage:page] : [page 
boundsForBox:kPDFDisplayBoxCropBox];
-                @try { point.x = [[self valueForKeyPath:RUNNING_BEFORE(10_12) 
? @"_pdfPriv.left" : @"_private.left"] doubleValue]; }
+                @try { point.x = [[self valueForKeyPath:@"_private.left"] 
doubleValue]; }
                 @catch (id e) { override = NO; }
                 if (override && pdfView && NSIsEmptyRect(bounds) == NO)
                     zoomX = zoomY = size.height / NSHeight(bounds);
@@ -97,13 +94,13 @@
                 break;
             case 4: // FitR
             {
-                @try { bounds.origin.x = [[self 
valueForKeyPath:RUNNING_BEFORE(10_12) ? @"_pdfPriv.left" : @"_private.left"] 
doubleValue]; }
+                @try { bounds.origin.x = [[self valueForKeyPath: 
@"_private.left"] doubleValue]; }
                 @catch (id e) { override = NO; }
-                @try { bounds.origin.y = [[self 
valueForKeyPath:RUNNING_BEFORE(10_12) ? @"_pdfPriv.bottom" : 
@"_private.bottom"] doubleValue]; }
+                @try { bounds.origin.y = [[self 
valueForKeyPath:@"_private.bottom"] doubleValue]; }
                 @catch (id e) { override = NO; }
-                @try { bounds.size.width = [[self 
valueForKeyPath:RUNNING_BEFORE(10_12) ? @"_pdfPriv.right" : @"_private.right"] 
doubleValue] - NSMinX(bounds); }
+                @try { bounds.size.width = [[self 
valueForKeyPath:@"_private.right"] doubleValue] - NSMinX(bounds); }
                 @catch (id e) { override = NO; }
-                @try { bounds.size.height = [[self 
valueForKeyPath:RUNNING_BEFORE(10_12) ? @"_pdfPriv.top" : @"_private.top"] 
doubleValue] - NSMinY(bounds); }
+                @try { bounds.size.height = [[self 
valueForKeyPath:@"_private.top"] doubleValue] - NSMinY(bounds); }
                 @catch (id e) { override = NO; }
                 if (override && pdfView && NSIsEmptyRect(bounds) == NO) {
                     zoomX = size.width / NSWidth(bounds);
@@ -120,7 +117,7 @@
                 break;
             case 6: // FitBH
                 bounds = [page boundingBox];
-                @try { point.y = [[self valueForKeyPath:RUNNING_BEFORE(10_12) 
? @"_pdfPriv.top" : @"_private.top"] doubleValue]; }
+                @try { point.y = [[self valueForKeyPath:@"_private.top"] 
doubleValue]; }
                 @catch (id e) { override = NO; }
                 if (override && pdfView && NSIsEmptyRect(bounds) == NO)
                     zoomX = zoomY = size.width / NSWidth(bounds);
@@ -132,7 +129,7 @@
                 break;
             case 7: // FitBV
                 bounds = [page boundingBox];
-                @try { point.x = [[self valueForKeyPath:RUNNING_BEFORE(10_12) 
? @"_pdfPriv.left" : @"_private.left"] doubleValue]; }
+                @try { point.x = [[self valueForKeyPath:@"_private.left"] 
doubleValue]; }
                 @catch (id e) { override = NO; }
                 if (override && pdfView && NSIsEmptyRect(bounds) == NO)
                     zoomX = zoomY = size.height / NSHeight(bounds);

Modified: trunk/PDFDocumentView_SKExtensions.m
===================================================================
--- trunk/PDFDocumentView_SKExtensions.m        2023-11-01 16:21:22 UTC (rev 
13712)
+++ trunk/PDFDocumentView_SKExtensions.m        2023-11-01 18:12:46 UTC (rev 
13713)
@@ -147,7 +147,7 @@
     if (PDFPageViewClass)
         original_menuForEvent = (id (*)(id, SEL, 
id))SKReplaceInstanceMethodImplementation(PDFPageViewClass, 
@selector(menuForEvent:), (IMP)replacement_menuForEvent);
     
-    Class PDFDocumentViewClass = RUNNING_BEFORE(10_12) ? 
NSClassFromString(@"PDFDisplayView") : NSClassFromString(@"PDFDocumentView");
+    Class PDFDocumentViewClass = NSClassFromString(@"PDFDocumentView");
     if (PDFDocumentViewClass == Nil)
         return;
 
@@ -173,9 +173,6 @@
 }
 
 void SKSwizzlePDFAccessibilityNodeAnnotationMethods() {
-    if (RUNNING_BEFORE(10_13))
-        return;
-    
     Class PDFAccessibilityNodeAnnotationClass = 
NSClassFromString(@"PDFAccessibilityNodeAnnotation");
     
     if (PDFAccessibilityNodeAnnotationClass == Nil || 
[PDFAccessibilityNodeAnnotationClass 
instancesRespondToSelector:@selector(annotation)] == NO)

Modified: trunk/PDFDocument_SKExtensions.m
===================================================================
--- trunk/PDFDocument_SKExtensions.m    2023-11-01 16:21:22 UTC (rev 13712)
+++ trunk/PDFDocument_SKExtensions.m    2023-11-01 18:12:46 UTC (rev 13713)
@@ -54,14 +54,6 @@
 NSString *SKPDFDocumentPageKey = @"page";
 NSString *SKPDFDocumentOldPageKey = @"oldPage";
 
-#if SDK_BEFORE(10_13)
-
-@interface PDFDocument (SKHighSierraDeclarations)
-- (BOOL)allowsCommenting;
-@end
-
-#endif
-
 @implementation PDFDocument (SKExtensions)
 
 - (NSUInteger)countByEnumeratingWithState:(NSFastEnumerationState *)state 
objects:(id *)stackbuf count:(NSUInteger)len {
@@ -283,12 +275,11 @@
 #pragma clang diagnostic ignored "-Wpartial-availability"
 
 - (BOOL)allowsNotes {
-    return [self isLocked] == NO &&
-    ([self respondsToSelector:@selector(allowsCommenting)] == NO || [self 
allowsCommenting]);
+    return [self isLocked] == NO && [self allowsCommenting];
 }
 
 - (BOOL)realAllowsCommenting {
-    return [self respondsToSelector:@selector(allowsCommenting)] == NO || 
[self allowsCommenting];
+    return [self allowsCommenting];
 }
 
 #pragma clang diagnostic pop
@@ -319,8 +310,6 @@
     NSDictionary *userInfo = @{SKPDFDocumentAnnotationKey:annotation, 
SKPDFDocumentPageKey:page};
     [[NSNotificationCenter defaultCenter] 
postNotificationName:SKPDFDocumentWillRemoveAnnotationNotification object:self 
userInfo:userInfo];
     [page removeAnnotation:annotation];
-    if (RUNNING(10_12) && [annotation isNote] && [[page annotations] 
containsObject:annotation])
-        [page removeAnnotation:annotation];
     [[NSNotificationCenter defaultCenter] 
postNotificationName:SKPDFDocumentDidRemoveAnnotationNotification object:self 
userInfo:userInfo];
 }
 
@@ -329,8 +318,6 @@
     NSDictionary *userInfo = @{SKPDFDocumentAnnotationKey:annotation, 
SKPDFDocumentPageKey:page, SKPDFDocumentOldPageKey:oldPage};
     [[NSNotificationCenter defaultCenter] 
postNotificationName:SKPDFDocumentWillMoveAnnotationNotification object:self 
userInfo:userInfo];
     [oldPage removeAnnotation:annotation];
-    if (RUNNING(10_12) && [annotation isNote] && [[oldPage annotations] 
containsObject:annotation])
-        [oldPage removeAnnotation:annotation];
     [page addAnnotation:annotation];
     [[NSNotificationCenter defaultCenter] 
postNotificationName:SKPDFDocumentDidMoveAnnotationNotification object:self 
userInfo:userInfo];
 }

Modified: trunk/PDFOutline_SKExtensions.h
===================================================================
--- trunk/PDFOutline_SKExtensions.h     2023-11-01 16:21:22 UTC (rev 13712)
+++ trunk/PDFOutline_SKExtensions.h     2023-11-01 18:12:46 UTC (rev 13713)
@@ -51,8 +51,6 @@
 
 - (void)pageLabelDidUpdate;
 
-- (void)clearDocument;
-
 - (NSScriptObjectSpecifier *)objectSpecifier;
 - (PDFOutline *)scriptingParent;
 - (NSArray *)entireContents;

Modified: trunk/PDFOutline_SKExtensions.m
===================================================================
--- trunk/PDFOutline_SKExtensions.m     2023-11-01 16:21:22 UTC (rev 13712)
+++ trunk/PDFOutline_SKExtensions.m     2023-11-01 18:12:46 UTC (rev 13713)
@@ -86,16 +86,6 @@
         [[self childAtIndex:i] pageLabelDidUpdate];
 }
 
-// on 10.12 the document is not weakly linked, so we need to clear it to avoid 
a retain cycle
-- (void)clearDocument {
-    if ([self respondsToSelector:@selector(setDocument:)] == NO || 
RUNNING(10_12) == NO)
-        return;
-    NSUInteger i, iMax = [self numberOfChildren];
-    for (i = 0; i < iMax; i++)
-         [[self childAtIndex:i] clearDocument];
-    [self setDocument:nil];
-}
-
 - (NSScriptObjectSpecifier *)objectSpecifier {
     NSUInteger idx = [self index];
     if (idx != NSNotFound) {

Modified: trunk/PDFPage_SKExtensions.m
===================================================================
--- trunk/PDFPage_SKExtensions.m        2023-11-01 16:21:22 UTC (rev 13712)
+++ trunk/PDFPage_SKExtensions.m        2023-11-01 18:12:46 UTC (rev 13713)
@@ -279,13 +279,8 @@
     NSData *data = nil;
     PDFPage *page = [self copy];
     
-    if (RUNNING(10_11)) {
-        // on 10.11 the media box is shifted back to the origin without the 
contents being shifted
-        [page setBounds:rect forBox:kPDFDisplayBoxCropBox];
-    } else {
-        [page setBounds:rect forBox:kPDFDisplayBoxMediaBox];
-        [page setBounds:NSZeroRect forBox:kPDFDisplayBoxCropBox];
-    }
+    [page setBounds:rect forBox:kPDFDisplayBoxMediaBox];
+    [page setBounds:NSZeroRect forBox:kPDFDisplayBoxCropBox];
     [page setBounds:NSZeroRect forBox:kPDFDisplayBoxBleedBox];
     [page setBounds:NSZeroRect forBox:kPDFDisplayBoxTrimBox];
     [page setBounds:NSZeroRect forBox:kPDFDisplayBoxArtBox];

Modified: trunk/PDFView_SKExtensions.h
===================================================================
--- trunk/PDFView_SKExtensions.h        2023-11-01 16:21:22 UTC (rev 13712)
+++ trunk/PDFView_SKExtensions.h        2023-11-01 18:12:46 UTC (rev 13713)
@@ -44,8 +44,6 @@
 @property (nonatomic) CGFloat physicalScaleFactor;
 @property (nonatomic, readonly) NSScrollView *scrollView;
 @property (nonatomic, readonly) NSArray *displayedPages;
-@property (nonatomic, readonly) CGFloat minimumScaleFactor;
-@property (nonatomic, readonly) CGFloat maximumScaleFactor;
 @property (nonatomic, readonly) NSRect visibleContentRect;
 
 - (BOOL)isPageAtIndexDisplayed:(NSUInteger)pageIndex;

Modified: trunk/PDFView_SKExtensions.m
===================================================================
--- trunk/PDFView_SKExtensions.m        2023-11-01 16:21:22 UTC (rev 13712)
+++ trunk/PDFView_SKExtensions.m        2023-11-01 18:12:46 UTC (rev 13713)
@@ -53,22 +53,6 @@
 #import "NSResponder_SKExtensions.h"
 
 
-#if SDK_BEFORE(10_13)
-
-typedef NS_ENUM(NSInteger, PDFDisplayDirection) {
-    kPDFDisplayDirectionVertical = 0,
-    kPDFDisplayDirectionHorizontal = 1,
-};
-
-@interface PDFView (SKHighSierraDeclarations)
-- (CGFloat)minScaleFactor;
-- (CGFloat)maxScaleFactor;
-@property (nonatomic) PDFDisplayDirection displayDirection;
-@property (nonatomic) NSEdgeInsets pageBreakMargins;
-@end
-
-#endif
-
 @interface PDFView (SKPrivatePageViewDeclarations)
 - (id)pageViewForPageAtIndex:(NSUInteger)index;
 @end
@@ -83,7 +67,7 @@
 
 @implementation PDFView (SKExtensions)
 
-@dynamic physicalScaleFactor, scrollView, displayedPages, minimumScaleFactor, 
maximumScaleFactor, visibleContentRect, drawsActiveSelections;
+@dynamic physicalScaleFactor, scrollView, displayedPages, visibleContentRect, 
drawsActiveSelections;
 
 static inline CGFloat physicalScaleFactorForView(NSView *view) {
     NSScreen *screen = [[view window] screen];
@@ -121,13 +105,10 @@
 
 - (void)setNeedsDisplayInRect:(NSRect)rect ofPage:(PDFPage *)page {
     if ([self isPageAtIndexDisplayed:[page pageIndex]]) {
-        // for some versions we need to dirty the documentView, otherwise it 
won't redisplay when scrolled out of view,
-        // for 10.12 dirtying the documentView dioes not do anything
-        NSView *view = RUNNING_BEFORE(10_12) ? [self documentView] : self;
         rect = NSIntegralRect([self convertRect:NSInsetRect(rect, -1.0, -1.0) 
fromPage:page]);
-        rect = NSIntersectionRect([view bounds], [self convertRect:rect 
toView:view]);
+        rect = NSIntersectionRect([self bounds], [self convertRect:rect 
toView:self]);
         if (NSIsEmptyRect(rect) == NO)
-            [view setNeedsDisplayInRect:rect];
+            [self setNeedsDisplayInRect:rect];
     }
 }
 
@@ -144,8 +125,7 @@
 }
 
 - (void)requiresDisplay {
-    NSView *view = RUNNING_BEFORE(10_12) ? [self documentView] : self;
-    [view setNeedsDisplay:YES];
+    [self setNeedsDisplay:YES];
 }
 
 - (void)setNeedsDisplayForAddedAnnotation:(PDFAnnotation *)annotation 
onPage:(PDFPage *)page {
@@ -303,15 +283,6 @@
     return displayedPages;
 }
 
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored "-Wpartial-availability"
-
-- (CGFloat)minimumScaleFactor {
-    if ([self respondsToSelector:@selector(minScaleFactor)])
-        return [self minScaleFactor];
-    return 0.1;
-}
-
 - (NSRect)visibleContentRect {
     NSScrollView *scrollView = [self scrollView];
     NSView *clipView = [scrollView contentView];
@@ -323,55 +294,38 @@
 - (NSRect)layoutBoundsForPage:(PDFPage *)page {
     NSRect pageRect = [page boundsForBox:[self displayBox]];
     if ([self displaysPageBreaks]) {
-        if (RUNNING_BEFORE(10_13)) {
-            pageRect = NSInsetRect(pageRect, -PAGE_BREAK_MARGIN, 
-PAGE_BREAK_MARGIN);
-        } else {
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored "-Wpartial-availability"
-            NSEdgeInsets margins = [self pageBreakMargins];
-#pragma clang diagnostic pop
-            switch ([page rotation]) {
-                case 0:
-                    pageRect = NSInsetRect(pageRect, -margins.left, 
-margins.bottom);
-                    pageRect.size.width += margins.right - margins.left;
-                    pageRect.size.height += margins.top - margins.bottom;
-                    break;
-                case 90:
-                    pageRect = NSInsetRect(pageRect, -margins.top, 
-margins.left);
-                    pageRect.size.width += margins.bottom - margins.top;
-                    pageRect.size.height += margins.right - margins.left;
-                    break;
-                case 180:
-                    pageRect = NSInsetRect(pageRect, -margins.right, 
-margins.top);
-                    pageRect.size.width += margins.left - margins.right;
-                    pageRect.size.height += margins.bottom - margins.top;
-                    break;
-                case 270:
-                    pageRect = NSInsetRect(pageRect, -margins.bottom, 
-margins.right);
-                    pageRect.size.width += margins.top - margins.bottom;
-                    pageRect.size.height += margins.left - margins.right;
-                    break;
-            }
+        NSEdgeInsets margins = [self pageBreakMargins];
+        switch ([page rotation]) {
+            case 0:
+                pageRect = NSInsetRect(pageRect, -margins.left, 
-margins.bottom);
+                pageRect.size.width += margins.right - margins.left;
+                pageRect.size.height += margins.top - margins.bottom;
+                break;
+            case 90:
+                pageRect = NSInsetRect(pageRect, -margins.top, -margins.left);
+                pageRect.size.width += margins.bottom - margins.top;
+                pageRect.size.height += margins.right - margins.left;
+                break;
+            case 180:
+                pageRect = NSInsetRect(pageRect, -margins.right, -margins.top);
+                pageRect.size.width += margins.left - margins.right;
+                pageRect.size.height += margins.bottom - margins.top;
+                break;
+            case 270:
+                pageRect = NSInsetRect(pageRect, -margins.bottom, 
-margins.right);
+                pageRect.size.width += margins.top - margins.bottom;
+                pageRect.size.height += margins.left - margins.right;
+                break;
         }
     }
     return pageRect;
 }
 
-- (CGFloat)maximumScaleFactor {
-    if ([self respondsToSelector:@selector(maxScaleFactor)])
-        return [self maxScaleFactor];
-    return 20.0;
-}
-
-#pragma clang diagnostic pop
-
 - (BOOL)drawsActiveSelections {
     if (RUNNING_AFTER(10_14))
         return [[self window] isKeyWindow];
-    else if (RUNNING_AFTER(10_11))
+    else
         return YES;
-    else
-        return ([[self window] isKeyWindow] && [[[self window] firstResponder] 
isDescendantOf:self]);
 }
 
 static NSColor *defaultBackgroundColor(NSString *backgroundColorKey, NSString 
*darkBackgroundColorKey) {

Modified: trunk/SKApplicationController.m
===================================================================
--- trunk/SKApplicationController.m     2023-11-01 16:21:22 UTC (rev 13712)
+++ trunk/SKApplicationController.m     2023-11-01 18:12:46 UTC (rev 13713)
@@ -111,12 +111,6 @@
 
 NSString *SKPageLabelsChangedNotification = @"SKPageLabelsChangedNotification";
 
-#if SDK_BEFORE(10_12)
-@interface NSApplication (SKSierraDeclarations)
-@property (getter=isAutomaticCustomizeTouchBarMenuItemEnabled) BOOL 
automaticCustomizeTouchBarMenuItemEnabled;
-@end
-#endif
-
 @interface SKApplicationController (SKPrivate)
 - (void)handleGetURLEvent:(NSAppleEventDescriptor *)event 
withReplyEvent:(NSAppleEventDescriptor *)replyEvent;
 @end
@@ -152,14 +146,6 @@
     
     // Set the initial values in the shared user defaults controller 
     [[NSUserDefaultsController sharedUserDefaultsController] 
setInitialValues:[initialValuesDict 
dictionaryWithValuesForKeys:resettableUserDefaultsKeys]];
-    
-    if (RUNNING(10_11)) {
-        // Disable ATS on El Capitan, as forwarding is blocked, even if it is 
an htpps address
-        @try{
-            [(NSMutableDictionary *)[[NSBundle mainBundle] infoDictionary] 
setObject:@{@"NSAllowsArbitraryLoads":@YES} forKey:@"NSAppTransportSecurity"];
-        }
-        @catch(id e) {}
-    }
 }
 
 - (void)awakeFromNib {
@@ -169,15 +155,6 @@
             [menuItem setIndentationLevel:1];
     }
     
-    // horizontal layout is currently buggy, so don't support it
-    if (RUNNING_BEFORE(10_13)) {
-        menu = [[[[[NSApp mainMenu] itemAtIndex:PDF_MENU_INDEX] submenu] 
itemAtIndex:0] submenu];
-        for (NSMenuItem *menuItem in [menu itemArray]) {
-            if (([menuItem action] == @selector(changeDisplayMode:) && 
[menuItem tag] == 4) || [menuItem action] == @selector(toggleDisplaysRTL:))
-                [menuItem setHidden:YES];
-        }
-    }
-    
     // this creates the script menu if needed
     (void)[NSApp scriptMenu];
 }
@@ -270,11 +247,7 @@
     
     [[NSColorPanel sharedColorPanel] setShowsAlpha:YES];
     
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored "-Wpartial-availability"
-    if ([NSApp 
respondsToSelector:@selector(setAutomaticCustomizeTouchBarMenuItemEnabled:)])
-        [NSApp setAutomaticCustomizeTouchBarMenuItemEnabled:YES];
-#pragma clang diagnostic pop
+    [NSApp setAutomaticCustomizeTouchBarMenuItemEnabled:YES];
 }
 
 // we don't want to reopen last open files when re-activating the app

Modified: trunk/SKBasePDFView.m
===================================================================
--- trunk/SKBasePDFView.m       2023-11-01 16:21:22 UTC (rev 13712)
+++ trunk/SKBasePDFView.m       2023-11-01 18:12:46 UTC (rev 13713)
@@ -53,29 +53,7 @@
 // don't use the constant, which is only defined on 10.13+
 #define kPDFDestinationUnspecifiedValue FLT_MAX
 
-#if SDK_BEFORE(10_12)
-@interface PDFView (SKSierraDeclarations)
-- (void)drawPage:(PDFPage *)page toContext:(CGContextRef)context;
-@end
-
-@interface PDFAnnotation (SKSierraDeclarations)
-- (void)drawWithBox:(PDFDisplayBox)box inContext:(CGContextRef)context;
-@end
-#endif
-
-#if SDK_BEFORE(10_13)
-typedef NS_ENUM(NSInteger, PDFDisplayDirection) {
-    kPDFDisplayDirectionVertical = 0,
-    kPDFDisplayDirectionHorizontal = 1,
-};
-@interface PDFView (SKHighSierraDeclarations)
-@property (nonatomic) PDFDisplayDirection displayDirection;
-@property (nonatomic) BOOL displaysRTL;
-@property (nonatomic) NSEdgeInsets pageBreakMargins;
-@end
-#endif
-
-#if SDK_BEFORE(10_13)
+#if SDK_BEFORE(10_14)
 @interface PDFView (SKMojaveDeclarations)
 @property (nonatomic, setter=enablePageShadows:) BOOL pageShadowsEnabled;
 @end
@@ -187,72 +165,6 @@
 
 #pragma mark Bug fixes
 
-- (void)keyDown:(NSEvent *)theEvent {
-    if (RUNNING_BEFORE(10_12)) {
-        
-        unichar eventChar = [theEvent firstCharacter];
-        NSUInteger modifiers = [theEvent standardModifierFlags];
-        
-        if ((eventChar == SKSpaceCharacter) && ((modifiers & 
~NSEventModifierFlagShift) == 0)) {
-            eventChar = modifiers == NSEventModifierFlagShift ? 
NSPageUpFunctionKey : NSPageDownFunctionKey;
-            modifiers = 0;
-        }
-        
-        if ((([self displayMode] & kPDFDisplaySinglePageContinuous) == 0) &&
-            (eventChar == NSDownArrowFunctionKey || eventChar == 
NSUpArrowFunctionKey || eventChar == NSPageDownFunctionKey || eventChar == 
NSPageUpFunctionKey) &&
-            (modifiers == 0)) {
-            
-            NSScrollView *scrollView = [self scrollView];
-            NSClipView *clipView = [scrollView contentView];
-            NSRect clipRect = [clipView bounds];
-            BOOL flipped = [clipView isFlipped];
-            CGFloat scroll = eventChar == NSUpArrowFunctionKey || eventChar == 
NSDownArrowFunctionKey ? [scrollView verticalLineScroll] : NSHeight([self 
convertRect:clipRect fromView:clipView]) - 6.0 * [scrollView 
verticalPageScroll];
-            NSPoint point = [self convertPoint:clipRect.origin 
fromView:clipView];
-            CGFloat margin = [self convertSize:NSMakeSize(1.0, 1.0) 
toView:clipView].height;
-            CGFloat inset = [scrollView convertSize:NSMakeSize(0.0, 
[scrollView contentInsets].top) toView:clipView].height;
-            
-            if (eventChar == NSDownArrowFunctionKey || eventChar == 
NSPageDownFunctionKey) {
-                point.y -= scroll;
-                [clipView scrollPoint:[self convertPoint:point 
toView:clipView]];
-                if (fabs(NSMinY(clipRect) - NSMinY([clipView bounds])) <= 
margin && [self canGoToNextPage]) {
-                    [self goToNextPage:nil];
-                    NSRect docRect = [[scrollView documentView] frame];
-                    clipRect = [clipView bounds];
-                    clipRect.origin.y = flipped ? NSMinY(docRect) - inset : 
NSMaxY(docRect) - NSHeight(clipRect) + inset;
-                    [clipView scrollPoint:clipRect.origin];
-                }
-            } else if (eventChar == NSUpArrowFunctionKey || eventChar == 
NSPageUpFunctionKey) {
-                point.y += scroll;
-                [clipView scrollPoint:[self convertPoint:point 
toView:clipView]];
-                if (fabs(NSMinY(clipRect) - NSMinY([clipView bounds])) <= 
margin && [self canGoToPreviousPage]) {
-                    [self goToPreviousPage:nil];
-                    NSRect docRect = [[scrollView documentView] frame];
-                    clipRect = [clipView bounds];
-                    clipRect.origin.y = flipped ? NSMaxY(docRect) - 
NSHeight(clipRect) : NSMinY(docRect);
-                    [clipView scrollPoint:clipRect.origin];
-                }
-            }
-            
-            return;
-        }
-    }
-    
-    [super keyDown:theEvent];
-}
-
-
-- (void)drawPage:(PDFPage *)pdfPage toContext:(CGContextRef)context {
-    [super drawPage:pdfPage toContext:context];
-    
-    if (RUNNING(10_12)) {
-        // On (High) Sierra note annotations don't draw at all
-        for (PDFAnnotation *annotation in [[[pdfPage annotations] copy] 
autorelease]) {
-            if ([annotation shouldDisplay] && ([annotation isNote] || 
[[annotation type] isEqualToString:SKNTextString]))
-                [annotation drawWithBox:[self displayBox] inContext:context];
-        }
-    }
-}
-
 - (void)goToRect:(NSRect)rect onPage:(PDFPage *)page {
     if (RUNNING(10_13)) {
         NSView *docView = [self documentView];
@@ -264,24 +176,12 @@
     }
 }
 
-- (void)setCurrentSelection:(PDFSelection *)currentSelection {
-    if (RUNNING(10_12) && currentSelection == nil)
-        currentSelection = [[[PDFSelection alloc] initWithDocument:[self 
document]] autorelease];
-    [super setCurrentSelection:currentSelection];
-}
-
 static inline BOOL hasHorizontalLayout(PDFView *pdfView) {
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored "-Wpartial-availability"
-    return RUNNING_AFTER(10_12) && [pdfView displayDirection] == 
kPDFDisplayDirectionHorizontal && [pdfView displayMode] == 
kPDFDisplaySinglePageContinuous;
-#pragma clang diagnostic pop
+    return [pdfView displayDirection] == kPDFDisplayDirectionHorizontal && 
[pdfView displayMode] == kPDFDisplaySinglePageContinuous;
 }
 
 static inline BOOL hasVerticalLayout(PDFView *pdfView) {
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored "-Wpartial-availability"
-    return RUNNING_AFTER(10_12) && [pdfView displayDirection] == 
kPDFDisplayDirectionVertical && ([pdfView displayMode] & 
kPDFDisplaySinglePageContinuous);
-#pragma clang diagnostic pop
+    return [pdfView displayDirection] == kPDFDisplayDirectionVertical && 
([pdfView displayMode] & kPDFDisplaySinglePageContinuous);
 }
 
 - (void)horizontallyGoToPage:(PDFPage *)page {
@@ -310,13 +210,8 @@
     NSRect docRect = [[scrollView documentView] frame];
     CGFloat margin = 0.0;
     inset = [self convertSize:NSMakeSize(0.0, inset) toView:clipView].height;
-    if ([self displaysPageBreaks]) {
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored "-Wpartial-availability"
-        margin = RUNNING_BEFORE(10_13) ? 4.0 : [self pageBreakMargins].top;
-#pragma clang diagnostic pop
-        margin = [self convertSize:NSMakeSize(0.0, margin * [self 
scaleFactor]) toView:clipView].height;
-    }
+    if ([self displaysPageBreaks])
+        margin = [self convertSize:NSMakeSize(0.0, [self pageBreakMargins].top 
* [self scaleFactor]) toView:clipView].height;
     pageRect = [self convertRect:pageRect toView:clipView];
     if ([clipView isFlipped])
         bounds.origin.y = fmin(fmax(fmin(NSMinY(pageRect) - 0.5 * 
(NSHeight(bounds) + inset), NSMinY(pageRect) - margin - inset), NSMinY(docRect) 
- inset), NSMaxY(docRect) - NSHeight(bounds));

Modified: trunk/SKBookmarkController.h
===================================================================
--- trunk/SKBookmarkController.h        2023-11-01 16:21:22 UTC (rev 13712)
+++ trunk/SKBookmarkController.h        2023-11-01 18:12:46 UTC (rev 13713)
@@ -39,7 +39,6 @@
 #import <Cocoa/Cocoa.h>
 #import <Quartz/Quartz.h>
 #import "SKOutlineView.h"
-#import "NSTouchBar_SKForwardDeclarations.h"
 
 @class SKBookmark, SKStatusBar;
 

Modified: trunk/SKBookmarkController.m
===================================================================
--- trunk/SKBookmarkController.m        2023-11-01 16:21:22 UTC (rev 13712)
+++ trunk/SKBookmarkController.m        2023-11-01 18:12:46 UTC (rev 13713)
@@ -203,8 +203,7 @@
 - (void)windowDidLoad {
     [self setupToolbar];
     
-    if ([[self window] respondsToSelector:@selector(setTabbingMode:)])
-        [[self window] setTabbingMode:NSWindowTabbingModeDisallowed];
+    [[self window] setTabbingMode:NSWindowTabbingModeDisallowed];
     
     [self setWindowFrameAutosaveName:SKBookmarksWindowFrameAutosaveName];
     
@@ -214,8 +213,7 @@
     else
         [[self window] setContentBorderThickness:22.0 forEdge:NSMinYEdge];
     
-    if ([outlineView 
respondsToSelector:@selector(setStronglyReferencesItems:)])
-        [outlineView setStronglyReferencesItems:YES];
+    [outlineView setStronglyReferencesItems:YES];
     
     [outlineView setTypeSelectHelper:[SKTypeSelectHelper typeSelectHelper]];
     
@@ -1231,11 +1229,11 @@
 #pragma mark Touch bar
 
 - (NSTouchBar *)makeTouchBar {
-    NSTouchBar *touchBar = [[[NSClassFromString(@"NSTouchBar") alloc] init] 
autorelease];
+    NSTouchBar *touchBar = [[[NSTouchBar alloc] init] autorelease];
     [touchBar setCustomizationIdentifier:SKBookmarksTouchBarIdentifier];
     [touchBar setDelegate:self];
-    [touchBar 
setCustomizationAllowedItemIdentifiers:@[SKTouchBarItemIdentifierNewFolder, 
SKTouchBarItemIdentifierNewSeparator, SKTouchBarItemIdentifierDelete, 
SKTouchBarItemIdentifierPreview, @"NSTouchBarItemIdentifierFlexibleSpace"]];
-    [touchBar setDefaultItemIdentifiers:@[SKTouchBarItemIdentifierNewFolder, 
SKTouchBarItemIdentifierNewSeparator, 
@"NSTouchBarItemIdentifierFixedSpaceLarge", SKTouchBarItemIdentifierDelete, 
SKTouchBarItemIdentifierPreview]];
+    [touchBar 
setCustomizationAllowedItemIdentifiers:@[SKTouchBarItemIdentifierNewFolder, 
SKTouchBarItemIdentifierNewSeparator, SKTouchBarItemIdentifierDelete, 
SKTouchBarItemIdentifierPreview, NSTouchBarItemIdentifierFlexibleSpace]];
+    [touchBar setDefaultItemIdentifiers:@[SKTouchBarItemIdentifierNewFolder, 
SKTouchBarItemIdentifierNewSeparator, NSTouchBarItemIdentifierFixedSpaceLarge, 
SKTouchBarItemIdentifierDelete, SKTouchBarItemIdentifierPreview]];
     return touchBar;
 }
 
@@ -1243,44 +1241,32 @@
     NSCustomTouchBarItem *item = nil;
     if ([identifier isEqualToString:SKTouchBarItemIdentifierNewFolder]) {
         if (newFolderButton == nil) {
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored "-Wpartial-availability"
-            newFolderButton = [[NSButton buttonWithImage:[NSImage 
imageNamed:@"NSTouchBarNewFolderTemplate"] target:self 
action:@selector(insertBookmarkFolder:)] retain];
-#pragma clang diagnostic pop
+            newFolderButton = [[NSButton buttonWithImage:[NSImage 
imageNamed:NSImageNameTouchBarNewFolderTemplate] target:self 
action:@selector(insertBookmarkFolder:)] retain];
         }
-        item = [[[NSClassFromString(@"NSCustomTouchBarItem") alloc] 
initWithIdentifier:identifier] autorelease];
+        item = [[[NSCustomTouchBarItem alloc] initWithIdentifier:identifier] 
autorelease];
         [item setView:newFolderButton];
         [item setCustomizationLabel:NSLocalizedString(@"New Folder", @"Toolbar 
item label")];
     } else if ([identifier 
isEqualToString:SKTouchBarItemIdentifierNewSeparator]) {
         if (newSeparatorButton == nil) {
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored "-Wpartial-availability"
             newSeparatorButton = [[NSButton buttonWithImage:[NSImage 
imageNamed:SKImageNameTouchBarNewSeparator] target:self 
action:@selector(insertBookmarkSeparator:)] retain];
-#pragma clang diagnostic pop
         }
-        item = [[[NSClassFromString(@"NSCustomTouchBarItem") alloc] 
initWithIdentifier:identifier] autorelease];
+        item = [[[NSCustomTouchBarItem alloc] initWithIdentifier:identifier] 
autorelease];
         [item setView:newSeparatorButton];
         [item setCustomizationLabel:NSLocalizedString(@"New Separator", 
@"Toolbar item label")];
     } else if ([identifier isEqualToString:SKTouchBarItemIdentifierDelete]) {
         if (deleteButton == nil) {
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored "-Wpartial-availability"
-            deleteButton = [[NSButton buttonWithImage:[NSImage 
imageNamed:@"NSTouchBarDeleteTemplate"] target:self 
action:@selector(deleteBookmark:)] retain];
+            deleteButton = [[NSButton buttonWithImage:[NSImage 
imageNamed:NSImageNameTouchBarDeleteTemplate] target:self 
action:@selector(deleteBookmark:)] retain];
             [deleteButton setEnabled:[outlineView canDelete]];
-#pragma clang diagnostic pop
         }
-        item = [[[NSClassFromString(@"NSCustomTouchBarItem") alloc] 
initWithIdentifier:identifier] autorelease];
+        item = [[[NSCustomTouchBarItem alloc] initWithIdentifier:identifier] 
autorelease];
         [item setView:deleteButton];
         [item setCustomizationLabel:NSLocalizedString(@"Delete", @"Toolbar 
item label")];
     } else if ([identifier isEqualToString:SKTouchBarItemIdentifierPreview]) {
         if (previewButton == nil) {
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored "-Wpartial-availability"
-            previewButton = [[NSButton buttonWithImage:[NSImage 
imageNamed:@"NSTouchBarQuickLookTemplate"] target:self 
action:@selector(previewBookmarks:)] retain];
+            previewButton = [[NSButton buttonWithImage:[NSImage 
imageNamed:NSImageNameTouchBarQuickLookTemplate] target:self 
action:@selector(previewBookmarks:)] retain];
             [previewButton setEnabled:[outlineView selectedRow] != -1];
-#pragma clang diagnostic pop
         }
-        item = [[[NSClassFromString(@"NSCustomTouchBarItem") alloc] 
initWithIdentifier:identifier] autorelease];
+        item = [[[NSCustomTouchBarItem alloc] initWithIdentifier:identifier] 
autorelease];
         [item setView:previewButton];
         [item setCustomizationLabel:NSLocalizedString(@"Quick Look", @"Toolbar 
item label")];
     }

Modified: trunk/SKColorPicker.h
===================================================================
--- trunk/SKColorPicker.h       2023-11-01 16:21:22 UTC (rev 13712)
+++ trunk/SKColorPicker.h       2023-11-01 18:12:46 UTC (rev 13713)
@@ -37,7 +37,6 @@
  */
 
 #import <Cocoa/Cocoa.h>
-#import "NSScrubber_SKForwardDeclarations.h"
 
 @protocol SKColorPickerDelegate;
 

Modified: trunk/SKCompatibility.h
===================================================================
--- trunk/SKCompatibility.h     2023-11-01 16:21:22 UTC (rev 13712)
+++ trunk/SKCompatibility.h     2023-11-01 18:12:46 UTC (rev 13713)
@@ -87,41 +87,8 @@
     #define MAC_OS_VERSION_14_0 140000
 #endif
 
-#if SDK_BEFORE(10_13)
+#if SDK_BEFORE(10_14)
 
-#ifndef NSAppKitVersionNumber10_10
-    #define NSAppKitVersionNumber10_10 1343
-#endif
-#ifndef NSAppKitVersionNumber10_10_Max
-    #define NSAppKitVersionNumber10_10_Max 1349
-#endif
-#ifndef NSAppKitVersionNumber10_11
-    #define NSAppKitVersionNumber10_11 1404
-#endif
-#ifndef NSAppKitVersionNumber10_12
-    #define NSAppKitVersionNumber10_12 1504
-#endif
-#ifndef NSAppKitVersionNumber10_13
-    #define NSAppKitVersionNumber10_13 1561
-#endif
-#ifndef NSAppKitVersionNumber10_14
-    #define NSAppKitVersionNumber10_14 1671
-#endif
-#ifndef NSAppKitVersionNumber10_15
-    #define NSAppKitVersionNumber10_15 1894
-#endif
-#ifndef NSAppKitVersionNumber11_0
-    #define NSAppKitVersionNumber11_0 2022
-#endif
-#ifndef NSAppKitVersionNumber12_0
-    #define NSAppKitVersionNumber12_0 2113
-#endif
-#ifndef NSAppKitVersionNumber13_0
-    #define NSAppKitVersionNumber13_0 2299
-#endif
-
-#elif SDK_BEFORE(10_14)
-
 static const NSAppKitVersion NSAppKitVersionNumber10_13 = 1561;
 static const NSAppKitVersion NSAppKitVersionNumber10_14 = 1671;
 static const NSAppKitVersion NSAppKitVersionNumber10_15 = 1894;
@@ -161,136 +128,6 @@
 
 #endif
 
-#ifndef NS_ENUM
-#define NS_ENUM(_type, _name) enum _name : _type _name; enum _name : _type
-#endif
-
-#ifndef NS_OPTIONS
-#define NS_OPTIONS(_type, _name) enum _name : _type _name; enum _name : _type
-#endif
-
-#if SDK_BEFORE(10_11)
-
-enum {
-    NSVisualEffectMaterialMenu = 5,
-    NSVisualEffectMaterialPopover = 6,
-    NSVisualEffectMaterialSidebar = 7,
-};
-
-#endif
-
-#if SDK_BEFORE(10_12)
-
-typedef NS_ENUM(NSInteger, NSWindowUserTabbingPreference) {
-    NSWindowUserTabbingPreferenceManual,
-    NSWindowUserTabbingPreferenceAlways,
-    NSWindowUserTabbingPreferenceInFullScreen,
-};
-
-typedef NS_ENUM(NSInteger, NSWindowTabbingMode) {
-    NSWindowTabbingModeAutomatic,
-    NSWindowTabbingModePreferred,
-    NSWindowTabbingModeDisallowed
-};
-
-#define NSEventModifierFlagShift        NSShiftKeyMask
-#define NSEventModifierFlagControl      NSControlKeyMask
-#define NSEventModifierFlagOption       NSAlternateKeyMask
-#define NSEventModifierFlagCommand      NSCommandKeyMask
-#define NSEventModifierFlagCapsLock     NSAlphaShiftKeyMask
-#define NSEventModifierFlagNumericPad   NSNumericPadKeyMask
-#define NSEventModifierFlagFunction     NSFunctionKeyMask
-#define NSEventModifierFlagDeviceIndependentFlagsMask 
NSDeviceIndependentModifierFlagsMask
-
-#define NSEventTypeKeyDown              NSKeyDown
-#define NSEventTypeLeftMouseDown        NSLeftMouseDown
-#define NSEventTypeLeftMouseUp          NSLeftMouseUp
-#define NSEventTypeLeftMouseDragged     NSLeftMouseDragged
-#define NSEventTypeMouseMoved           NSMouseMoved
-#define NSEventTypeRightMouseDown       NSRightMouseDown
-#define NSEventTypeScrollWheel          NSScrollWheel
-#define NSEventTypeTabletProximity      NSTabletProximity
-#define NSEventTypeApplicationDefined   NSApplicationDefined
-
-#define NSEventMaskLeftMouseUp          NSLeftMouseUpMask
-#define NSEventMaskLeftMouseDragged     NSLeftMouseDraggedMask
-#define NSEventMaskMouseEntered         NSMouseEnteredMask
-#define NSEventMaskMouseExited          NSMouseExitedMask
-#define NSEventMaskFlagsChanged         NSFlagsChangedMask
-#define NSEventMaskPeriodic             NSPeriodicMask
-
-#define NSEventSubtypeTabletProximity   NSTabletProximityEventSubtype
-#define NSEventSubtypeTabletPoint       NSTabletPointEventSubtype
-
-#define NSPointingDeviceTypePen         NSPenPointingDevice
-#define NSPointingDeviceTypeEraser      NSEraserPointingDevice
-#define NSPointingDeviceTypeUnknown     NSUnknownPointingDevice
-
-#define NSTextAlignmentLeft             NSLeftTextAlignment
-#define NSTextAlignmentRight            NSTextAlignmentRight
-#define NSTextAlignmentCenter           NSCenterTextAlignment
-
-#define NSControlSizeSmall              NSSmallControlSize
-
-#define NSCompositingOperationClear             NSCompositeClear
-#define NSCompositingOperationCopy              NSCompositeCopy
-#define NSCompositingOperationSourceOver        NSCompositeSourceOver
-#define NSCompositingOperationDestinationOver   NSCompositeDestinationOver
-#define NSCompositingOperationDestinationAtop   NSCompositeDestinationAtop
-#define NSCompositingOperationMultiply          NSCompositeMultiply
-
-#define NSWindowStyleMaskBorderless             NSBorderlessWindowMask
-#define NSWindowStyleMaskResizable              NSResizableWindowMask
-#define NSWindowStyleMaskTitled                 NSTitledWindowMask
-#define NSWindowStyleMaskFullScreen             NSFullScreenWindowMask
-#define NSWindowStyleMaskFullSizeContentView    NSFullSizeContentViewWindowMask
-
-@interface NSWindow (SKSierraDeclarations)
-+ (NSWindowUserTabbingPreference)userTabbingPreference;
-- (NSArray *)tabbedWindows;
-- (void)addTabbedWindow:(NSWindow *)window 
ordered:(NSWindowOrderingMode)ordered;
-- (NSWindowTabbingMode)tabbingMode;
-- (void)setTabbingMode:(NSWindowTabbingMode)mode;
-@property (copy) NSString *tabbingIdentifier;
-@end
-
-@interface NSOutlineView (SKSierraDeclarations)
-- (BOOL)stronglyReferencesItems;
-- (void)setStronglyReferencesItems:(BOOL)flag;
-@end
-
-@protocol PDFViewDelegate <NSObject> @end
-
-@protocol NSFilePromiseProviderDelegate <NSObject> @end
-
-@interface NSFilePromiseProvider : NSObject <NSPasteboardWriting>
-- (id)initWithFileType:(NSString *)fileType delegate:(id 
<NSFilePromiseProviderDelegate>)delegate;
-@end
-
-@interface NSButton (SKSierraDeclarations)
-- (NSButton *)buttonWithTitle:(NSString *)title target:(id)target 
action:(SEL)action;
-- (NSButton *)buttonWithImage:(NSImage *)image target:(id)target 
action:(SEL)action;
-- (NSButton *)buttonWithTitle:(NSString *)title image:(NSImage *)image 
target:(id)target action:(SEL)action;
-@end
-
-@interface NSSegmentedControl (SKSierraDeclarations)
-+ (NSSegmentedControl *)segmentedControlWithImages:(NSArray *)images 
trackingMode:(NSSegmentSwitchTracking)trackingMode target:(id)target 
action:(SEL)action;
-+ (NSSegmentedControl *)segmentedControlWithLabels:(NSArray *)labels 
trackingMode:(NSSegmentSwitchTracking)trackingMode target:(id)target 
action:(SEL)action;
-@end
-
-@interface NSVisualEffectView (SKSierraDeclarations)
-@property (getter=isEmphasized) BOOL emphasized;
-@end
-
-#endif
-
-#if SDK_BEFORE(10_13)
-
-#define NSModalResponseOK       NSFileHandlingPanelOKButton
-#define NSModalResponseCancel   NSFileHandlingPanelCancelButton
-
-#endif
-
 #if SDK_BEFORE(10_14)
 
 enum {

Modified: trunk/SKConversionProgressController.h
===================================================================
--- trunk/SKConversionProgressController.h      2023-11-01 16:21:22 UTC (rev 
13712)
+++ trunk/SKConversionProgressController.h      2023-11-01 18:12:46 UTC (rev 
13713)
@@ -37,7 +37,6 @@
  */
 
 #import <Cocoa/Cocoa.h>
-#import "NSTouchBar_SKForwardDeclarations.h"
 
 
 @interface SKConversionProgressController : NSWindowController 
<NSTouchBarDelegate> {

Modified: trunk/SKConversionProgressController.m
===================================================================
--- trunk/SKConversionProgressController.m      2023-11-01 16:21:22 UTC (rev 
13712)
+++ trunk/SKConversionProgressController.m      2023-11-01 18:12:46 UTC (rev 
13713)
@@ -346,9 +346,9 @@
 #pragma mark Touch Bar
 
 - (NSTouchBar *)makeTouchBar {
-    NSTouchBar *touchBar = [[[NSClassFromString(@"NSTouchBar") alloc] init] 
autorelease];
+    NSTouchBar *touchBar = [[[NSTouchBar alloc] init] autorelease];
     [touchBar setDelegate:self];
-    [touchBar 
setDefaultItemIdentifiers:@[@"NSTouchBarItemIdentifierFlexibleSpace", 
SKTouchBarItemIdentifierCancel, @"NSTouchBarItemIdentifierFixedSpaceLarge"]];
+    [touchBar 
setDefaultItemIdentifiers:@[NSTouchBarItemIdentifierFlexibleSpace, 
SKTouchBarItemIdentifierCancel, NSTouchBarItemIdentifierFixedSpaceLarge]];
     return touchBar;
 }
 
@@ -356,7 +356,7 @@
     NSCustomTouchBarItem *item = nil;
     if ([identifier isEqualToString:SKTouchBarItemIdentifierCancel]) {
         NSButton *button = [NSButton buttonWithTitle:[cancelButton title] 
target:[cancelButton target] action:[cancelButton action]];
-        item = [[[NSClassFromString(@"NSCustomTouchBarItem") alloc] 
initWithIdentifier:identifier] autorelease];
+        item = [[[NSCustomTouchBarItem alloc] initWithIdentifier:identifier] 
autorelease];
         [(NSCustomTouchBarItem *)item setView:button];
     }
     return item;

Modified: trunk/SKDocumentController.m
===================================================================
--- trunk/SKDocumentController.m        2023-11-01 16:21:22 UTC (rev 13712)
+++ trunk/SKDocumentController.m        2023-11-01 18:12:46 UTC (rev 13713)
@@ -366,11 +366,9 @@
         __block NSMutableArray *windows = nil;
         __block NSMutableArray *tabInfos = nil;
         
-        if (RUNNING_AFTER(10_11)) {
-            windows = [[NSMutableArray alloc] init];
-            while ([windows count] < (NSUInteger)i)
-                [windows addObject:[NSNull null]];
-        }
+        windows = [[NSMutableArray alloc] init];
+        while ([windows count] < (NSUInteger)i)
+            [windows addObject:[NSNull null]];
         
         while (i-- > 0) {
             SKBookmark *child = [children objectAtIndex:i];

Modified: trunk/SKDownloadController.h
===================================================================
--- trunk/SKDownloadController.h        2023-11-01 16:21:22 UTC (rev 13712)
+++ trunk/SKDownloadController.h        2023-11-01 18:12:46 UTC (rev 13713)
@@ -39,7 +39,6 @@
 #import <Cocoa/Cocoa.h>
 #import <Quartz/Quartz.h>
 #import "SKTableView.h"
-#import "NSTouchBar_SKForwardDeclarations.h"
 
 
 @class SKDownload;

Modified: trunk/SKDownloadController.m
===================================================================
--- trunk/SKDownloadController.m        2023-11-01 16:21:22 UTC (rev 13712)
+++ trunk/SKDownloadController.m        2023-11-01 18:12:46 UTC (rev 13713)
@@ -54,12 +54,6 @@
 #import "SKToolbarItem.h"
 #import "NSImage_SKExtensions.h"
 
-#if SDK_BEFORE(10_12)
-@interface NSResponder (SKSierraDeclarations)
-@property (strong) NSTouchBar *touchBar;
-@end
-#endif
-
 #define SKDownloadsToolbarIdentifier                
@"SKDownloadsToolbarIdentifier"
 #define SKDownloadsToolbarPreferencesItemIdentifier 
@"SKDownloadsToolbarPreferencesItemIdentifier"
 #define SKDownloadsToolbarClearItemIdentifier       
@"SKDownloadsToolbarClearItemIdentifier"
@@ -150,8 +144,7 @@
     
     [[self window] setTitleVisibility:NSWindowTitleHidden];
     
-    if ([[self window] respondsToSelector:@selector(setTabbingMode:)])
-        [[self window] setTabbingMode:NSWindowTabbingModeDisallowed];
+    [[self window] setTabbingMode:NSWindowTabbingModeDisallowed];
     
     [self updateClearButton];
     
@@ -470,8 +463,7 @@
 - (void)tableViewSelectionDidChange:(NSNotification *)notification {
     if ([QLPreviewPanel sharedPreviewPanelExists] && [[QLPreviewPanel 
sharedPreviewPanel] isVisible] && [[QLPreviewPanel sharedPreviewPanel] 
dataSource] == self)
         [[QLPreviewPanel sharedPreviewPanel] reloadData];
-    if ([self respondsToSelector:@selector(setTouchBar:)])
-        [self setTouchBar:nil];
+    [self setTouchBar:nil];
 }
 
 - (void)tableView:(NSTableView *)aTableView deleteRowsWithIndexes:(NSIndexSet 
*)rowIndexes {
@@ -562,8 +554,7 @@
                 [tableView reloadTypeSelectStrings];
             } else if ([keyPath isEqualToString:SKDownloadStatusKey]) {
                 [self updateClearButton];
-                if ([self respondsToSelector:@selector(setTouchBar:)])
-                    [self setTouchBar:nil];
+                [self setTouchBar:nil];
                 if ([object status] == SKDownloadStatusFinished) {
                     [self openDownload:object];
                     if ([QLPreviewPanel sharedPreviewPanelExists] && 
[[QLPreviewPanel sharedPreviewPanel] isVisible] && [[QLPreviewPanel 
sharedPreviewPanel] dataSource] == self && [tableView isRowSelected:row])
@@ -745,11 +736,11 @@
 #pragma mark Touch Bar
 
 - (NSTouchBar *)makeTouchBar {
-    NSTouchBar *touchBar = [[[NSClassFromString(@"NSTouchBar") alloc] init] 
autorelease];
+    NSTouchBar *touchBar = [[[NSTouchBar alloc] init] autorelease];
     [touchBar setDelegate:self];
     NSInteger selectedRow = [tableView selectedRow];
     SKDownload *download = selectedRow != -1 ? [self 
objectInDownloadsAtIndex:selectedRow] : nil;
-    NSMutableArray *identifiers = [NSMutableArray 
arrayWithObjects:SKTouchBarItemIdentifierClear, 
@"NSTouchBarItemIdentifierFixedSpaceSmall", nil];
+    NSMutableArray *identifiers = [NSMutableArray 
arrayWithObjects:SKTouchBarItemIdentifierClear, 
NSTouchBarItemIdentifierFixedSpaceSmall, nil];
     if ([download canResume])
         [identifiers addObject:SKTouchBarItemIdentifierResume];
     if ([download canCancel])
@@ -770,25 +761,25 @@
                 tbClearButton = [[NSButton buttonWithTitle:[clearButton title] 
target:[clearButton target] action:[clearButton action]] retain];
                 [self updateClearButton];
             }
-            item = [[[NSClassFromString(@"NSCustomTouchBarItem") alloc] 
initWithIdentifier:identifier] autorelease];
+            item = [[[NSCustomTouchBarItem alloc] 
initWithIdentifier:identifier] autorelease];
             [(NSCustomTouchBarItem *)item setView:tbClearButton];
         } else if ([identifier 
isEqualToString:SKTouchBarItemIdentifierResume]) {
             if (resumeButton == nil) {
                 resumeButton = [NSButton buttonWithImage:[NSImage 
imageNamed:SKImageNameTouchBarRefresh] target:self 
action:@selector(resumeDownload:)];
             }
-            item = [[[NSClassFromString(@"NSCustomTouchBarItem") alloc] 
initWithIdentifier:identifier] autorelease];
+            item = [[[NSCustomTouchBarItem alloc] 
initWithIdentifier:identifier] autorelease];
             [(NSCustomTouchBarItem *)item setView:resumeButton];
         } else if ([identifier 
isEqualToString:SKTouchBarItemIdentifierCancel]) {
             if (cancelButton == nil) {
                 cancelButton = [NSButton buttonWithImage:[NSImage 
imageNamed:SKImageNameTouchBarStopProgress] target:self 
action:@selector(cancelDownload:)];
             }
-            item = [[[NSClassFromString(@"NSCustomTouchBarItem") alloc] 
initWithIdentifier:identifier] autorelease];
+            item = [[[NSCustomTouchBarItem alloc] 
initWithIdentifier:identifier] autorelease];
             [(NSCustomTouchBarItem *)item setView:cancelButton];
         } else if ([identifier 
isEqualToString:SKTouchBarItemIdentifierRemove]) {
             if (removeButton == nil) {
-                removeButton = [NSButton buttonWithImage:[NSImage 
imageNamed:@"NSTouchBarDeleteTemplate"] target:self 
action:@selector(removeDownload:)];
+                removeButton = [NSButton buttonWithImage:[NSImage 
imageNamed:NSImageNameTouchBarDeleteTemplate] target:self 
action:@selector(removeDownload:)];
             }
-            item = [[[NSClassFromString(@"NSCustomTouchBarItem") alloc] 
initWithIdentifier:identifier] autorelease];
+            item = [[[NSCustomTouchBarItem alloc] 
initWithIdentifier:identifier] autorelease];
             [(NSCustomTouchBarItem *)item setView:removeButton];
         }
         if (item)

Modified: trunk/SKDownloadPreferenceController.h
===================================================================
--- trunk/SKDownloadPreferenceController.h      2023-11-01 16:21:22 UTC (rev 
13712)
+++ trunk/SKDownloadPreferenceController.h      2023-11-01 18:12:46 UTC (rev 
13713)
@@ -37,7 +37,6 @@
  */
 
 #import <Cocoa/Cocoa.h>
-#import "NSTouchBar_SKForwardDeclarations.h"
 
 
 @interface SKDownloadPreferenceController : NSWindowController 
<NSTouchBarDelegate> {

Modified: trunk/SKDownloadPreferenceController.m
===================================================================
--- trunk/SKDownloadPreferenceController.m      2023-11-01 16:21:22 UTC (rev 
13712)
+++ trunk/SKDownloadPreferenceController.m      2023-11-01 18:12:46 UTC (rev 
13713)
@@ -92,9 +92,9 @@
 #pragma mark Touch Bar
 
 - (NSTouchBar *)makeTouchBar {
-    NSTouchBar *touchBar = [[[NSClassFromString(@"NSTouchBar") alloc] init] 
autorelease];
+    NSTouchBar *touchBar = [[[NSTouchBar alloc] init] autorelease];
     [touchBar setDelegate:self];
-    [touchBar 
setDefaultItemIdentifiers:@[@"NSTouchBarItemIdentifierFlexibleSpace", 
SKTouchBarItemIdentifierDone, @"NSTouchBarItemIdentifierFixedSpaceLarge"]];
+    [touchBar 
setDefaultItemIdentifiers:@[NSTouchBarItemIdentifierFlexibleSpace, 
SKTouchBarItemIdentifierDone, NSTouchBarItemIdentifierFixedSpaceLarge]];
     return touchBar;
 }
 
@@ -103,7 +103,7 @@
     if ([identifier isEqualToString:SKTouchBarItemIdentifierDone]) {
         NSButton *button = [NSButton buttonWithTitle:[doneButton title] 
target:[doneButton target] action:[doneButton action]];
         [doneButton setKeyEquivalent:@"\r"];
-        item = [[[NSClassFromString(@"NSCustomTouchBarItem") alloc] 
initWithIdentifier:identifier] autorelease];
+        item = [[[NSCustomTouchBarItem alloc] initWithIdentifier:identifier] 
autorelease];
         [(NSCustomTouchBarItem *)item setView:button];
     }
     return item;

Modified: trunk/SKImageToolTipWindow.m
===================================================================
--- trunk/SKImageToolTipWindow.m        2023-11-01 16:21:22 UTC (rev 13712)
+++ trunk/SKImageToolTipWindow.m        2023-11-01 18:12:46 UTC (rev 13713)
@@ -49,11 +49,7 @@
 #define AUTO_HIDE_TIME_INTERVAL 10.0
 #define DEFAULT_SHOW_DELAY      1.5
 #define ALT_SHOW_DELAY          0.2
-#if SDK_BEFORE(10_13)
-#define WINDOW_LEVEL            104
-#else
 #define WINDOW_LEVEL            ((NSWindowLevel)104)
-#endif
 
 #define SKToolTipScaleKey @"SKToolTipScale"
 

Modified: trunk/SKLeftSideViewController.m
===================================================================
--- trunk/SKLeftSideViewController.m    2023-11-01 16:21:22 UTC (rev 13712)
+++ trunk/SKLeftSideViewController.m    2023-11-01 18:12:46 UTC (rev 13713)
@@ -113,8 +113,7 @@
     [searchField setAction:@selector(search:)];
     [searchField setTarget:mainController];
     
-    if ([tocOutlineView 
respondsToSelector:@selector(setStronglyReferencesItems:)])
-        [tocOutlineView setStronglyReferencesItems:YES];
+    [tocOutlineView setStronglyReferencesItems:YES];
     
     [tocOutlineView setAutoresizesOutlineColumn: NO];
     

Modified: trunk/SKLevelIndicatorCell.m
===================================================================
--- trunk/SKLevelIndicatorCell.m        2023-11-01 16:21:22 UTC (rev 13712)
+++ trunk/SKLevelIndicatorCell.m        2023-11-01 18:12:46 UTC (rev 13713)
@@ -54,12 +54,6 @@
         [[NSBezierPath bezierPathWithRect:cellFrame] addClip];
         [super drawWithFrame:cellFrame inView:controlView];
         [NSGraphicsContext restoreGraphicsState];
-    } else if (RUNNING_BEFORE(10_13)) {
-        NSRect frame = SKCenterRectVertically(cellFrame, cellHeight, 0.0, 
[controlView isFlipped]);
-        [NSGraphicsContext saveGraphicsState];
-        [[NSBezierPath bezierPathWithRect:cellFrame] addClip];
-        [super drawWithFrame:frame inView:controlView];
-        [NSGraphicsContext restoreGraphicsState];
     } else if (NSHeight(cellFrame) <= 2.0 * (cellHeight - EDGE_HEIGHT)) {
         NSRect topFrame, bottomFrame, frame = cellFrame;
         NSDivideRect(cellFrame, &topFrame, &bottomFrame, floor(0.5 * 
NSHeight(cellFrame)), NSMinYEdge);

Modified: trunk/SKLoupeController.m
===================================================================
--- trunk/SKLoupeController.m   2023-11-01 16:21:22 UTC (rev 13712)
+++ trunk/SKLoupeController.m   2023-11-01 18:12:46 UTC (rev 13713)
@@ -56,12 +56,6 @@
 #define SKLargeMagnificationWidthKey @"SKLargeMagnificationWidth"
 #define SKLargeMagnificationHeightKey @"SKLargeMagnificationHeight"
 
-#if SDK_BEFORE(10_13)
-@interface PDFView (SKHighSierraDeclarations)
-@property (nonatomic) BOOL displaysRTL;
-@end
-#endif
-
 @interface SKLoupeController ()
 - (void)makeWindow;
 - (void)handlePDFContentViewFrameChangedNotification:(NSNotification 
*)notification;
@@ -287,10 +281,7 @@
     NSRect scaledRect = NSMakeRect(mouseLoc.x + (NSMinX(magRect) - mouseLoc.x) 
/ magnification, mouseLoc.y + (NSMinY(magRect) - mouseLoc.y) / magnification, 
NSWidth(magRect) / magnification, NSHeight(magRect) / magnification);
     CGFloat backingScale = [pdfView backingScale];
     NSRange pageRange;
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored "-Wpartial-availability"
-    if (RUNNING_AFTER(10_13) && [pdfView displaysRTL] && ([pdfView 
displayMode] & kPDFDisplayTwoUp)) {
-#pragma clang diagnostic pop
+    if ([pdfView displaysRTL] && ([pdfView displayMode] & kPDFDisplayTwoUp)) {
         pageRange.location = [[pdfView 
pageForPoint:SKTopRightPoint(scaledRect) nearest:YES] pageIndex];
         pageRange.length = [[pdfView 
pageForPoint:SKBottomLeftPoint(scaledRect) nearest:YES] pageIndex] + 1 - 
pageRange.location;
     } else {

Modified: trunk/SKMainDocument.m
===================================================================
--- trunk/SKMainDocument.m      2023-11-01 16:21:22 UTC (rev 13712)
+++ trunk/SKMainDocument.m      2023-11-01 18:12:46 UTC (rev 13713)
@@ -140,15 +140,6 @@
 - (void)setPage:(PDFPage *)newPage;
 @end
 
-@interface NSSavePanel (SKPrivateDeclarations)
-- (void)toggleOptionsView:(id)sender;
-@end
-#if SDK_BEFORE(10_11)
-@interface NSSavePanel (SKElCapitanDeclarations)
-- (void)setAccessoryViewDisclosed:(BOOL)flag;
-@end
-#endif
-
 @interface PDFDocument (SKPrivateDeclarations)
 - (NSString *)passwordUsedForUnlocking;
 @end
@@ -1108,13 +1099,7 @@
         [oPanel setAccessoryView:readNotesAccessoryView];
         [replaceNotesCheckButton setState:NSOnState];
         [readNotesAccessoryView release];
-        if ([oPanel respondsToSelector:@selector(setAccessoryViewDisclosed:)])
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored "-Wpartial-availability"
-            [oPanel setAccessoryViewDisclosed:YES];
-#pragma clang diagnostic pop
-        else if ([oPanel respondsToSelector:@selector(toggleOptionsView:)])
-            [oPanel toggleOptionsView:nil];
+        [oPanel setAccessoryViewDisclosed:YES];
     }
     
     [oPanel setDirectoryURL:[fileURL URLByDeletingLastPathComponent]];
@@ -1176,9 +1161,7 @@
         if (pdfDocWithoutNotes == nil)
             pdfDocWithoutNotes = [[[PDFDocument alloc] initWithData:pdfData] 
autorelease];
         
-        dispatch_queue_t queue = RUNNING_AFTER(10_11) ? 
dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0) : 
dispatch_get_main_queue();
-        
-        dispatch_async(queue, ^{
+        
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
             
             for (PDFPage *page in pdfDocWithoutNotes) {
                 NSArray *notes = [[page annotations] copy];
@@ -1196,8 +1179,6 @@
             
             NSData *data = [pdfDocWithoutNotes dataRepresentation];
             
-            [[pdfDocWithoutNotes outlineRoot] clearDocument];
-
             dispatch_async(dispatch_get_main_queue(), ^{
                 
                 [[self mainWindowController] 
addAnnotationsFromDictionaries:noteDicts removeAnnotations:annotations];
@@ -1220,8 +1201,6 @@
         
         [offsets release];
 
-        [[pdfDocWithoutNotes outlineRoot] clearDocument];
-        
         [[self mainWindowController] dismissProgressSheet];
         
         mdFlags.convertingNotes = 0;
@@ -1242,7 +1221,6 @@
                     [self convertNotesUsingPDFDocument:pdfDoc];
                 }
             } else {
-                [[pdfDoc outlineRoot] clearDocument];
                 mdFlags.convertingNotes = 0;
             }
         }];

Modified: trunk/SKMainToolbarController.m
===================================================================
--- trunk/SKMainToolbarController.m     2023-11-01 16:21:22 UTC (rev 13712)
+++ trunk/SKMainToolbarController.m     2023-11-01 18:12:46 UTC (rev 13713)
@@ -332,8 +332,8 @@
             [item setViewWithSizes:scaleField];
             [item setMenuFormRepresentation:menuItem];
             
-            [(NSNumberFormatter *)[scaleField formatter] setMinimum:[NSNumber 
numberWithDouble:[mainController.pdfView minimumScaleFactor]]];
-            [(NSNumberFormatter *)[scaleField formatter] setMaximum:[NSNumber 
numberWithDouble:[mainController.pdfView maximumScaleFactor]]];
+            [(NSNumberFormatter *)[scaleField formatter] setMinimum:[NSNumber 
numberWithDouble:[mainController.pdfView minScaleFactor]]];
+            [(NSNumberFormatter *)[scaleField formatter] setMaximum:[NSNumber 
numberWithDouble:[mainController.pdfView maxScaleFactor]]];
             
         } else if ([identifier 
isEqualToString:SKDocumentToolbarZoomActualItemIdentifier]) {
             
@@ -650,9 +650,6 @@
             [displayModeButton setHelp:NSLocalizedString(@"Two Pages 
Continuous", @"Tool tip message") forSegment:kPDFDisplayTwoUpContinuous];
             [displayModeButton setHelp:NSLocalizedString(@"Horizontal 
Continuous", @"Tool tip message") forSegment:4];
             
-            if (RUNNING_BEFORE(10_13))
-                [displayModeButton setSegmentCount:4];
-            
             [item setViewWithSizes:displayModeButton];
             [item setMenuFormRepresentation:menuItem];
             
@@ -918,53 +915,6 @@
 }
 
 - (NSArray *)toolbarAllowedItemIdentifiers:(NSToolbar *)toolbar {
-    if (RUNNING_BEFORE(10_13))
-        return @[SKDocumentToolbarPreviousNextItemIdentifier,
-            SKDocumentToolbarPreviousNextFirstLastItemIdentifier,
-            SKDocumentToolbarPreviousItemIdentifier,
-            SKDocumentToolbarPageNumberItemIdentifier,
-            SKDocumentToolbarNextItemIdentifier,
-            SKDocumentToolbarBackForwardItemIdentifier,
-            SKDocumentToolbarZoomInActualOutItemIdentifier,
-            SKDocumentToolbarZoomInOutItemIdentifier,
-            SKDocumentToolbarZoomActualItemIdentifier,
-            SKDocumentToolbarZoomToFitItemIdentifier,
-            SKDocumentToolbarZoomToSelectionItemIdentifier,
-            SKDocumentToolbarAutoScalesItemIdentifier,
-            SKDocumentToolbarScaleItemIdentifier,
-            SKDocumentToolbarDisplayModeItemIdentifier,
-            SKDocumentToolbarSingleTwoUpItemIdentifier,
-            SKDocumentToolbarContinuousItemIdentifier,
-            SKDocumentToolbarBookModeItemIdentifier,
-            SKDocumentToolbarPageBreaksItemIdentifier,
-            SKDocumentToolbarDisplayBoxItemIdentifier,
-            SKDocumentToolbarFullScreenItemIdentifier,
-            SKDocumentToolbarPresentationItemIdentifier,
-            SKDocumentToolbarContentsPaneItemIdentifier,
-            SKDocumentToolbarNotesPaneItemIdentifier,
-            SKDocumentToolbarSplitPDFItemIdentifier,
-            SKDocumentToolbarRotateRightItemIdentifier,
-            SKDocumentToolbarRotateLeftItemIdentifier,
-            SKDocumentToolbarRotateLeftRightItemIdentifier,
-            SKDocumentToolbarCropItemIdentifier,
-            SKDocumentToolbarNewNoteItemIdentifier,
-            SKDocumentToolbarNewTextNoteItemIdentifier,
-            SKDocumentToolbarNewCircleNoteItemIdentifier,
-            SKDocumentToolbarNewMarkupItemIdentifier,
-            SKDocumentToolbarNewLineItemIdentifier,
-            SKDocumentToolbarToolModeItemIdentifier,
-            SKDocumentToolbarColorSwatchItemIdentifier,
-            SKDocumentToolbarShareItemIdentifier,
-            SKDocumentToolbarPacerItemIdentifier,
-            SKDocumentToolbarInfoItemIdentifier,
-            SKDocumentToolbarColorsItemIdentifier,
-            SKDocumentToolbarFontsItemIdentifier,
-            SKDocumentToolbarLinesItemIdentifier,
-            SKDocumentToolbarPrintItemIdentifier,
-            NSToolbarFlexibleSpaceItemIdentifier,
-            NSToolbarSpaceItemIdentifier,
-            NSToolbarSeparatorItemIdentifier,
-            SKDocumentToolbarCustomizeItemIdentifier];
     return @[SKDocumentToolbarPreviousNextItemIdentifier,
         SKDocumentToolbarPreviousNextFirstLastItemIdentifier,
         SKDocumentToolbarPreviousItemIdentifier,
@@ -1036,9 +986,9 @@
     } else if ([identifier 
isEqualToString:SKDocumentToolbarDisplayBoxItemIdentifier] || [identifier 
isEqualToString:SKDocumentToolbarDisplayModeItemIdentifier] || [identifier 
isEqualToString:SKDocumentToolbarSingleTwoUpItemIdentifier] || [identifier 
isEqualToString:SKDocumentToolbarContinuousItemIdentifier] || [identifier 
isEqualToString:SKDocumentToolbarPageBreaksItemIdentifier]) {
         return [mainController.pdfView.document isLocked] == NO && 
[mainController hasOverview] == NO;
     } else if ([identifier 
isEqualToString:SKDocumentToolbarDisplayDirectionItemIdentifier]) {
-        return RUNNING_AFTER(10_12) && [mainController.pdfView.document 
isLocked] == NO && [mainController hasOverview] == NO && 
[mainController.pdfView displayMode] == kPDFDisplaySinglePageContinuous;
+        return [mainController.pdfView.document isLocked] == NO && 
[mainController hasOverview] == NO && [mainController.pdfView displayMode] == 
kPDFDisplaySinglePageContinuous;
     } else if ([identifier 
isEqualToString:SKDocumentToolbarDisplaysRTLItemIdentifier]) {
-        return RUNNING_AFTER(10_12) && [mainController.pdfView.document 
isLocked] == NO && [mainController hasOverview] == NO;
+        return [mainController.pdfView.document isLocked] == NO && 
[mainController hasOverview] == NO;
     } else if ([identifier 
isEqualToString:SKDocumentToolbarBookModeItemIdentifier]) {
         return [mainController.pdfView.document isLocked] == NO && 
[mainController hasOverview] == NO;
     } else if ([identifier 
isEqualToString:SKDocumentToolbarToolModeItemIdentifier]) {
@@ -1143,8 +1093,8 @@
 - (IBAction)chooseScale:(id)sender {
     SKTextFieldSheetController *scaleSheetController = 
[[[SKTextFieldSheetController alloc] initWithWindowNibName:@"ScaleSheet"] 
autorelease];
     
-    [(NSNumberFormatter *)[[scaleSheetController textField] formatter] 
setMinimum:[NSNumber numberWithDouble:[mainController.pdfView 
minimumScaleFactor]]];
-    [(NSNumberFormatter *)[[scaleSheetController textField] formatter] 
setMaximum:[NSNumber numberWithDouble:[mainController.pdfView 
maximumScaleFactor]]];
+    [(NSNumberFormatter *)[[scaleSheetController textField] formatter] 
setMinimum:[NSNumber numberWithDouble:[mainController.pdfView minScaleFactor]]];
+    [(NSNumberFormatter *)[[scaleSheetController textField] formatter] 
setMaximum:[NSNumber numberWithDouble:[mainController.pdfView maxScaleFactor]]];
     [[scaleSheetController textField] setDoubleValue:[mainController.pdfView 
scaleFactor]];
     
     [scaleSheetController beginSheetModalForWindow:[mainController window] 
completionHandler:^(NSInteger result) {

Modified: trunk/SKMainTouchBarController.h
===================================================================
--- trunk/SKMainTouchBarController.h    2023-11-01 16:21:22 UTC (rev 13712)
+++ trunk/SKMainTouchBarController.h    2023-11-01 18:12:46 UTC (rev 13713)
@@ -37,7 +37,6 @@
  */
 
 #import <Cocoa/Cocoa.h>
-#import "NSTouchBar_SKForwardDeclarations.h"
 #import "SKColorPicker.h"
 
 @class SKMainWindowController;

Modified: trunk/SKMainTouchBarController.m
===================================================================
--- trunk/SKMainTouchBarController.m    2023-11-01 16:21:22 UTC (rev 13712)
+++ trunk/SKMainTouchBarController.m    2023-11-01 18:12:46 UTC (rev 13713)
@@ -115,10 +115,10 @@
 }
 
 - (NSTouchBar *)makeTouchBar {
-    NSTouchBar *touchBar = [[[NSClassFromString(@"NSTouchBar") alloc] init] 
autorelease];
+    NSTouchBar *touchBar = [[[NSTouchBar alloc] init] autorelease];
     [touchBar setCustomizationIdentifier:SKDocumentTouchBarIdentifier];
     [touchBar setDelegate:self];
-    [touchBar 
setCustomizationAllowedItemIdentifiers:@[SKTouchBarItemIdentifierNavigation, 
SKTouchBarItemIdentifierNavigationFull, SKTouchBarItemIdentifierZoom, 
SKTouchBarItemIdentifierToolMode, SKTouchBarItemIdentifierAddNote, 
SKTouchBarItemIdentifierFullScreen, SKTouchBarItemIdentifierPresentation, 
SKTouchBarItemIdentifierFavoriteColors, SKTouchBarItemIdentifierColors, 
@"NSTouchBarItemIdentifierFlexibleSpace"]];
+    [touchBar 
setCustomizationAllowedItemIdentifiers:@[SKTouchBarItemIdentifierNavigation, 
SKTouchBarItemIdentifierNavigationFull, SKTouchBarItemIdentifierZoom, 
SKTouchBarItemIdentifierToolMode, SKTouchBarItemIdentifierAddNote, 
SKTouchBarItemIdentifierFullScreen, SKTouchBarItemIdentifierPresentation, 
SKTouchBarItemIdentifierFavoriteColors, SKTouchBarItemIdentifierColors, 
NSTouchBarItemIdentifierFlexibleSpace]];
     [touchBar setDefaultItemIdentifiers:@[SKTouchBarItemIdentifierNavigation, 
SKTouchBarItemIdentifierToolMode, SKTouchBarItemIdentifierAddNote, 
SKTouchBarItemIdentifierFavoriteColors]];
     return touchBar;
 }
@@ -133,14 +133,11 @@
             
             if (previousNextPageButton == nil) {
                 NSArray *images = @[[NSImage 
imageNamed:SKImageNameTouchBarPageUp], [NSImage 
imageNamed:SKImageNameTouchBarPageDown]];
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored "-Wpartial-availability"
                 previousNextPageButton = [[NSSegmentedControl 
segmentedControlWithImages:images trackingMode:NSSegmentSwitchTrackingMomentary 
target:self action:@selector(goToPreviousNextPage:)] retain];
-#pragma clang diagnostic pop
                 [self handlePageChangedNotification:nil];
                 [previousNextPageButton 
setSegmentStyle:NSSegmentStyleSeparated];
             }
-            item = [[[NSClassFromString(@"NSCustomTouchBarItem") alloc] 
initWithIdentifier:identifier] autorelease];
+            item = [[[NSCustomTouchBarItem alloc] 
initWithIdentifier:identifier] autorelease];
             [(NSCustomTouchBarItem *)item setView:previousNextPageButton];
             [(NSCustomTouchBarItem *)item 
setCustomizationLabel:NSLocalizedString(@"Previous/Next", @"Toolbar item 
label")];
             
@@ -148,14 +145,11 @@
             
             if (previousNextFirstLastPageButton == nil) {
                 NSArray *images = @[[NSImage 
imageNamed:SKImageNameTouchBarFirstPage], [NSImage 
imageNamed:SKImageNameTouchBarPageUp], [NSImage 
imageNamed:SKImageNameTouchBarPageDown], [NSImage 
imageNamed:SKImageNameTouchBarLastPage]];
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored "-Wpartial-availability"
                 previousNextFirstLastPageButton = [[NSSegmentedControl 
segmentedControlWithImages:images trackingMode:NSSegmentSwitchTrackingMomentary 
target:self action:@selector(goToPreviousNextPage:)] retain];
-#pragma clang diagnostic pop
                 [self handlePageChangedNotification:nil];
                 [previousNextFirstLastPageButton 
setSegmentStyle:NSSegmentStyleSeparated];
             }
-            item = [[[NSClassFromString(@"NSCustomTouchBarItem") alloc] 
initWithIdentifier:identifier] autorelease];
+            item = [[[NSCustomTouchBarItem alloc] 
initWithIdentifier:identifier] autorelease];
             [(NSCustomTouchBarItem *)item 
setView:previousNextFirstLastPageButton];
             [(NSCustomTouchBarItem *)item 
setCustomizationLabel:NSLocalizedString(@"Previous/Next", @"Toolbar item 
label")];
             
@@ -163,21 +157,18 @@
             
             if (zoomInActualOutButton == nil) {
                 NSArray *images = @[[NSImage 
imageNamed:SKImageNameTouchBarZoomOut], [NSImage 
imageNamed:SKImageNameTouchBarZoomActual], [NSImage 
imageNamed:SKImageNameTouchBarZoomIn]];
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored "-Wpartial-availability"
                 zoomInActualOutButton = [[NSSegmentedControl 
segmentedControlWithImages:images trackingMode:NSSegmentSwitchTrackingMomentary 
target:self action:@selector(zoomInActualOut:)] retain];
-#pragma clang diagnostic pop
                 [zoomInActualOutButton 
setSegmentStyle:NSSegmentStyleSeparated];
                 [self handleScaleChangedNotification:nil];
                 [self overviewChanged];
             }
-            item = [[[NSClassFromString(@"NSCustomTouchBarItem") alloc] 
initWithIdentifier:identifier] autorelease];
+            item = [[[NSCustomTouchBarItem alloc] 
initWithIdentifier:identifier] autorelease];
             [(NSCustomTouchBarItem *)item setView:zoomInActualOutButton];
             [(NSCustomTouchBarItem *)item 
setCustomizationLabel:NSLocalizedString(@"Zoom", @"Toolbar item label")];
             
         } else if ([identifier 
isEqualToString:SKTouchBarItemIdentifierToolMode]) {
             
-            NSTouchBar *popoverTouchBar = [[[NSClassFromString(@"NSTouchBar") 
alloc] init] autorelease];
+            NSTouchBar *popoverTouchBar = [[[NSTouchBar alloc] init] 
autorelease];
             [popoverTouchBar setDelegate:self];
             [popoverTouchBar 
setDefaultItemIdentifiers:@[SKTouchBarItemIdentifierAnnotationMode]];
             if (toolModeButton == nil) {
@@ -186,15 +177,12 @@
                                    [NSImage 
imageNamed:SKImageNameTouchBarMagnifyTool],
                                    [NSImage 
imageNamed:SKImageNameTouchBarSelectTool],
                                    [NSImage 
imageNamed:SKImageNameTouchBarTextNotePopover]];
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored "-Wpartial-availability"
                 toolModeButton = [[NSSegmentedControl 
segmentedControlWithImages:images trackingMode:NSSegmentSwitchTrackingSelectOne 
target:self action:@selector(changeToolMode:)] retain];
-#pragma clang diagnostic pop
                 [self handleToolModeChangedNotification:nil];
                 [self handleAnnotationModeChangedNotification:nil];
                 [self interactionModeChanged];
             }
-            item = [[[NSClassFromString(@"NSPopoverTouchBarItem") alloc] 
initWithIdentifier:identifier] autorelease];
+            item = [[[NSPopoverTouchBarItem alloc] 
initWithIdentifier:identifier] autorelease];
             [(NSPopoverTouchBarItem *)item 
setCollapsedRepresentation:toolModeButton];
             [(NSPopoverTouchBarItem *)item setPopoverTouchBar:popoverTouchBar];
             [(NSPopoverTouchBarItem *)item 
setPressAndHoldTouchBar:popoverTouchBar];
@@ -213,21 +201,18 @@
                                    [NSImage 
imageNamed:SKImageNameTouchBarStrikeOutNote],
                                    [NSImage 
imageNamed:SKImageNameTouchBarLineNote],
                                    [NSImage 
imageNamed:SKImageNameTouchBarInkNote]];
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored "-Wpartial-availability"
                 annotationModeButton = [[NSSegmentedControl 
segmentedControlWithImages:images trackingMode:NSSegmentSwitchTrackingSelectOne 
target:self action:@selector(changeAnnotationMode:)] retain];
-#pragma clang diagnostic pop
                 [self handleAnnotationModeChangedNotification:nil];
                 [self interactionModeChanged];
             }
-            item = [[[NSClassFromString(@"NSCustomTouchBarItem") alloc] 
initWithIdentifier:identifier] autorelease];
+            item = [[[NSCustomTouchBarItem alloc] 
initWithIdentifier:identifier] autorelease];
             [(NSCustomTouchBarItem *)item setView:annotationModeButton];
         } else if ([identifier 
isEqualToString:SKTouchBarItemIdentifierAddNote]) {
-            NSTouchBar *popoverTouchBar = [[[NSClassFromString(@"NSTouchBar") 
alloc] init] autorelease];
+            NSTouchBar *popoverTouchBar = [[[NSTouchBar alloc] init] 
autorelease];
             [popoverTouchBar setDelegate:self];
             [popoverTouchBar 
setDefaultItemIdentifiers:@[SKTouchBarItemIdentifierAddNoteTypes]];
-            item = [[[NSClassFromString(@"NSPopoverTouchBarItem") alloc] 
initWithIdentifier:identifier] autorelease];
-            [(NSPopoverTouchBarItem *)item 
setCollapsedRepresentationImage:[NSImage imageNamed:@"NSTouchBarAddTemplate"]];
+            item = [[[NSPopoverTouchBarItem alloc] 
initWithIdentifier:identifier] autorelease];
+            [(NSPopoverTouchBarItem *)item 
setCollapsedRepresentationImage:[NSImage 
imageNamed:NSImageNameTouchBarAddTemplate]];
             [(NSPopoverTouchBarItem *)item setPopoverTouchBar:popoverTouchBar];
             [(NSPopoverTouchBarItem *)item 
setCustomizationLabel:NSLocalizedString(@"Add Note", @"Toolbar item label")];
             
@@ -243,26 +228,20 @@
                                    [NSImage 
imageNamed:SKImageNameTouchBarAddStrikeOutNote],
                                    [NSImage 
imageNamed:SKImageNameTouchBarAddLineNote],
                                    [NSImage 
imageNamed:SKImageNameTouchBarAddInkNote]];
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored "-Wpartial-availability"
                 noteButton = [[NSSegmentedControl 
segmentedControlWithImages:images trackingMode:NSSegmentSwitchTrackingMomentary 
target:self action:@selector(createNewNote:)] retain];
-#pragma clang diagnostic pop
                 [self handleToolModeChangedNotification:nil];
                 [self interactionModeChanged];
             }
-            item = [[[NSClassFromString(@"NSCustomTouchBarItem") alloc] 
initWithIdentifier:identifier] autorelease];
+            item = [[[NSCustomTouchBarItem alloc] 
initWithIdentifier:identifier] autorelease];
             [(NSCustomTouchBarItem *)item setView:noteButton];
             
         } else if ([identifier 
isEqualToString:SKTouchBarItemIdentifierFullScreen]) {
             
             if (fullScreenButton == nil) {
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored "-Wpartial-availability"
-                fullScreenButton = [[NSSegmentedControl 
segmentedControlWithImages:@[[NSImage 
imageNamed:@"NSTouchBarEnterFullScreenTemplate"]] 
trackingMode:NSSegmentSwitchTrackingMomentary target:self 
action:@selector(toggleFullscreen:)] retain];
-#pragma clang diagnostic pop
+                fullScreenButton = [[NSSegmentedControl 
segmentedControlWithImages:@[[NSImage 
imageNamed:NSImageNameTouchBarEnterFullScreenTemplate]] 
trackingMode:NSSegmentSwitchTrackingMomentary target:self 
action:@selector(toggleFullscreen:)] retain];
                 [self interactionModeChanged];
             }
-            item = [[[NSClassFromString(@"NSCustomTouchBarItem") alloc] 
initWithIdentifier:identifier] autorelease];
+            item = [[[NSCustomTouchBarItem alloc] 
initWithIdentifier:identifier] autorelease];

@@ Diff output truncated at 100000 characters. @@
This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.



_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit

Reply via email to