Skip to content

Commit de6da13

Browse files
committed
Remove old compatability code in macosx
1 parent 865c202 commit de6da13

File tree

1 file changed

+3
-38
lines changed

1 file changed

+3
-38
lines changed

src/_macosx.m

Lines changed: 3 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -11,40 +11,9 @@
1111

1212
/* Proper way to check for the OS X version we are compiling for, from
1313
* https://developer.apple.com/library/archive/documentation/DeveloperTools/Conceptual/cross_development/Using/using.html
14-
*/
15-
#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
16-
#define COMPILING_FOR_10_7
17-
#endif
1814
19-
/* Renamed symbols cause deprecation warnings, so define macros for the new
15+
* Renamed symbols cause deprecation warnings, so define macros for the new
2016
* names if we are compiling on an older SDK */
21-
#if __MAC_OS_X_VERSION_MIN_REQUIRED < 101000
22-
#define NSModalResponseOK NSOKButton
23-
#endif
24-
#if __MAC_OS_X_VERSION_MIN_REQUIRED < 101200
25-
#define NSEventMaskAny NSAnyEventMask
26-
#define NSEventTypeApplicationDefined NSApplicationDefined
27-
#define NSEventModifierFlagCommand NSCommandKeyMask
28-
#define NSEventModifierFlagControl NSControlKeyMask
29-
#define NSEventModifierFlagOption NSAlternateKeyMask
30-
#define NSEventModifierFlagShift NSShiftKeyMask
31-
#define NSEventTypeKeyUp NSKeyUp
32-
#define NSEventTypeKeyDown NSKeyDown
33-
#define NSEventTypeMouseMoved NSMouseMoved
34-
#define NSEventTypeLeftMouseDown NSLeftMouseDown
35-
#define NSEventTypeRightMouseDown NSRightMouseDown
36-
#define NSEventTypeOtherMouseDown NSOtherMouseDown
37-
#define NSEventTypeLeftMouseDragged NSLeftMouseDragged
38-
#define NSEventTypeRightMouseDragged NSRightMouseDragged
39-
#define NSEventTypeOtherMouseDragged NSOtherMouseDragged
40-
#define NSEventTypeLeftMouseUp NSLeftMouseUp
41-
#define NSEventTypeRightMouseUp NSRightMouseUp
42-
#define NSEventTypeOtherMouseUp NSOtherMouseUp
43-
#define NSWindowStyleMaskClosable NSClosableWindowMask
44-
#define NSWindowStyleMaskMiniaturizable NSMiniaturizableWindowMask
45-
#define NSWindowStyleMaskResizable NSResizableWindowMask
46-
#define NSWindowStyleMaskTitled NSTitledWindowMask
47-
#endif
4817
#if __MAC_OS_X_VERSION_MIN_REQUIRED < 101400
4918
#define NSButtonTypeMomentaryLight NSMomentaryLightButton
5019
#define NSButtonTypePushOnPushOff NSPushOnPushOffButton
@@ -895,9 +864,7 @@ -(void)save_figure:(id)sender { gil_call_method(toolbar, "save_figure"); }
895864
NSSize scale;
896865

897866
rect = NSMakeRect(0, 0, imagesize, imagesize);
898-
#ifdef COMPILING_FOR_10_7
899867
rect = [window convertRectToBacking: rect];
900-
#endif
901868
size = rect.size;
902869
scale = NSMakeSize(imagesize / size.width, imagesize / size.height);
903870

@@ -934,10 +901,8 @@ -(void)save_figure:(id)sender { gil_call_method(toolbar, "save_figure"); }
934901
rect.size.height = 0;
935902
rect.origin.x += height;
936903
NSTextView* messagebox = [[NSTextView alloc] initWithFrame: rect];
937-
if (@available(macOS 10.11, *)) {
938-
messagebox.textContainer.maximumNumberOfLines = 2;
939-
messagebox.textContainer.lineBreakMode = NSLineBreakByTruncatingTail;
940-
}
904+
messagebox.textContainer.maximumNumberOfLines = 2;
905+
messagebox.textContainer.lineBreakMode = NSLineBreakByTruncatingTail;
941906
[messagebox setFont: font];
942907
[messagebox setDrawsBackground: NO];
943908
[messagebox setSelectable: NO];

0 commit comments

Comments
 (0)