Revision: 13402
          http://sourceforge.net/p/skim-app/code/13402
Author:   hofman
Date:     2023-03-23 10:24:47 +0000 (Thu, 23 Mar 2023)
Log Message:
-----------
ignore deprecation warnings for antialias and greekingthreshold. Only use 
greekingthreshold on 10.13-.

Modified Paths:
--------------
    trunk/SKMainWindowController.m
    trunk/SKMainWindowController_Actions.m
    trunk/SKSnapshotWindowController.m

Modified: trunk/SKMainWindowController.m
===================================================================
--- trunk/SKMainWindowController.m      2023-03-23 10:01:27 UTC (rev 13401)
+++ trunk/SKMainWindowController.m      2023-03-23 10:24:47 UTC (rev 13402)
@@ -438,9 +438,13 @@
     }
     
     // Set up the PDF
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
     [pdfView setShouldAntiAlias:[sud boolForKey:SKShouldAntiAliasKey]];
+    if (RUNNING_BEFORE(10_14))
+        [pdfView setGreekingThreshold:[sud 
floatForKey:SKGreekingThresholdKey]];
+#pragma clang diagnostic pop
     [pdfView setInterpolationQuality:[sud 
integerForKey:SKInterpolationQualityKey]];
-    [pdfView setGreekingThreshold:[sud floatForKey:SKGreekingThresholdKey]];
     [pdfView setBackgroundColor:[PDFView defaultBackgroundColor]];
     
     [self applyPDFSettings:hasWindowSetup ? savedNormalSetup : [sud 
dictionaryForKey:SKDefaultPDFDisplaySettingsKey] rewind:NO];
@@ -2577,8 +2581,11 @@
             [self resetSnapshotSizeIfNeeded];
             [rightSideController.snapshotTableView 
noteHeightOfRowsChangedAnimating:YES];
         } else if ([key isEqualToString:SKShouldAntiAliasKey]) {
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
             [pdfView setShouldAntiAlias:[[NSUserDefaults standardUserDefaults] 
boolForKey:SKShouldAntiAliasKey]];
             [secondaryPdfView setShouldAntiAlias:[[NSUserDefaults 
standardUserDefaults] boolForKey:SKShouldAntiAliasKey]];
+#pragma clang diagnostic pop
             [pdfView requiresDisplay];
             [secondaryPdfView requiresDisplay];
         } else if ([key isEqualToString:SKInterpolationQualityKey]) {
@@ -2587,9 +2594,12 @@
             [pdfView requiresDisplay];
             [secondaryPdfView requiresDisplay];
             [self allThumbnailsNeedUpdate];
-        } else if ([key isEqualToString:SKGreekingThresholdKey]) {
+        } else if ([key isEqualToString:SKGreekingThresholdKey] && 
RUNNING_BEFORE(10_14)) {
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
             [pdfView setGreekingThreshold:[[NSUserDefaults 
standardUserDefaults] floatForKey:SKGreekingThresholdKey]];
             [secondaryPdfView setGreekingThreshold:[[NSUserDefaults 
standardUserDefaults] floatForKey:SKGreekingThresholdKey]];
+#pragma clang diagnostic pop
         } else if ([key isEqualToString:SKTableFontSizeKey]) {
             [self updateTableFont];
             [self updatePageColumnWidthForTableViews:[NSArray 
arrayWithObjects:leftSideController.tocOutlineView, 
rightSideController.noteOutlineView, leftSideController.findTableView, 
leftSideController.groupedFindTableView, nil]];

Modified: trunk/SKMainWindowController_Actions.m
===================================================================
--- trunk/SKMainWindowController_Actions.m      2023-03-23 10:01:27 UTC (rev 
13401)
+++ trunk/SKMainWindowController_Actions.m      2023-03-23 10:24:47 UTC (rev 
13402)
@@ -1141,9 +1141,13 @@
             [secondaryPdfView setBackgroundColor:[pdfView backgroundColor]];
             [[secondaryPdfView scrollView] setDrawsBackground:[[pdfView 
scrollView] drawsBackground]];
             [secondaryPdfView setDisplaysPageBreaks:NO];
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
             [secondaryPdfView setShouldAntiAlias:[[NSUserDefaults 
standardUserDefaults] boolForKey:SKShouldAntiAliasKey]];
+            if (RUNNING_BEFORE(10_14))
+                [secondaryPdfView setGreekingThreshold:[[NSUserDefaults 
standardUserDefaults] floatForKey:SKGreekingThresholdKey]];
+#pragma clang diagnostic pop
             [secondaryPdfView setInterpolationQuality:[[NSUserDefaults 
standardUserDefaults] integerForKey:SKInterpolationQualityKey]];
-            [secondaryPdfView setGreekingThreshold:[[NSUserDefaults 
standardUserDefaults] floatForKey:SKGreekingThresholdKey]];
             [secondaryPdfView setSynchronizeZoom:YES];
             [secondaryPdfView setDocument:[pdfView document]];
             point.y += fixedAtBottom ? -lastSplitPDFHeight : NSHeight(frame) - 
position - [pdfSplitView dividerThickness];

Modified: trunk/SKSnapshotWindowController.m
===================================================================
--- trunk/SKSnapshotWindowController.m  2023-03-23 10:01:27 UTC (rev 13401)
+++ trunk/SKSnapshotWindowController.m  2023-03-23 10:24:47 UTC (rev 13402)
@@ -301,9 +301,13 @@
     [pdfView setAutoScales:NO];
     [pdfView setDisplaysPageBreaks:NO];
     [pdfView setDisplayBox:kPDFDisplayBoxCropBox];
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
     [pdfView setShouldAntiAlias:[[NSUserDefaults standardUserDefaults] 
boolForKey:SKShouldAntiAliasKey]];
+    if (RUNNING_BEFORE(10_14))
+        [pdfView setGreekingThreshold:[[NSUserDefaults standardUserDefaults] 
floatForKey:SKGreekingThresholdKey]];
+#pragma clang diagnostic pop
     [pdfView setInterpolationQuality:[[NSUserDefaults standardUserDefaults] 
integerForKey:SKInterpolationQualityKey]];
-    [pdfView setGreekingThreshold:[[NSUserDefaults standardUserDefaults] 
floatForKey:SKGreekingThresholdKey]];
     [pdfView setBackgroundColor:[PDFView defaultBackgroundColor]];
     [pdfView setDocument:pdfDocument];
     
@@ -669,13 +673,19 @@
             if ([[self window] isVisible])
                 [self updateWindowLevel];
         } else if ([key isEqualToString:SKShouldAntiAliasKey]) {
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
             [pdfView setShouldAntiAlias:[[NSUserDefaults standardUserDefaults] 
boolForKey:SKShouldAntiAliasKey]];
+#pragma clang diagnostic pop
             [pdfView requiresDisplay];
         } else if ([key isEqualToString:SKInterpolationQualityKey]) {
-            [pdfView setShouldAntiAlias:[[NSUserDefaults standardUserDefaults] 
integerForKey:SKInterpolationQualityKey]];
+            [pdfView setInterpolationQuality:[[NSUserDefaults 
standardUserDefaults] integerForKey:SKInterpolationQualityKey]];
             [pdfView requiresDisplay];
-        } else if ([key isEqualToString:SKGreekingThresholdKey]) {
+        } else if ([key isEqualToString:SKGreekingThresholdKey] && 
RUNNING_BEFORE(10_14)) {
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
             [pdfView setGreekingThreshold:[[NSUserDefaults 
standardUserDefaults] floatForKey:SKGreekingThresholdKey]];
+#pragma clang diagnostic pop
         } else if ([key isEqualToString:SKBackgroundColorKey] || [key 
isEqualToString:SKDarkBackgroundColorKey]) {
             [pdfView setBackgroundColor:[PDFView defaultBackgroundColor]];
         }

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