Revision: 13724
http://sourceforge.net/p/skim-app/code/13724
Author: hofman
Date: 2023-11-02 17:02:51 +0000 (Thu, 02 Nov 2023)
Log Message:
-----------
use @available
Modified Paths:
--------------
trunk/NSColor_SKExtensions.m
trunk/NSGraphics_SKExtensions.m
trunk/PDFAnnotationLine_SKExtensions.m
trunk/PDFView_SKExtensions.m
trunk/SKApplicationController.m
trunk/SKAttachmentEmailer.m
trunk/SKBasePDFView.m
trunk/SKBookmarkController.m
trunk/SKColorSwatch.m
trunk/SKCompatibility.h
trunk/SKConversionProgressController.m
trunk/SKDisplayPreferences.m
trunk/SKDownloadController.m
trunk/SKHighlightingTableRowView.m
trunk/SKImageToolTipWindow.m
trunk/SKInfoWindowController.m
trunk/SKLoupeController.m
trunk/SKMainDocument.m
trunk/SKMainToolbarController.m
trunk/SKMainWindowController.m
trunk/SKMainWindowController_Actions.m
trunk/SKMainWindowController_FullScreen.m
trunk/SKMainWindowController_UI.m
trunk/SKNavigationWindow.m
trunk/SKNoteOutlineView.m
trunk/SKNoteTableRowView.m
trunk/SKNoteText.m
trunk/SKNoteWindowController.m
trunk/SKNotesDocument.m
trunk/SKPDFView.m
trunk/SKPresentationOptionsSheetController.m
trunk/SKSideViewController.m
trunk/SKSideWindow.m
trunk/SKSnapshotWindowController.m
trunk/SKTemplateManager.m
trunk/SKTextNoteEditor.m
trunk/SKThumbnailImageView.m
trunk/SKThumbnailView.m
trunk/SKTopBarView.m
trunk/Skim_Prefix.pch
Modified: trunk/NSColor_SKExtensions.m
===================================================================
--- trunk/NSColor_SKExtensions.m 2023-11-02 15:20:56 UTC (rev 13723)
+++ trunk/NSColor_SKExtensions.m 2023-11-02 17:02:51 UTC (rev 13724)
@@ -56,7 +56,9 @@
__block NSColor *inactiveOut = nil;
__block NSColor *activeIn = nil;
__block NSColor *inactiveIn = nil;
- NSColorSpace *colorSpace = RUNNING_BEFORE(10_14) ? [NSColorSpace
genericRGBColorSpace] : [NSColorSpace sRGBColorSpace];
+ NSColorSpace *colorSpace = [NSColorSpace genericRGBColorSpace];
+ if (@available(macOS 10.14, *))
+ colorSpace = [NSColorSpace sRGBColorSpace];
SKRunWithLightAppearance(^{
activeOut = [[NSColor alternateSelectedControlColor]
colorUsingColorSpace:colorSpace];
inactiveOut = [[NSColor grayColor] colorUsingColorSpace:colorSpace];
Modified: trunk/NSGraphics_SKExtensions.m
===================================================================
--- trunk/NSGraphics_SKExtensions.m 2023-11-02 15:20:56 UTC (rev 13723)
+++ trunk/NSGraphics_SKExtensions.m 2023-11-02 17:02:51 UTC (rev 13724)
@@ -56,48 +56,48 @@
#endif
BOOL SKHasDarkAppearance(id object) {
- if (RUNNING_AFTER(10_13)) {
+ if (@available(macOS 10.14, *)) {
id appearance = nil;
if (object == nil)
appearance = [NSAppearance currentAppearance];
else if ([object respondsToSelector:@selector(effectiveAppearance)])
appearance = [(id<NSAppearanceCustomization>)object
effectiveAppearance];
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored "-Wpartial-availability"
return [[appearance
bestMatchFromAppearancesWithNames:@[@"NSAppearanceNameAqua",
@"NSAppearanceNameDarkAqua"]] isEqualToString:@"NSAppearanceNameDarkAqua"];
-#pragma clang diagnostic pop
}
return NO;
}
BOOL SKHasHighContrastDarkAppearance(id object) {
- if (RUNNING_AFTER(10_13)) {
+ if (@available(macOS 10.14, *)) {
id appearance = nil;
if (object == nil)
appearance = [NSAppearance currentAppearance];
else if ([object respondsToSelector:@selector(effectiveAppearance)])
appearance = [(id<NSAppearanceCustomization>)object
effectiveAppearance];
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored "-Wpartial-availability"
return [[appearance
bestMatchFromAppearancesWithNames:@[@"NSAppearanceNameDarkAqua",
@"NSAppearanceNameAccessibilityDarkAqua"]]
isEqualToString:@"NSAppearanceNameAccessibilityDarkAqua"];
-#pragma clang diagnostic pop
}
return NO;
}
void SKSetHasDarkAppearance(id object) {
- if (RUNNING_AFTER(10_13) && [object
respondsToSelector:@selector(setAppearance:)])
- [(id<NSAppearanceCustomization>)object setAppearance:[NSAppearance
appearanceNamed:@"NSAppearanceNameDarkAqua"]];
+ if (@available(macOS 10.14, *)) {
+ if ([object respondsToSelector:@selector(setAppearance:)])
+ [(id<NSAppearanceCustomization>)object setAppearance:[NSAppearance
appearanceNamed:@"NSAppearanceNameDarkAqua"]];
+ }
}
void SKSetHasLightAppearance(id object) {
- if (RUNNING_AFTER(10_13) && [object
respondsToSelector:@selector(setAppearance:)])
- [(id<NSAppearanceCustomization>)object setAppearance:[NSAppearance
appearanceNamed:@"NSAppearanceNameAqua"]];
+ if (@available(macOS 10.14, *)) {
+ if ([object respondsToSelector:@selector(setAppearance:)])
+ [(id<NSAppearanceCustomization>)object setAppearance:[NSAppearance
appearanceNamed:@"NSAppearanceNameAqua"]];
+ }
}
void SKSetHasDefaultAppearance(id object) {
- if (RUNNING_AFTER(10_13) && [object
respondsToSelector:@selector(setAppearance:)])
- [(id<NSAppearanceCustomization>)object setAppearance:nil];
+ if (@available(macOS 10.14, *)) {
+ if ([object respondsToSelector:@selector(setAppearance:)])
+ [(id<NSAppearanceCustomization>)object setAppearance:nil];
+ }
}
void SKRunWithAppearance(id object, void (^code)(void)) {
Modified: trunk/PDFAnnotationLine_SKExtensions.m
===================================================================
--- trunk/PDFAnnotationLine_SKExtensions.m 2023-11-02 15:20:56 UTC (rev
13723)
+++ trunk/PDFAnnotationLine_SKExtensions.m 2023-11-02 17:02:51 UTC (rev
13724)
@@ -105,7 +105,7 @@
}
+ (void)load {
- if (RUNNING(10_13))
+ if (@available(macOS 10.14, *)) {} else
original_setBounds = (void (*)(id, SEL,
NSRect))SKReplaceInstanceMethodImplementationFromSelector(self,
@selector(setBounds:), @selector(replacement_setBounds:));
}
Modified: trunk/PDFView_SKExtensions.m
===================================================================
--- trunk/PDFView_SKExtensions.m 2023-11-02 15:20:56 UTC (rev 13723)
+++ trunk/PDFView_SKExtensions.m 2023-11-02 17:02:51 UTC (rev 13724)
@@ -322,7 +322,7 @@
}
- (BOOL)drawsActiveSelections {
- if (RUNNING_AFTER(10_14))
+ if (@available(macOS 10.15, *))
return [[self window] isKeyWindow];
else
return YES;
Modified: trunk/SKApplicationController.m
===================================================================
--- trunk/SKApplicationController.m 2023-11-02 15:20:56 UTC (rev 13723)
+++ trunk/SKApplicationController.m 2023-11-02 17:02:51 UTC (rev 13724)
@@ -341,10 +341,11 @@
[remoteStateWindow setAutoHideTimeInterval:timeInterval];
contentRect.origin = NSZeroPoint;
NSVisualEffectView *contentView = [[NSVisualEffectView alloc]
init];
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored "-Wpartial-availability"
- [contentView setMaterial:RUNNING_BEFORE(10_14) ?
NSVisualEffectMaterialAppearanceBased :
NSVisualEffectMaterialUnderWindowBackground];
-#pragma clang diagnostic pop
+
+ if (@available(macOS 10.14, *))
+ [contentView
setMaterial:NSVisualEffectMaterialUnderWindowBackground];
+ else
+ [contentView
setMaterial:NSVisualEffectMaterialAppearanceBased];
[contentView setState:NSVisualEffectStateActive];
[remoteStateWindow setContentView:contentView];
[contentView setMaskImage:[NSImage
maskImageWithSize:contentRect.size cornerRadius:10.0]];
Modified: trunk/SKAttachmentEmailer.m
===================================================================
--- trunk/SKAttachmentEmailer.m 2023-11-02 15:20:56 UTC (rev 13723)
+++ trunk/SKAttachmentEmailer.m 2023-11-02 17:02:51 UTC (rev 13724)
@@ -50,11 +50,8 @@
+ (BOOL)permissionToComposeMessage {
#if !SDK_BEFORE(10_14)
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored "-Wpartial-availability"
- if (AEDeterminePermissionToAutomateTarget != NULL)
+ if (@available(macOS 10.14, *))
return [[[[self alloc] init] autorelease] permissionToComposeMessage];
-#pragma clang diagnostic pop
#endif
return YES;
}
@@ -86,13 +83,10 @@
- (BOOL)permissionToComposeMessage {
#if !SDK_BEFORE(10_14)
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored "-Wpartial-availability"
- if (AEDeterminePermissionToAutomateTarget != NULL) {
+ if (@available(macOS 10.14, *)) {
NSAppleEventDescriptor *targetDescriptor = [NSAppleEventDescriptor
descriptorWithBundleIdentifier:mailAppID];
return noErr ==
AEDeterminePermissionToAutomateTarget(targetDescriptor.aeDesc, typeWildCard,
typeWildCard, true);
}
-#pragma clang diagnostic pop
#endif
return YES;
}
Modified: trunk/SKBasePDFView.m
===================================================================
--- trunk/SKBasePDFView.m 2023-11-02 15:20:56 UTC (rev 13723)
+++ trunk/SKBasePDFView.m 2023-11-02 17:02:51 UTC (rev 13724)
@@ -70,7 +70,7 @@
#pragma mark Dark mode and color inversion
static inline NSArray *defaultKeysToObserve() {
- if (RUNNING_AFTER(10_13))
+ if (@available(macOS 10.14, *))
return @[SKInvertColorsInDarkModeKey, SKSepiaToneKey, SKWhitePointKey];
else
return @[SKSepiaToneKey, SKWhitePointKey];
@@ -78,17 +78,17 @@
// make sure we don't use the same method name as a superclass or a subclass
- (void)commonBaseInitialization {
- if (RUNNING_AFTER(10_13)) {
+ if (@available(macOS 10.14, *)) {
SKSetHasDefaultAppearance(self);
SKSetHasLightAppearance([[self scrollView] contentView]);
if ([[NSUserDefaults standardUserDefaults]
boolForKey:SKInvertColorsInDarkModeKey])
SKSetHasLightAppearance([self scrollView]);
- if (RUNNING(10_14)) {
+ if (@available(macOS 10.15, *)) {} else if (@available(macOS 10.14,
*)) {
[self handleScrollerStyleChangedNotification:nil];
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(handleScrollerStyleChangedNotification:)
-
name:NSPreferredScrollerStyleDidChangeNotification object:nil];
+
name:NSPreferredScrollerStyleDidChangeNotification object:nil];
}
}
@@ -137,10 +137,8 @@
}
- (void)viewDidChangeEffectiveAppearance {
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored "-Wpartial-availability"
- [super viewDidChangeEffectiveAppearance];
-#pragma clang diagnostic pop
+ if (@available(macOS 10.14, *))
+ [super viewDidChangeEffectiveAppearance];
[[self scrollView] setContentFilters:SKColorEffectFilters()];
}
@@ -156,23 +154,20 @@
- (void)setDisplaysPageBreaks:(BOOL)pageBreaks {
[super setDisplaysPageBreaks:pageBreaks];
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored "-Wpartial-availability"
- if ([self respondsToSelector:@selector(enablePageShadows:)])
+ if (@available(macOS 10.14, *))
[self enablePageShadows:pageBreaks];
-#pragma clang diagnostic pop
}
#pragma mark Bug fixes
- (void)goToRect:(NSRect)rect onPage:(PDFPage *)page {
- if (RUNNING(10_13)) {
+ if (@available(macOS 10.14, *)) {
+ [super goToRect:rect onPage:page];
+ } else {
NSView *docView = [self documentView];
if ([self isPageAtIndexDisplayed:[page pageIndex]] == NO)
[self goToPage:page];
[docView scrollRectToVisible:[self convertRect:[self convertRect:rect
fromPage:page] toView:docView]];
- } else {
- [super goToRect:rect onPage:page];
}
}
Modified: trunk/SKBookmarkController.m
===================================================================
--- trunk/SKBookmarkController.m 2023-11-02 15:20:56 UTC (rev 13723)
+++ trunk/SKBookmarkController.m 2023-11-02 17:02:51 UTC (rev 13724)
@@ -84,7 +84,8 @@
#define SKImageNameSeparator @"SKSeparator"
-#define INDENT (RUNNING_AFTER(10_15) ? 9.0 : 16.0)
+#define INDENT 9.0
+#define OLD_INDENT 16.0
#define SAVE_DELAY 10.0
@@ -903,7 +904,11 @@
NSTableColumn *tableColumn = [ov outlineTableColumn];
NSTableCellView *view = [ov makeViewWithIdentifier:[tableColumn
identifier] owner:self];
__block NSInteger validCount = 0;
- NSRect frame = NSMakeRect(0.0, 0.0, [tableColumn width] - INDENT, [ov
rowHeight]);
+ NSRect frame = NSMakeRect(0.0, 0.0, [tableColumn width], [ov
rowHeight]);
+ if (@available(macOS 11.0, *))
+ frame.size.width -= INDENT;
+ else
+ frame.size.width -= OLD_INDENT;
[view setFrame:frame];
frame.origin = [draggingInfo draggingLocation];
@@ -1005,7 +1010,7 @@
BOOL isSep = ([item bookmarkType] == SKBookmarkTypeSeparator);
NSString *identifier = isSep ? @"separator" : [tableColumn identifier];
NSTableCellView *view = [ov makeViewWithIdentifier:identifier owner:self];
- if (!RUNNING_AFTER(10_15)) {
+ if (@available(macOS 11.0, *)) {} else {
BOOL isLast = [[tableColumn identifier] isEqualToString:FILE_COLUMNID];
if (isLast || isSep)
[[view constraintWithFirstItem:view
firstAttribute:NSLayoutAttributeTrailing] setConstant:isSep == NO ? 4.0 :
isLast ? 2.0 : 0.0];
@@ -1158,7 +1163,7 @@
[item setLabels:NSLocalizedString(@"New Folder", @"Toolbar item label")];
[item setToolTip:NSLocalizedString(@"Add a New Folder", @"Tool tip
message")];
[item setViewWithSizes:folderSegmentedControl];
- if (!RUNNING_AFTER(10_15))
+ if (@available(macOS 11.0, *)) {} else
[folderSegmentedControl setImageScaling:NSImageScaleNone forSegment:0];
[dict setObject:item forKey:SKBookmarksNewFolderToolbarItemIdentifier];
[item release];
@@ -1168,7 +1173,7 @@
[item setToolTip:NSLocalizedString(@"Add a New Separator", @"Tool tip
message")];
[item setImage:[NSImage imageNamed:SKImageNameToolbarNewSeparator]];
[item setViewWithSizes:separatorSegmentedControl];
- if (!RUNNING_AFTER(10_15))
+ if (@available(macOS 11.0, *)) {} else
[separatorSegmentedControl setImageScaling:NSImageScaleNone
forSegment:0];
[dict setObject:item forKey:SKBookmarksNewSeparatorToolbarItemIdentifier];
[item release];
@@ -1179,7 +1184,7 @@
[item setImage:[NSImage imageNamed:SKImageNameToolbarDelete]];
[item setViewWithSizes:deleteSegmentedControl];
[deleteSegmentedControl setEnabled:[outlineView canDelete]];
- if (!RUNNING_AFTER(10_15))
+ if (@available(macOS 11.0, *)) {} else
[deleteSegmentedControl setImageScaling:NSImageScaleNone forSegment:0];
[dict setObject:item forKey:SKBookmarksDeleteToolbarItemIdentifier];
[item release];
Modified: trunk/SKColorSwatch.m
===================================================================
--- trunk/SKColorSwatch.m 2023-11-02 15:20:56 UTC (rev 13723)
+++ trunk/SKColorSwatch.m 2023-11-02 17:02:51 UTC (rev 13724)
@@ -302,7 +302,9 @@
- (void)drawFocusRingMask {
NSRect rect = [self focusRingMaskBounds];
if (NSIsEmptyRect(rect) == NO) {
- CGFloat r = RUNNING_AFTER(10_15) ? 3.0 : 2.0;
+ CGFloat r = 2.0;
+ if (@available(macOS 11.0, *))
+ r = 3.0;
[[NSBezierPath bezierPathWithRoundedRect:rect xRadius:r yRadius:r]
fill];
}
}
@@ -376,7 +378,9 @@
draggedIndex = i;
NSColor *color = [colors objectAtIndex:i];
- CGFloat r = RUNNING_AFTER(10_15) ? 2.5 : 1.5;
+ CGFloat r = 1.5;
+ if (@available(macOS 11.0, *))
+ r = 2.5;
NSImage *image = [NSImage
bitmapImageWithSize:NSMakeSize(12.0, 12.0) scale:[self backingScale]
drawingHandler:^(NSRect rect){
[color drawSwatchInRect:NSInsetRect(rect, 1.0, 1.0)];
@@ -977,8 +981,12 @@
if (NSWidth(rect) < 5.0)
return;
rect = NSInsetRect(rect, 2.0, 2.0);
- CGFloat r = RUNNING_AFTER(10_15) ? 3.0 : 2.0;
- BOOL disabled = RUNNING_AFTER(10_13) && [[self window] isMainWindow] == NO
&& [[self window] isKeyWindow] == NO && ([self isDescendantOf:[[self window]
contentView]] == NO || [[self window]
isKindOfClass:NSClassFromString(@"NSToolbarSnapshotWindow")]);
+ CGFloat r = 2.0;
+ if (@available(macOS 11.0, *))
+ r = 3.0;
+ BOOL disabled = NO;
+ if (@available(macOS 10.14, *))
+ disabled = [[self window] isMainWindow] == NO && [[self window]
isKeyWindow] == NO && ([self isDescendantOf:[[self window] contentView]] == NO
|| [[self window] isKindOfClass:NSClassFromString(@"NSToolbarSnapshotWindow")]);
CGFloat stroke = [[NSWorkspace sharedWorkspace]
accessibilityDisplayShouldIncreaseContrast] ? 0.55 : 0.25;
NSBezierPath *path = [NSBezierPath
bezierPathWithRoundedRect:NSInsetRect(rect, 0.5, 0.5) xRadius:r - 0.5 yRadius:r
- 0.5];
Modified: trunk/SKCompatibility.h
===================================================================
--- trunk/SKCompatibility.h 2023-11-02 15:20:56 UTC (rev 13723)
+++ trunk/SKCompatibility.h 2023-11-02 17:02:51 UTC (rev 13724)
@@ -74,47 +74,6 @@
#if SDK_BEFORE(10_14)
-static const NSAppKitVersion NSAppKitVersionNumber10_13 = 1561;
-static const NSAppKitVersion NSAppKitVersionNumber10_14 = 1671;
-static const NSAppKitVersion NSAppKitVersionNumber10_15 = 1894;
-static const NSAppKitVersion NSAppKitVersionNumber11_0 = 2022;
-static const NSAppKitVersion NSAppKitVersionNumber12_0 = 2113;
-static const NSAppKitVersion NSAppKitVersionNumber13_0 = 2299;
-
-#elif SDK_BEFORE(10_15)
-
-static const NSAppKitVersion NSAppKitVersionNumber10_14 = 1671;
-static const NSAppKitVersion NSAppKitVersionNumber10_15 = 1894;
-static const NSAppKitVersion NSAppKitVersionNumber11_0 = 2022;
-static const NSAppKitVersion NSAppKitVersionNumber12_0 = 2113;
-static const NSAppKitVersion NSAppKitVersionNumber13_0 = 2299;
-
-#elif SDK_BEFORE(11_0)
-
-static const NSAppKitVersion NSAppKitVersionNumber10_15 = 1894;
-static const NSAppKitVersion NSAppKitVersionNumber11_0 = 2022;
-static const NSAppKitVersion NSAppKitVersionNumber12_0 = 2113;
-static const NSAppKitVersion NSAppKitVersionNumber13_0 = 2299;
-
-#elif SDK_BEFORE(12_0)
-
-static const NSAppKitVersion NSAppKitVersionNumber11_0 = 2022;
-static const NSAppKitVersion NSAppKitVersionNumber12_0 = 2113;
-static const NSAppKitVersion NSAppKitVersionNumber13_0 = 2299;
-
-#elif SDK_BEFORE(13_0)
-
-static const NSAppKitVersion NSAppKitVersionNumber12_0 = 2113;
-static const NSAppKitVersion NSAppKitVersionNumber13_0 = 2299;
-
-#elif SDK_BEFORE(14_0)
-
-static const NSAppKitVersion NSAppKitVersionNumber13_0 = 2299;
-
-#endif
-
-#if SDK_BEFORE(10_14)
-
enum {
NSVisualEffectMaterialHeaderView = 10,
NSVisualEffectMaterialSheet = 11,
Modified: trunk/SKConversionProgressController.m
===================================================================
--- trunk/SKConversionProgressController.m 2023-11-02 15:20:56 UTC (rev
13723)
+++ trunk/SKConversionProgressController.m 2023-11-02 17:02:51 UTC (rev
13724)
@@ -230,12 +230,16 @@
NSString *toolPath = [toolPaths objectForKey:fileType];
if (toolPath == nil) {
NSWorkspace *ws = [NSWorkspace sharedWorkspace];
- if ([ws type:fileType conformsToType:SKDVIDocumentType])
- toolPath = toolPathForCommand(SKDviConversionCommandKey,
RUNNING_AFTER(13_0) ? @[@"dvipdfmx", @"dvipdfm", @"dvipdf"] : @[@"dvipdfmx",
@"dvipdfm", @"dvipdf", @"dvips"]);
- else if ([ws type:fileType conformsToType:SKXDVDocumentType])
+ if ([ws type:fileType conformsToType:SKDVIDocumentType]) {
+ if (@available(macOS 14.0, *))
+ toolPath = toolPathForCommand(SKDviConversionCommandKey,
@[@"dvipdfmx", @"dvipdfm", @"dvipdf"]);
+ else
+ toolPath = toolPathForCommand(SKDviConversionCommandKey,
@[@"dvipdfmx", @"dvipdfm", @"dvipdf", @"dvips"]);
+ } else if ([ws type:fileType conformsToType:SKXDVDocumentType]) {
toolPath = toolPathForCommand(SKXdvConversionCommandKey,
@[@"xdvipdfmx", @"dvipdfmx", @"xdv2pdf"]);
- else if ([ws type:fileType conformsToType:SKPostScriptDocumentType])
+ } else if ([ws type:fileType conformsToType:SKPostScriptDocumentType])
{
toolPath = toolPathForCommand(SKPSConversionCommandKey,
@[@"ps2pdf", @"ps2pdf12", @"ps2pdf13", @"ps2pdf14", @"pstopdf"]);
+ }
if (toolPath) {
if (toolPaths == nil)
toolPaths = [[NSMutableDictionary alloc] init];
@@ -272,8 +276,11 @@
NSWorkspace *ws = [NSWorkspace sharedWorkspace];
CGDataProviderRef provider = NULL;
+ BOOL useTask = [ws type:fileType conformsToType:SKPostScriptDocumentType]
== NO;
+ if (@available(macOS 14.0, *))
+ useTask = YES;
- if (RUNNING_AFTER(13_0) || [ws type:fileType
conformsToType:SKPostScriptDocumentType] == NO) {
+ if (useTask) {
NSString *toolPath = [[self class] toolPathForType:fileType];
if (toolPath) {
Modified: trunk/SKDisplayPreferences.m
===================================================================
--- trunk/SKDisplayPreferences.m 2023-11-02 15:20:56 UTC (rev 13723)
+++ trunk/SKDisplayPreferences.m 2023-11-02 17:02:51 UTC (rev 13724)
@@ -63,7 +63,7 @@
@dynamic allowsDarkMode;
- (void)dealloc {
- if (RUNNING_AFTER(10_13)) {
+ if (@available(macOS 10.14, *)) {
@try {
[[NSUserDefaultsController sharedUserDefaultsController]
removeObserver:self forKeys:@[SKBackgroundColorKey,
SKFullScreenBackgroundColorKey, SKDarkBackgroundColorKey,
SKDarkFullScreenBackgroundColorKey,]
context:&SKDisplayPreferencesDefaultsObservationContext];
}
@@ -97,7 +97,7 @@
[colorSwatch addObserver:self forKeyPath:@"selectedColorIndex" options:0
context:&SKDisplayPreferencesColorSwatchObservationContext];
[colorSwatch addObserver:self forKeyPath:@"colors" options:0
context:&SKDisplayPreferencesColorSwatchObservationContext];
- if (RUNNING_AFTER(10_13)) {
+ if (@available(macOS 10.14, *)) {
[normalColorWell unbind:NSValueBinding];
[normalColorWell setAction:@selector(changeBackgroundColor:)];
[normalColorWell setTarget:self];
@@ -125,7 +125,10 @@
}
- (BOOL)allowsDarkMode {
- return RUNNING_AFTER(10_13);
+ if (@available(macOS 10.14, *))
+ return YES;
+ else
+ return NO;
}
#pragma mark Actions
Modified: trunk/SKDownloadController.m
===================================================================
--- trunk/SKDownloadController.m 2023-11-02 15:20:56 UTC (rev 13723)
+++ trunk/SKDownloadController.m 2023-11-02 17:02:51 UTC (rev 13724)
@@ -596,7 +596,7 @@
} else if ([itemIdent
isEqualToString:SKDownloadsToolbarClearItemIdentifier]) {
item = [[[NSToolbarItem alloc]
initWithItemIdentifier:SKDownloadsToolbarClearItemIdentifier] autorelease];
[item setView:clearButton];
- if(!RUNNING_AFTER(10_15)){
+ if (@available(macOS 11.0, *)) {} else {
[item setMinSize:[clearButton bounds].size];
[item setMaxSize:[clearButton bounds].size];
}
Modified: trunk/SKHighlightingTableRowView.m
===================================================================
--- trunk/SKHighlightingTableRowView.m 2023-11-02 15:20:56 UTC (rev 13723)
+++ trunk/SKHighlightingTableRowView.m 2023-11-02 17:02:51 UTC (rev 13724)
@@ -99,7 +99,7 @@
if (highlightLevel != newHighlightLevel) {
highlightLevel = newHighlightLevel;
if (supportsHighlights) {
- if (RUNNING_AFTER(10_15))
+ if (@available(macOS 11.0, *))
[self updateHighlightView];
else
[self setNeedsDisplay:YES];
@@ -110,8 +110,10 @@
- (void)setSelected:(BOOL)selected {
if (selected != [self isSelected]) {
[super setSelected:selected];
- if (supportsHighlights && RUNNING_AFTER(10_15))
- [self updateHighlightView];
+ if (supportsHighlights) {
+ if (@available(macOS 11.0, *))
+ [self updateHighlightView];
+ }
}
}
@@ -118,7 +120,7 @@
- (void)setEmphasized:(BOOL)emphasized {
[super setEmphasized:emphasized];
if (supportsHighlights) {
- if (RUNNING_AFTER(10_15))
+ if (@available(macOS 11.0, *))
[highlightView setEmphasized:emphasized];
else if ([self isSelected] == NO && [self highlightLevel] > 0)
[self setNeedsDisplay:YES];
@@ -137,21 +139,23 @@
}
- (void)drawBackgroundInRect:(NSRect)dirtyRect {
- if (!RUNNING_AFTER(10_15) && supportsHighlights &&
- [self isSelected] == NO && [self highlightLevel] > 0 && [self
isEmphasized]) {
- NSRect rect = [[self viewAtColumn:0] frame];
- rgba color;
- [[[NSColor selectedMenuItemColor] colorUsingColorSpace:[NSColorSpace
sRGBColorSpace]] getRed:&color.r green:&color.g blue:&color.b alpha:NULL];
- color.a = fmin(1.0, 0.1 * [self highlightLevel]);
- CGColorSpaceRef colorSpace =
CGColorSpaceCreateWithName(kCGColorSpaceSRGB);
- CGFloat domain[] = {0.0, 1.0};
- CGFloat range[] = {0.0, 1.0, 0.0, 1.0, 0.0, 1.0, 0.0, 1.0};
- CGFunctionCallbacks callbacks = {0, &evaluateHighlight, NULL};
- CGFunctionRef function = CGFunctionCreate((void *)&color, 1, domain,
4, range, &callbacks);
- CGShadingRef shading = CGShadingCreateAxial(colorSpace,
CGPointMake(NSMinX(rect), 0.0), CGPointMake(NSMaxX(rect), 0.0), function,
false, false);
- CGColorSpaceRelease(colorSpace);
- CGContextDrawShading([[NSGraphicsContext currentContext] CGContext],
shading);
- CGShadingRelease(shading);
+ if (@available(macOS 11.0, *)) {} else {
+ if (supportsHighlights &&
+ [self isSelected] == NO && [self highlightLevel] > 0 && [self
isEmphasized]) {
+ NSRect rect = [[self viewAtColumn:0] frame];
+ rgba color;
+ [[[NSColor selectedMenuItemColor]
colorUsingColorSpace:[NSColorSpace sRGBColorSpace]] getRed:&color.r
green:&color.g blue:&color.b alpha:NULL];
+ color.a = fmin(1.0, 0.1 * [self highlightLevel]);
+ CGColorSpaceRef colorSpace =
CGColorSpaceCreateWithName(kCGColorSpaceSRGB);
+ CGFloat domain[] = {0.0, 1.0};
+ CGFloat range[] = {0.0, 1.0, 0.0, 1.0, 0.0, 1.0, 0.0, 1.0};
+ CGFunctionCallbacks callbacks = {0, &evaluateHighlight, NULL};
+ CGFunctionRef function = CGFunctionCreate((void *)&color, 1,
domain, 4, range, &callbacks);
+ CGShadingRef shading = CGShadingCreateAxial(colorSpace,
CGPointMake(NSMinX(rect), 0.0), CGPointMake(NSMaxX(rect), 0.0), function,
false, false);
+ CGColorSpaceRelease(colorSpace);
+ CGContextDrawShading([[NSGraphicsContext currentContext]
CGContext], shading);
+ CGShadingRelease(shading);
+ }
}
[super drawBackgroundInRect:dirtyRect];
Modified: trunk/SKImageToolTipWindow.m
===================================================================
--- trunk/SKImageToolTipWindow.m 2023-11-02 15:20:56 UTC (rev 13723)
+++ trunk/SKImageToolTipWindow.m 2023-11-02 17:02:51 UTC (rev 13724)
@@ -82,12 +82,9 @@
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(orderOut:)
name:NSApplicationWillResignActiveNotification object:NSApp];
- if (RUNNING_AFTER(10_13)) {
+ if (@available(macOS 10.14, *)) {
NSVisualEffectView *backgroundView = [[[NSVisualEffectView alloc]
init] autorelease];
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored "-Wpartial-availability"
[backgroundView setMaterial:NSVisualEffectMaterialToolTip];
-#pragma clang diagnostic push
[backgroundView setState:NSVisualEffectStateActive];
[backgroundView setAutoresizingMask:NSViewWidthSizable |
NSViewHeightSizable];
[self setContentView:backgroundView];
Modified: trunk/SKInfoWindowController.m
===================================================================
--- trunk/SKInfoWindowController.m 2023-11-02 15:20:56 UTC (rev 13723)
+++ trunk/SKInfoWindowController.m 2023-11-02 17:02:51 UTC (rev 13724)
@@ -154,12 +154,9 @@
- (void)windowDidLoad {
[self setWindowFrameAutosaveName:SKInfoWindowFrameAutosaveName];
- if ([summaryTableView respondsToSelector:@selector(setStyle:)]) {
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored "-Wpartial-availability"
+ if (@available(macOS 11.0, *)) {
[summaryTableView setStyle:NSTableViewStylePlain];
[attributesTableView setStyle:NSTableViewStylePlain];
-#pragma clang diagnostic pop
}
NSArray *tables = [NSArray arrayWithObjects:summaryTableView,
attributesTableView, nil];
Modified: trunk/SKLoupeController.m
===================================================================
--- trunk/SKLoupeController.m 2023-11-02 15:20:56 UTC (rev 13723)
+++ trunk/SKLoupeController.m 2023-11-02 17:02:51 UTC (rev 13724)
@@ -95,7 +95,7 @@
[layer setActions:@{@"contents":[NSNull null]}];
[layer setAutoresizingMask:kCALayerWidthSizable | kCALayerHeightSizable];
[layer setFrame:NSRectToCGRect([pdfView bounds])];
- if (RUNNING_BEFORE(10_14)) {
+ if (@available(macOS 10.14, *)) {} else {
CGColorRef borderColor = CGColorCreateGenericGray(LOUPE_BORDER_GRAY,
1.0);
[layer setBorderColor:borderColor];
[layer setBorderWidth:LOUPE_BORDER_WIDTH];
@@ -116,7 +116,7 @@
}
- (void)updateBackgroundColor {
- if (RUNNING_AFTER(10_13)) {
+ if (@available(macOS 10.14, *)) {
BOOL hasBackgroundView = NO;
NSView *loupeView = [window contentView];
if ([[loupeView subviews] count] > 0) {
@@ -125,8 +125,6 @@
}
NSColor *bgColor = [pdfView backgroundColor];
NSVisualEffectMaterial material = 0;
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored "-Wpartial-availability"
if ([bgColor isEqual:[NSColor windowBackgroundColor]])
material = NSVisualEffectMaterialWindowBackground;
else if ([bgColor isEqual:[NSColor controlBackgroundColor]] ||
[bgColor isEqual:[NSColor textBackgroundColor]])
@@ -133,7 +131,6 @@
material = NSVisualEffectMaterialContentBackground;
else if ([bgColor isEqual:[NSColor underPageBackgroundColor]])
material = NSVisualEffectMaterialUnderPageBackground;
-#pragma clang diagnostic pop
if (material == 0) {
__block CGColorRef cgColor = NULL;
SKRunWithAppearance([pdfView scrollView], ^{
@@ -203,7 +200,7 @@
}
NSView *loupeView = [window contentView];
- if (RUNNING_AFTER(10_13))
+ if (@available(macOS 10.14, *))
loupeView = [[loupeView subviews] firstObject] ?: loupeView;
BOOL needsMask = loupeView != [window contentView] &&
NSEqualSizes([window frame].size, magRect.size) == NO;
[window setFrame:magRect display:YES];
@@ -267,7 +264,7 @@
shadowColor = CGColorCreateGenericGray(0.0, 0.3);
shadowBlurRadius = 4.0 * magnification * scaleFactor;
shadowOffset.height = -magnification * scaleFactor;
- if (RUNNING_AFTER(10_13))
+ if (@available(macOS 10.14, *))
borderColor = CGColorCreateGenericGray(0.925, 1.0);
}
Modified: trunk/SKMainDocument.m
===================================================================
--- trunk/SKMainDocument.m 2023-11-02 15:20:56 UTC (rev 13723)
+++ trunk/SKMainDocument.m 2023-11-02 17:02:51 UTC (rev 13724)
@@ -322,7 +322,10 @@
- (void)changeExportType:(id)sender {
NSString *type = [exportAccessoryController selectedFileType];
- [[exportAccessoryController savePanel] setAllowedFileTypes:[NSArray
arrayWithObjects:RUNNING_AFTER(10_15) ? type : [self
fileNameExtensionForType:type saveOperation:NSSaveToOperation], nil]];
+ if (@available(macOS 11.0, *))
+ [[exportAccessoryController savePanel] setAllowedFileTypes:[NSArray
arrayWithObjects:type, nil]];
+ else
+ [[exportAccessoryController savePanel] setAllowedFileTypes:[NSArray
arrayWithObjects:[self fileNameExtensionForType:type
saveOperation:NSSaveToOperation], nil]];
if ([self canAttachNotesForType:type] == NO) {
[exportAccessoryController setHasExportOptions:NO];
} else {
@@ -783,9 +786,11 @@
[tmpTypes removeObject:SKDVIDocumentType];
if ([SKConversionProgressController toolPathForType:SKXDVDocumentType]
== nil)
[tmpTypes removeObject:SKXDVDocumentType];
- if (RUNNING_AFTER(13_0) && [SKConversionProgressController
toolPathForType:SKPostScriptDocumentType] == nil) {
- [tmpTypes removeObject:SKPostScriptDocumentType];
- [tmpTypes removeObject:SKEncapsulatedPostScriptDocumentType];
+ if (@available(macOS 14.0, *)) {
+ if ([SKConversionProgressController
toolPathForType:SKPostScriptDocumentType] == nil) {
+ [tmpTypes removeObject:SKPostScriptDocumentType];
+ [tmpTypes removeObject:SKEncapsulatedPostScriptDocumentType];
+ }
}
readableTypes = tmpTypes;
}
Modified: trunk/SKMainToolbarController.m
===================================================================
--- trunk/SKMainToolbarController.m 2023-11-02 15:20:56 UTC (rev 13723)
+++ trunk/SKMainToolbarController.m 2023-11-02 17:02:51 UTC (rev 13724)
@@ -1058,7 +1058,7 @@
}
- (void)handleColorSwatchFrameChangedNotification:(NSNotification
*)notification {
- if (RUNNING_AFTER(10_15))
+ if (@available(macOS 11.0, *))
return;
NSToolbarItem *toolbarItem = [self
toolbarItemForItemIdentifier:SKDocumentToolbarColorSwatchItemIdentifier];
NSSize size = [colorSwatch bounds].size;
Modified: trunk/SKMainWindowController.m
===================================================================
--- trunk/SKMainWindowController.m 2023-11-02 15:20:56 UTC (rev 13723)
+++ trunk/SKMainWindowController.m 2023-11-02 17:02:51 UTC (rev 13724)
@@ -385,11 +385,8 @@
// Set up the window
[window setCollectionBehavior:[window collectionBehavior] |
NSWindowCollectionBehaviorFullScreenPrimary];
- if ([window respondsToSelector:@selector(setToolbarStyle:)])
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored "-Wpartial-availability"
+ if (@available(macOS 11.0, *))
[window setToolbarStyle:NSWindowToolbarStyleExpanded];
-#pragma clang diagnostic pop
[window setStyleMask:[window styleMask] |
NSWindowStyleMaskFullSizeContentView];
if (mwcFlags.fullSizeContent) {
@@ -429,7 +426,7 @@
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
[pdfView setShouldAntiAlias:[sud boolForKey:SKShouldAntiAliasKey]];
- if (RUNNING_BEFORE(10_14))
+ if (@available(macOS 10.14, *)) {} else
[pdfView setGreekingThreshold:[sud
floatForKey:SKGreekingThresholdKey]];
#pragma clang diagnostic pop
[pdfView setInterpolationQuality:[sud
integerForKey:SKInterpolationQualityKey]];
@@ -1707,18 +1704,17 @@
[overviewView setSelectionIndexes:[NSIndexSet indexSetWithIndex:[[pdfView
currentPage] pageIndex]]];
[overviewView setAllowsMultipleSelection:isPresentation == NO];
- if (RUNNING_BEFORE(10_14)) {
+ if (@available(macOS 10.14, *)) {
+ if (isPresentation) {
+ SKSetHasDarkAppearance(overviewContentView);
+ [(NSVisualEffectView *)[overviewView backgroundView]
setMaterial:NSVisualEffectMaterialUnderPageBackground];
+ } else {
+ SKSetHasDefaultAppearance(overviewContentView);
+ [(NSVisualEffectView *)[overviewView backgroundView]
setMaterial:NSVisualEffectMaterialSidebar];
+ }
+ } else {
[(NSVisualEffectView *)[overviewView backgroundView]
setMaterial:isPresentation ? NSVisualEffectMaterialDark :
NSVisualEffectMaterialSidebar];
[[overviewView visibleItems] setValue:[NSNumber
numberWithInteger:isPresentation ? NSBackgroundStyleDark :
NSBackgroundStyleLight] forKey:@"backgroundStyle"];
- } else if (isPresentation) {
- SKSetHasDarkAppearance(overviewContentView);
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored "-Wpartial-availability"
- [(NSVisualEffectView *)[overviewView backgroundView]
setMaterial:NSVisualEffectMaterialUnderPageBackground];
-#pragma clang diagnostic pop
- } else {
- SKSetHasDefaultAppearance(overviewContentView);
- [(NSVisualEffectView *)[overviewView backgroundView]
setMaterial:NSVisualEffectMaterialSidebar];
}
[overviewView setSingleClickAction:isPresentation ?
@selector(hideOverview:) : NULL];
@@ -1817,7 +1813,7 @@
[item setHighlightLevel:[self thumbnailHighlightLevelForRow:i]];
if (markedPageIndex == i)
[item setMarked:YES];
- if (RUNNING_BEFORE(10_14))
+ if (@available(macOS 10.14, *)) {} else
[item setBackgroundStyle:[self interactionMode] == SKPresentationMode
? NSBackgroundStyleDark : NSBackgroundStyleLight];
return item;
}
@@ -2596,7 +2592,7 @@
SKShouldAntiAliasKey,
SKInterpolationQualityKey, SKGreekingThresholdKey,
SKTableFontSizeKey]
context:&SKMainWindowDefaultsObservationContext];
- if (RUNNING_AFTER(10_13))
+ if (@available(macOS 10.14, *))
[NSApp addObserver:self forKeyPath:@"effectiveAppearance" options:0
context:&SKMainWindowAppObservationContext];
if (mwcFlags.fullSizeContent)
[[self window] addObserver:self forKeyPath:@"contentLayoutRect"
options:0 context:&SKMainWindowContentLayoutObservationContext];
@@ -2612,7 +2608,7 @@
SKTableFontSizeKey] context:&SKMainWindowDefaultsObservationContext];
}
@catch (id e) {}
- if (RUNNING_AFTER(10_13)) {
+ if (@available(macOS 10.14, *)) {
@try { [NSApp removeObserver:self forKeyPath:@"effectiveAppearance"
context:&SKMainWindowAppObservationContext]; }
@catch (id e) {}
}
@@ -2705,12 +2701,14 @@
[pdfView requiresDisplay];
[secondaryPdfView requiresDisplay];
[self allThumbnailsNeedUpdate];
- } else if ([key isEqualToString:SKGreekingThresholdKey] &&
RUNNING_BEFORE(10_14)) {
+ } else if ([key isEqualToString:SKGreekingThresholdKey]) {
+ if (@available(macOS 10.14, *)) {} else {
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
- [pdfView setGreekingThreshold:[[NSUserDefaults
standardUserDefaults] floatForKey:SKGreekingThresholdKey]];
- [secondaryPdfView setGreekingThreshold:[[NSUserDefaults
standardUserDefaults] floatForKey:SKGreekingThresholdKey]];
+ [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-11-02 15:20:56 UTC (rev
13723)
+++ trunk/SKMainWindowController_Actions.m 2023-11-02 17:02:51 UTC (rev
13724)
@@ -1096,7 +1096,7 @@
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
[secondaryPdfView setShouldAntiAlias:[[NSUserDefaults
standardUserDefaults] boolForKey:SKShouldAntiAliasKey]];
- if (RUNNING_BEFORE(10_14))
+ if (@available(macOS 10.14, *)) {} else
[secondaryPdfView setGreekingThreshold:[[NSUserDefaults
standardUserDefaults] floatForKey:SKGreekingThresholdKey]];
#pragma clang diagnostic pop
[secondaryPdfView setInterpolationQuality:[[NSUserDefaults
standardUserDefaults] integerForKey:SKInterpolationQualityKey]];
Modified: trunk/SKMainWindowController_FullScreen.m
===================================================================
--- trunk/SKMainWindowController_FullScreen.m 2023-11-02 15:20:56 UTC (rev
13723)
+++ trunk/SKMainWindowController_FullScreen.m 2023-11-02 17:02:51 UTC (rev
13724)
@@ -215,11 +215,8 @@
[pdfView setDisplayMode:kPDFDisplaySinglePage];
[pdfView setDisplayBox:kPDFDisplayBoxCropBox];
[pdfView setDisplaysPageBreaks:NO];
- if ([pdfView respondsToSelector:@selector(enablePageShadows:)])
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored "-Wpartial-availability"
+ if (@available(macOS 10.14, *))
[pdfView enablePageShadows:NO];
-#pragma clang diagnostic pop
[scrollView setAutohidesScrollers:YES];
[scrollView setHasHorizontalScroller:NO];
[scrollView setHasVerticalScroller:NO];
@@ -274,11 +271,8 @@
[self removePresentationNotesNavigation];
- if ([pdfView respondsToSelector:@selector(enablePageShadows:)])
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored "-Wpartial-availability"
+ if (@available(macOS 10.14, *))
[pdfView enablePageShadows:YES];
-#pragma clang diagnostic pop
NSScrollView *scrollView = [pdfView scrollView];
[scrollView setHasHorizontalScroller:[[savedNormalSetup
objectForKey:HASHORIZONTALSCROLLER_KEY] boolValue]];
@@ -580,7 +574,7 @@
offset = NSHeight([NSWindow frameRectForContentRect:NSZeroRect
styleMask:NSWindowStyleMaskTitled]);
else if (fullScreenToolbarOffset > 0.0)
offset = fullScreenToolbarOffset;
- else if (RUNNING_AFTER(10_15))
+ else if (@available(macOS 11.0, *))
offset = 16.0;
return offset;
}
@@ -657,7 +651,7 @@
[(SKMainWindow *)window setDisableConstrainedFrame:YES];
[NSAnimationContext runAnimationGroup:^(NSAnimationContext *context) {
[context setDuration:duration - 0.02];
- if (RUNNING_AFTER(11_0))
+ if (@available(macOS 12.0, *))
[[(SKMainWindow *)window animator] setWindowFrame:frame];
else
[[window animator] setFrame:frame display:NO];
Modified: trunk/SKMainWindowController_UI.m
===================================================================
--- trunk/SKMainWindowController_UI.m 2023-11-02 15:20:56 UTC (rev 13723)
+++ trunk/SKMainWindowController_UI.m 2023-11-02 17:02:51 UTC (rev 13724)
@@ -374,7 +374,7 @@
}
- (void)updateTocHighlights {
- if (RUNNING_AFTER(10_15)) {
+ if (@available(macOS 11.0, *)) {
[leftSideController.tocOutlineView
enumerateAvailableRowViewsUsingBlock:^(SKHighlightingTableRowView *rowView,
NSInteger row){
[rowView setHighlightLevel:[self tocHighlightLevelForRow:row]];
}];
Modified: trunk/SKNavigationWindow.m
===================================================================
--- trunk/SKNavigationWindow.m 2023-11-02 15:20:56 UTC (rev 13723)
+++ trunk/SKNavigationWindow.m 2023-11-02 17:02:51 UTC (rev 13724)
@@ -89,10 +89,10 @@
contentRect.origin = NSZeroPoint;
NSVisualEffectView *contentView = [[NSVisualEffectView alloc]
initWithFrame:contentRect];
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored "-Wpartial-availability"
- [contentView setMaterial:RUNNING_BEFORE(10_14) ?
NSVisualEffectMaterialDark : NSVisualEffectMaterialFullScreenUI];
-#pragma clang diagnostic pop
+ if (@available(macOS 10.14, *))
+ [contentView setMaterial:NSVisualEffectMaterialFullScreenUI];
+ else
+ [contentView setMaterial:NSVisualEffectMaterialDark];
[contentView setState:NSVisualEffectStateActive];
[self setContentView:contentView];
@@ -284,7 +284,7 @@
[[styleButton cell] selectSegmentWithTag:[pdfView cursorStyle]];
[styleButton setTarget:pdfView];
[styleButton setAction:@selector(changeCursorStyle:)];
- if (RUNNING_BEFORE(10_14))
+ if (@available(macOS 10.14, *))
[[styleButton cell] setBackgroundStyle:NSBackgroundStyleDark];
NSArray *segments = [NSAccessibilityUnignoredDescendant(styleButton)
accessibilityChildren];
[[segments objectAtIndex:0]
setAccessibilityLabel:NSLocalizedString(@"arrow", @"Accessibility
description")];
@@ -306,7 +306,7 @@
[removeShadowButton setSelected:[pdfView removeCursorShadow]
forSegment:0];
[removeShadowButton setTarget:pdfView];
[removeShadowButton setAction:@selector(toggleRemoveCursorShadow:)];
- if (RUNNING_BEFORE(10_14))
+ if (@available(macOS 10.14, *))
[[removeShadowButton cell]
setBackgroundStyle:NSBackgroundStyleDark];
[removeShadowButton setWidth:ceil([[removeShadowButton
labelForSegment:0] sizeWithAttributes:@{NSFontAttributeName:[removeShadowButton
font]}].width) + 8.0 forSegment:0];
[removeShadowButton sizeToFit];
@@ -327,7 +327,7 @@
[drawButton setSelected:[pdfView drawInPresentation] forSegment:0];
[drawButton setTarget:pdfView];
[drawButton setAction:@selector(toggleDrawInPresentation:)];
- if (RUNNING_BEFORE(10_14))
+ if (@available(macOS 10.14, *))
[[drawButton cell] setBackgroundStyle:NSBackgroundStyleDark];
[[[NSAccessibilityUnignoredDescendant(drawButton)
accessibilityChildren] firstObject] setAccessibilityLabel:[SKNInkString
typeName]];
[drawButton sizeToFit];
@@ -351,7 +351,7 @@
[closeButton setImage:[NSImage
imageNamed:NSImageNameStopProgressTemplate] forSegment:0];
[closeButton setTarget:pdfView];
[closeButton setAction:@selector(closeCursorStyleWindow:)];
- if (RUNNING_BEFORE(10_14))
+ if (@available(macOS 10.14, *))
[[closeButton cell] setBackgroundStyle:NSBackgroundStyleDark];
[[[NSAccessibilityUnignoredDescendant(closeButton)
accessibilityChildren] firstObject]
setAccessibilityLabel:NSLocalizedString(@"close", @"Accessibility
description")];
[closeButton sizeToFit];
Modified: trunk/SKNoteOutlineView.m
===================================================================
--- trunk/SKNoteOutlineView.m 2023-11-02 15:20:56 UTC (rev 13723)
+++ trunk/SKNoteOutlineView.m 2023-11-02 17:02:51 UTC (rev 13724)
@@ -190,17 +190,16 @@
}
- (CGFloat)outlineIndentation {
- if ([self respondsToSelector:@selector(style)] == NO)
+ if (@available(macOS 11.0, *)) {
+ if ([self style] == NSTableViewStylePlain)
+ return 18.0;
+ else if ([self outlineColumnIsFirst])
+ return 9.0;
+ else
+ return 15.0 - floor(0.5 * [self intercellSpacing].width);
+ } else {
return 16.0;
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored "-Wpartial-availability"
- else if ([self style] == NSTableViewStylePlain)
-#pragma clang diagnostic pop
- return 18.0;
- else if ([self outlineColumnIsFirst])
- return 9.0;
- else
- return 15.0 - floor(0.5 * [self intercellSpacing].width);
+ }
}
#pragma mark Delegate
Modified: trunk/SKNoteTableRowView.m
===================================================================
--- trunk/SKNoteTableRowView.m 2023-11-02 15:20:56 UTC (rev 13723)
+++ trunk/SKNoteTableRowView.m 2023-11-02 17:02:51 UTC (rev 13724)
@@ -90,12 +90,14 @@
@implementation SKNoteTableCellView
- (void)setFrame:(NSRect)frame {
- if (!RUNNING_AFTER(10_15) && [[self objectValue] isKindOfClass:[SKNoteText
class]]) {
- SKNoteOutlineView *ov = (id)[[self superview] superview];
- if ([ov isKindOfClass:[SKNoteOutlineView class]]) {
- NSInteger row = [ov rowForView:self];
- if (row != -1)
- frame = [ov convertRect:[ov frameOfCellAtColumn:-1 row:row]
toView:[self superview]];
+ if (@available(macOS 11.0, *)) {} else {
+ if ([[self objectValue] isKindOfClass:[SKNoteText class]]) {
+ SKNoteOutlineView *ov = (id)[[self superview] superview];
+ if ([ov isKindOfClass:[SKNoteOutlineView class]]) {
+ NSInteger row = [ov rowForView:self];
+ if (row != -1)
+ frame = [ov convertRect:[ov frameOfCellAtColumn:-1
row:row] toView:[self superview]];
+ }
}
}
[super setFrame:frame];
Modified: trunk/SKNoteText.m
===================================================================
--- trunk/SKNoteText.m 2023-11-02 15:20:56 UTC (rev 13723)
+++ trunk/SKNoteText.m 2023-11-02 17:02:51 UTC (rev 13724)
@@ -87,7 +87,7 @@
- (id)objectValue {
if ([note isNote] == NO)
return [note textString];
- else if (RUNNING_AFTER(10_13))
+ else if (@available(macOS 10.14, *))
return [[note text] attributedStringByAddingControlTextColorAttribute];
else
return [note text];
Modified: trunk/SKNoteWindowController.m
===================================================================
--- trunk/SKNoteWindowController.m 2023-11-02 15:20:56 UTC (rev 13723)
+++ trunk/SKNoteWindowController.m 2023-11-02 17:02:51 UTC (rev 13724)
@@ -194,15 +194,12 @@
[[self window] setCollectionBehavior:[[self window] collectionBehavior] |
NSWindowCollectionBehaviorFullScreenAuxiliary];
- if (RUNNING_AFTER(10_13))
+ if (@available(macOS 10.14, *))
[textView setDrawsBackground:NO];
if ([self isNoteType]) {
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored "-Wpartial-availability"
- if (RUNNING_AFTER(10_13))
+ if (@available(macOS 10.14, *))
[edgeView setFillColor:[NSColor separatorColor]];
-#pragma clang diagnostic push
NSFont *font = [[NSUserDefaults standardUserDefaults]
fontForNameKey:SKAnchoredNoteFontNameKey sizeKey:SKAnchoredNoteFontSizeKey];
if (font)
@@ -209,7 +206,7 @@
[textView setFont:font];
NSDictionary *options = nil;
- if (RUNNING_AFTER(10_13))
+ if (@available(macOS 10.14, *))
options =
@{NSValueTransformerBindingOption:[[[SKAddTextColorTransformer alloc] init]
autorelease]};
[textView bind:@"attributedString" toObject:noteController
withKeyPath:@"selection.text" options:options];
@@ -349,7 +346,7 @@
}
- (void)textDidChange:(NSNotification *)notification {
- if (RUNNING_AFTER(10_13))
+ if (@available(macOS 10.14, *))
[[textView textStorage] addTextColorAttribute];
}
Modified: trunk/SKNotesDocument.m
===================================================================
--- trunk/SKNotesDocument.m 2023-11-02 15:20:56 UTC (rev 13723)
+++ trunk/SKNotesDocument.m 2023-11-02 17:02:51 UTC (rev 13724)
@@ -914,7 +914,7 @@
[item setLabels:NSLocalizedString(@"Search", @"Toolbar item label")];
[item setToolTip:NSLocalizedString(@"Search Notes", @"Tool tip message")];
[item setView:searchField];
- if (!RUNNING_AFTER(10_15)) {
+ if (@available(macOS 11.0, *)) {} else {
NSSize size = [searchField frame].size;
[item setMinSize:size];
size.width = 240.0;
Modified: trunk/SKPDFView.m
===================================================================
--- trunk/SKPDFView.m 2023-11-02 15:20:56 UTC (rev 13723)
+++ trunk/SKPDFView.m 2023-11-02 17:02:51 UTC (rev 13724)
@@ -440,7 +440,7 @@
#pragma mark Drawing
- (BOOL)drawsActiveSelections {
- if (RUNNING_AFTER(10_14))
+ if (@available(macOS 10.15, *))
return atomic_load(&inKeyWindow);
else
return YES;
@@ -638,7 +638,7 @@
}
- (NSColor *)backgroundColor {
- if (RUNNING(10_15))
+ if (@available(macOS 11.0, *)) {} else if (@available(macOS 10.15, *))
return [super backgroundColor] ?: [[self scrollView] backgroundColor];
return [super backgroundColor];
}
@@ -3279,7 +3279,7 @@
- (void)handleKeyStateChangedNotification:(NSNotification *)notification {
atomic_store(&inKeyWindow, [[self window] isKeyWindow]);
- if (RUNNING_AFTER(10_14)) {
+ if (@available(macOS 10.15, *)) {
if (selectionPageIndex != NSNotFound) {
CGFloat margin = HANDLE_SIZE / [self scaleFactor];
for (PDFPage *page in [self displayedPages])
@@ -3348,10 +3348,8 @@
#pragma mark Dark mode
- (void)viewDidChangeEffectiveAppearance {
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored "-Wpartial-availability"
- [super viewDidChangeEffectiveAppearance];
-#pragma clang diagnostic pop
+ if (@available(macOS 10.14, *))
+ [super viewDidChangeEffectiveAppearance];
[loupeController updateColorFilters];
}
@@ -5469,7 +5467,10 @@
[attrs release];
[attrString release];
size.width = ceil(size.width + 4.0);
- size.height = ceil(size.height + (RUNNING_AFTER(10_13) ? 6.0 : 2.0));
+ if (@available(macOS 10.14, *))
+ size.height = ceil(size.height + 6.0);
+ else
+ size.height = ceil(size.height + 2.0);
return size;
}
Modified: trunk/SKPresentationOptionsSheetController.m
===================================================================
--- trunk/SKPresentationOptionsSheetController.m 2023-11-02 15:20:56 UTC
(rev 13723)
+++ trunk/SKPresentationOptionsSheetController.m 2023-11-02 17:02:51 UTC
(rev 13724)
@@ -244,11 +244,8 @@
[cell release];
- if ([tableView respondsToSelector:@selector(setStyle:)])
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored "-Wpartial-availability"
+ if (@available(macOS 11.0, *))
[tableView setStyle:NSTableViewStylePlain];
-#pragma clang diagnostic pop
NSScrollView *scrollView = [tableView enclosingScrollView];
CGFloat width = [[[tableView tableColumns] valueForKeyPath:@"@sum.width"]
doubleValue] + NSWidth([scrollView frame]) - [scrollView contentSize].width +
3.0 * [tableView intercellSpacing].width;
Modified: trunk/SKSideViewController.m
===================================================================
--- trunk/SKSideViewController.m 2023-11-02 15:20:56 UTC (rev 13723)
+++ trunk/SKSideViewController.m 2023-11-02 17:02:51 UTC (rev 13724)
@@ -141,7 +141,7 @@
BOOL hasLayer = YES;
- if (RUNNING_AFTER(10_13)) {
+ if (@available(macOS 10.14, *)) {
hasLayer = [[self view] wantsLayer] || [[self view] layer] != nil;
if (hasLayer == NO) {
[[self view] setWantsLayer:YES];
@@ -170,7 +170,7 @@
}
completionHandler:^{
if (hasLayer == NO) {
- if (RUNNING_AFTER(10_13)) {
+ if (@available(macOS 10.14, *)) {
[[self view] setWantsLayer:NO];
} else {
[contentView setWantsLayer:NO];
Modified: trunk/SKSideWindow.m
===================================================================
--- trunk/SKSideWindow.m 2023-11-02 15:20:56 UTC (rev 13723)
+++ trunk/SKSideWindow.m 2023-11-02 17:02:51 UTC (rev 13724)
@@ -78,12 +78,15 @@
[self setHasShadow:YES];
[self setDisplaysWhenScreenProfileChanges:YES];
[self setReleasedWhenClosed:NO];
- [self setAlphaValue:RUNNING_AFTER(10_13) ? 1.0 : 0.95];
+ if (@available(macOS 10.14, *))
+ [self setAlphaValue:1.0];
+ else
+ [self setAlphaValue:0.95];
[self setAnimationBehavior:NSWindowAnimationBehaviorNone];
NSView *backgroundView = [[[SKSideWindowContentView alloc] init]
autorelease];
- if (RUNNING_AFTER(10_13)) {
+ if (@available(macOS 10.14, *)) {
NSVisualEffectView *contentView = [[NSVisualEffectView alloc]
init];
[contentView setMaterial:NSVisualEffectMaterialSidebar];
[self setContentView:contentView];
Modified: trunk/SKSnapshotWindowController.m
===================================================================
--- trunk/SKSnapshotWindowController.m 2023-11-02 15:20:56 UTC (rev 13723)
+++ trunk/SKSnapshotWindowController.m 2023-11-02 17:02:51 UTC (rev 13724)
@@ -288,7 +288,7 @@
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
[pdfView setShouldAntiAlias:[[NSUserDefaults standardUserDefaults]
boolForKey:SKShouldAntiAliasKey]];
- if (RUNNING_BEFORE(10_14))
+ if (@available(macOS 10.14, *)) {} else
[pdfView setGreekingThreshold:[[NSUserDefaults standardUserDefaults]
floatForKey:SKGreekingThresholdKey]];
#pragma clang diagnostic pop
[pdfView setInterpolationQuality:[[NSUserDefaults standardUserDefaults]
integerForKey:SKInterpolationQualityKey]];
@@ -676,10 +676,11 @@
} else if ([key isEqualToString:SKInterpolationQualityKey]) {
[pdfView setInterpolationQuality:[[NSUserDefaults
standardUserDefaults] integerForKey:SKInterpolationQualityKey]];
[pdfView requiresDisplay];
- } else if ([key isEqualToString:SKGreekingThresholdKey] &&
RUNNING_BEFORE(10_14)) {
+ } else if ([key isEqualToString:SKGreekingThresholdKey]) {
+ if (@available(macOS 10.14, *)) {} else
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
- [pdfView setGreekingThreshold:[[NSUserDefaults
standardUserDefaults] floatForKey:SKGreekingThresholdKey]];
+ [pdfView setGreekingThreshold:[[NSUserDefaults
standardUserDefaults] floatForKey:SKGreekingThresholdKey]];
#pragma clang diagnostic pop
}
} else {
Modified: trunk/SKTemplateManager.m
===================================================================
--- trunk/SKTemplateManager.m 2023-11-02 15:20:56 UTC (rev 13723)
+++ trunk/SKTemplateManager.m 2023-11-02 17:02:51 UTC (rev 13724)
@@ -87,7 +87,7 @@
[templates addObject:file];
NSString *type = [[templateFileNames
allKeysForObject:file] firstObject];
if (type == nil) {
- if (RUNNING_AFTER(10_15)) {
+ if (@available(macOS 11.0, *)) {
// create a unique but deterministic dynamic
UTI that knows the extension
CFStringRef baseType =
UTTypeCreatePreferredIdentifierForTag(kUTTagClassNSPboardType,
(CFStringRef)file, NULL);
type = [(NSString
*)UTTypeCreatePreferredIdentifierForTag(kUTTagClassFilenameExtension,
(CFStringRef)[file pathExtension], baseType) autorelease];
Modified: trunk/SKTextNoteEditor.m
===================================================================
--- trunk/SKTextNoteEditor.m 2023-11-02 15:20:56 UTC (rev 13723)
+++ trunk/SKTextNoteEditor.m 2023-11-02 17:02:51 UTC (rev 13724)
@@ -117,7 +117,7 @@
[textView setDefaultParagraphStyle:parStyle];
[[textView textStorage] addAttribute:NSParagraphStyleAttributeName
value:parStyle range:NSMakeRange(0, [[textView string] length])];
[textView setTypingAttributes:typingAttrs];
- if (RUNNING_AFTER(10_13))
+ if (@available(macOS 10.14, *))
[textView setTextContainerInset:NSMakeSize(0.0, 3.0 + round(descent) -
descent)];
[parStyle release];
[typingAttrs release];
@@ -144,7 +144,7 @@
[[textView textContainer] setContainerSize:NSMakeSize(NSWidth([self
bounds]), CGFLOAT_MAX)];
[[textView textContainer] setWidthTracksTextView:YES];
[[textView textContainer] setLineFragmentPadding:2.0];
- if (RUNNING_AFTER(10_13))
+ if (@available(macOS 10.14, *))
[textView setTextContainerInset:NSMakeSize(0.0, 3.0)];
[textView setSelectedRange:NSMakeRange(0, 0)];
NSClipView *clipView = [[[NSClipView alloc] initWithFrame:[self bounds]]
autorelease];
@@ -282,7 +282,7 @@
[NSGraphicsContext saveGraphicsState];
- if ((RUNNING(10_13) || RUNNING(10_14)) && (color == nil || [color
alphaComponent] < 1.0)) {
+ if (@available(macOS 10.15, *)) {} else if (color == nil || [color
alphaComponent] < 1.0) {
[[NSColor whiteColor] setFill];
[NSBezierPath fillRect:bounds];
}
Modified: trunk/SKThumbnailImageView.m
===================================================================
--- trunk/SKThumbnailImageView.m 2023-11-02 15:20:56 UTC (rev 13723)
+++ trunk/SKThumbnailImageView.m 2023-11-02 17:02:51 UTC (rev 13724)
@@ -46,7 +46,7 @@
@implementation SKThumbnailImageView
static inline NSArray *defaultKeysToObserve() {
- if (RUNNING_AFTER(10_13))
+ if (@available(macOS 10.14, *))
return @[SKInvertColorsInDarkModeKey, SKSepiaToneKey, SKWhitePointKey];
else
return @[SKSepiaToneKey, SKWhitePointKey];
@@ -80,10 +80,8 @@
}
- (void)viewDidChangeEffectiveAppearance {
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored "-Wpartial-availability"
- [super viewDidChangeEffectiveAppearance];
-#pragma clang diagnostic pop
+ if (@available(macOS 10.14, *))
+ [super viewDidChangeEffectiveAppearance];
if ([[NSUserDefaults standardUserDefaults]
boolForKey:SKInvertColorsInDarkModeKey])
[self setContentFilters:SKColorEffectFilters()];
}
Modified: trunk/SKThumbnailView.m
===================================================================
--- trunk/SKThumbnailView.m 2023-11-02 15:20:56 UTC (rev 13723)
+++ trunk/SKThumbnailView.m 2023-11-02 17:02:51 UTC (rev 13724)
@@ -189,7 +189,7 @@
}
- (void)updateImageHighlight {
- if (RUNNING_AFTER(10_15)) {
+ if (@available(macOS 11.0, *)) {
if ([self isSelected] || [self isMenuHighlighted]) {
if (imageHighlightView == nil) {
imageHighlightView = [self newHighlightView];
@@ -226,7 +226,7 @@
}
- (void)updateLabelHighlight {
- if (RUNNING_AFTER(10_15)) {
+ if (@available(macOS 11.0, *)) {
if ([self isSelected] || [self highlightLevel] > 0) {
if (labelHighlightView == nil) {
labelHighlightView = [self newHighlightView];
@@ -318,7 +318,7 @@
#pragma mark Drawing
- (void)drawRect:(NSRect)dirtyRect {
- if (RUNNING_AFTER(10_15))
+ if (@available(macOS 11.0, *))
return;
if ([self isSelected] || [self isMenuHighlighted]) {
@@ -370,7 +370,7 @@
} else if ([keyPath isEqualToString:LABEL_KEY]) {
[labelView setObjectValue:[thumbnail label]];
if ([self isSelected] || [self highlightLevel] > 0) {
- if (RUNNING_AFTER(10_15))
+ if (@available(macOS 11.0, *))
[self updateLabelHighlightMask:nil];
else
[self setNeedsDisplayInRect:NSInsetRect([imageView frame],
-SELECTION_MARGIN, -SELECTION_MARGIN)];
@@ -384,7 +384,7 @@
- (void)handleKeyStateChangedNotification:(NSNotification *)note {
if ([self isSelected] || [self highlightLevel] > 0) {
[self updateBackgroundStyle];
- if (RUNNING_AFTER(10_15))
+ if (@available(macOS 11.0, *))
[labelHighlightView setEmphasized:[[self window] isKeyWindow]];
else
[self setNeedsDisplayInRect:[labelView frame]];
Modified: trunk/SKTopBarView.m
===================================================================
--- trunk/SKTopBarView.m 2023-11-02 15:20:56 UTC (rev 13723)
+++ trunk/SKTopBarView.m 2023-11-02 17:02:51 UTC (rev 13724)
@@ -123,13 +123,16 @@
- (void)setStyle:(SKTopBarStyle)newStyle {
style = newStyle;
NSColor *sepColor = nil;
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored "-Wpartial-availability"
switch (style) {
case SKTopBarStyleDefault:
- [blurView setMaterial:RUNNING_AFTER(10_15) ||
RUNNING_BEFORE(10_14) ? NSVisualEffectMaterialTitlebar :
NSVisualEffectMaterialHeaderView];
+ if (@available(macOS 11.0, *))
+ [blurView setMaterial:NSVisualEffectMaterialTitlebar];
+ else if (@available(macOS 10.14, *))
+ [blurView setMaterial:NSVisualEffectMaterialHeaderView];
+ else
+ [blurView setMaterial:NSVisualEffectMaterialTitlebar];
[blurView setBlendingMode:NSVisualEffectBlendingModeWithinWindow];
- if (RUNNING_AFTER(10_13)) {
+ if (@available(macOS 10.14, *)) {
sepColor = [NSColor separatorColor];
} else{
[backgroundView setBackgroundColor:[NSColor
colorWithGenericGamma22White:1.0 alpha:0.25]];
@@ -137,14 +140,19 @@
}
break;
case SKTopBarStylePDFControlBackground:
- [blurView setMaterial:RUNNING_AFTER(10_15) ?
NSVisualEffectMaterialTitlebar : RUNNING_AFTER(10_13) ?
NSVisualEffectMaterialHeaderView : NSVisualEffectMaterialLight];
+ if (@available(macOS 11.0, *))
+ [blurView setMaterial:NSVisualEffectMaterialTitlebar];
+ else if (@available(macOS 10.14, *))
+ [blurView setMaterial:NSVisualEffectMaterialHeaderView];
+ else
+ [blurView setMaterial:NSVisualEffectMaterialLight];
[blurView setBlendingMode:NSVisualEffectBlendingModeWithinWindow];
- if (RUNNING_BEFORE(10_14)) {
+ if (@available(macOS 10.14, *)) {} else {
[backgroundView setBackgroundColor:[NSColor
colorWithGenericGamma22White:0.98 alpha:0.5]];
}
break;
case SKTopBarStylePresentation:
- if (RUNNING_AFTER(10_13)) {
+ if (@available(macOS 10.14, *)) {
[blurView setMaterial:NSVisualEffectMaterialSidebar];
[blurView
setBlendingMode:NSVisualEffectBlendingModeBehindWindow];
} else {
@@ -152,7 +160,6 @@
}
break;
}
-#pragma clang diagnostic pop
[backgroundView setSeparatorColor:sepColor];
[backgroundView setNeedsDisplay:YES];
}
Modified: trunk/Skim_Prefix.pch
===================================================================
--- trunk/Skim_Prefix.pch 2023-11-02 15:20:56 UTC (rev 13723)
+++ trunk/Skim_Prefix.pch 2023-11-02 17:02:51 UTC (rev 13724)
@@ -51,10 +51,6 @@
#define SKZONEDESTROY(variable) do { if (variable)
NSZoneFree(NSZoneFromPointer((void*)variable), (void *)variable); variable =
NULL; } while (0)
#define SKDISPATCHDESTROY(variable) do { if (variable)
dispatch_release(variable); variable = nil; } while (0)
- #define RUNNING(version) ((NSInteger)floor(NSAppKitVersionNumber) ==
(NSInteger)NSAppKitVersionNumber ## version)
- #define RUNNING_BEFORE(version) (floor(NSAppKitVersionNumber) <
NSAppKitVersionNumber ## version)
- #define RUNNING_AFTER(version) (floor(NSAppKitVersionNumber) >
NSAppKitVersionNumber ## version)
-
#define DISPATCH_MAIN_AFTER_SEC(time, block)
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(time *
NSEC_PER_SEC)), dispatch_get_main_queue(), block)
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