Skip to content

Commit 3074e64

Browse files
committed
Fix renamed C type NSAutoresizingMaskOptions (10.10+)
1 parent dee3201 commit 3074e64

File tree

5 files changed

+45
-45
lines changed

5 files changed

+45
-45
lines changed

Source/SPCompatibility.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,8 @@
8484

8585
// This enum is available since 10.5 but only got a "name" in 10.10
8686
typedef NSUInteger NSCellHitResult;
87+
// This bitfield is available since 10.0 but only got a "name" in 10.10
88+
typedef NSUInteger NSAutoresizingMaskOptions;
8789

8890
@compatibility_alias NSTitlebarAccessoryViewController NSViewController;
8991

Source/SPExportController.m

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2353,14 +2353,14 @@ - (NSString *)expandCustomFilenameFormatUsingTableName:(NSString *)table
23532353
*/
23542354
- (void)_resizeWindowForCustomFilenameViewByHeightDelta:(NSInteger)delta
23552355
{
2356-
NSUInteger popUpMask = [exportInputPopUpButton autoresizingMask];
2357-
NSUInteger fileCheckMask = [exportFilePerTableCheck autoresizingMask];
2358-
NSUInteger scrollMask = [exportTablelistScrollView autoresizingMask];
2359-
NSUInteger buttonBarMask = [exportTableListButtonBar autoresizingMask];
2360-
NSUInteger buttonMask = [exportCustomFilenameViewButton autoresizingMask];
2361-
NSUInteger textFieldMask = [exportCustomFilenameViewLabelButton autoresizingMask];
2362-
NSUInteger customFilenameViewMask = [exportCustomFilenameView autoresizingMask];
2363-
NSUInteger tabBarMask = [exportOptionsTabBar autoresizingMask];
2356+
NSAutoresizingMaskOptions popUpMask = [exportInputPopUpButton autoresizingMask];
2357+
NSAutoresizingMaskOptions fileCheckMask = [exportFilePerTableCheck autoresizingMask];
2358+
NSAutoresizingMaskOptions scrollMask = [exportTablelistScrollView autoresizingMask];
2359+
NSAutoresizingMaskOptions buttonBarMask = [exportTableListButtonBar autoresizingMask];
2360+
NSAutoresizingMaskOptions buttonMask = [exportCustomFilenameViewButton autoresizingMask];
2361+
NSAutoresizingMaskOptions textFieldMask = [exportCustomFilenameViewLabelButton autoresizingMask];
2362+
NSAutoresizingMaskOptions customFilenameViewMask = [exportCustomFilenameView autoresizingMask];
2363+
NSAutoresizingMaskOptions tabBarMask = [exportOptionsTabBar autoresizingMask];
23642364

23652365
NSRect frame = [[self window] frame];
23662366

@@ -2412,13 +2412,13 @@ - (void)_resizeWindowForCustomFilenameViewByHeightDelta:(NSInteger)delta
24122412
*/
24132413
- (void)_resizeWindowForAdvancedOptionsViewByHeightDelta:(NSInteger)delta
24142414
{
2415-
NSUInteger scrollMask = [exportTablelistScrollView autoresizingMask];
2416-
NSUInteger buttonBarMask = [exportTableListButtonBar autoresizingMask];
2417-
NSUInteger tabBarMask = [exportTypeTabBar autoresizingMask];
2418-
NSUInteger optionsTabBarMask = [exportOptionsTabBar autoresizingMask];
2419-
NSUInteger buttonMask = [exportAdvancedOptionsViewButton autoresizingMask];
2420-
NSUInteger textFieldMask = [exportAdvancedOptionsViewLabelButton autoresizingMask];
2421-
NSUInteger advancedViewMask = [exportAdvancedOptionsView autoresizingMask];
2415+
NSAutoresizingMaskOptions scrollMask = [exportTablelistScrollView autoresizingMask];
2416+
NSAutoresizingMaskOptions buttonBarMask = [exportTableListButtonBar autoresizingMask];
2417+
NSAutoresizingMaskOptions tabBarMask = [exportTypeTabBar autoresizingMask];
2418+
NSAutoresizingMaskOptions optionsTabBarMask = [exportOptionsTabBar autoresizingMask];
2419+
NSAutoresizingMaskOptions buttonMask = [exportAdvancedOptionsViewButton autoresizingMask];
2420+
NSAutoresizingMaskOptions textFieldMask = [exportAdvancedOptionsViewLabelButton autoresizingMask];
2421+
NSAutoresizingMaskOptions advancedViewMask = [exportAdvancedOptionsView autoresizingMask];
24222422

24232423
NSRect frame = [[self window] frame];
24242424

Source/SPFieldMapperController.m

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1324,17 +1324,17 @@ - (IBAction)insertRecentGlobalValue:(id)sender
13241324
- (void)resizeWindowByHeightDelta:(NSInteger)delta
13251325
{
13261326
#ifndef SP_CODA /* resizeWindowByHeightDelta: */
1327-
NSUInteger tableMask = [fieldMapperTableScrollView autoresizingMask];
1328-
NSUInteger headerSwitchMask = [importFieldNamesHeaderSwitch autoresizingMask];
1329-
NSUInteger alignPopupMask = [alignByPopup autoresizingMask];
1330-
NSUInteger alignPopupLabelMask = [alignByPopupLabel autoresizingMask];
1331-
NSUInteger importMethodLabelMask = [importMethodLabel autoresizingMask];
1332-
NSUInteger importMethodMask = [importMethodPopup autoresizingMask];
1333-
NSUInteger advancedButtonMask = [advancedButton autoresizingMask];
1334-
NSUInteger advancedLabelMask = [advancedLabel autoresizingMask];
1335-
NSUInteger insertViewMask = [advancedInsertView autoresizingMask];
1336-
NSUInteger updateViewMask = [advancedUpdateView autoresizingMask];
1337-
NSUInteger replaceViewMask = [advancedReplaceView autoresizingMask];
1327+
NSAutoresizingMaskOptions tableMask = [fieldMapperTableScrollView autoresizingMask];
1328+
NSAutoresizingMaskOptions headerSwitchMask = [importFieldNamesHeaderSwitch autoresizingMask];
1329+
NSAutoresizingMaskOptions alignPopupMask = [alignByPopup autoresizingMask];
1330+
NSAutoresizingMaskOptions alignPopupLabelMask = [alignByPopupLabel autoresizingMask];
1331+
NSAutoresizingMaskOptions importMethodLabelMask = [importMethodLabel autoresizingMask];
1332+
NSAutoresizingMaskOptions importMethodMask = [importMethodPopup autoresizingMask];
1333+
NSAutoresizingMaskOptions advancedButtonMask = [advancedButton autoresizingMask];
1334+
NSAutoresizingMaskOptions advancedLabelMask = [advancedLabel autoresizingMask];
1335+
NSAutoresizingMaskOptions insertViewMask = [advancedInsertView autoresizingMask];
1336+
NSAutoresizingMaskOptions updateViewMask = [advancedUpdateView autoresizingMask];
1337+
NSAutoresizingMaskOptions replaceViewMask = [advancedReplaceView autoresizingMask];
13381338

13391339
NSRect frame = [[self window] frame];
13401340
if(frame.size.height>600 && delta > heightOffset) {

Source/SPIndexesController.m

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1026,15 +1026,15 @@ - (void)_removingIndexFailedWithForeignKeyError:(NSDictionary *)info
10261026
*/
10271027
- (void)_resizeWindowForAdvancedOptionsViewByHeightDelta:(NSInteger)delta
10281028
{
1029-
NSUInteger popUpMask = [indexTypePopUpButton autoresizingMask];
1030-
NSUInteger nameFieldMask = [indexNameTextField autoresizingMask];
1031-
NSUInteger scrollMask = [indexedColumnsScrollView autoresizingMask];
1032-
NSUInteger buttonMask = [indexAdvancedOptionsViewButton autoresizingMask];
1033-
NSUInteger textFieldMask = [indexAdvancedOptionsViewLabelButton autoresizingMask];
1034-
NSUInteger advancedViewMask = [indexAdvancedOptionsView autoresizingMask];
1035-
NSUInteger typeLabelMask = [indexTypeLabel autoresizingMask];
1036-
NSUInteger nameLabelMask = [indexNameLabel autoresizingMask];
1037-
NSUInteger buttonBarMask = [(NSView*)anchoredButtonBar autoresizingMask];
1029+
NSAutoresizingMaskOptions popUpMask = [indexTypePopUpButton autoresizingMask];
1030+
NSAutoresizingMaskOptions nameFieldMask = [indexNameTextField autoresizingMask];
1031+
NSAutoresizingMaskOptions scrollMask = [indexedColumnsScrollView autoresizingMask];
1032+
NSAutoresizingMaskOptions buttonMask = [indexAdvancedOptionsViewButton autoresizingMask];
1033+
NSAutoresizingMaskOptions textFieldMask = [indexAdvancedOptionsViewLabelButton autoresizingMask];
1034+
NSAutoresizingMaskOptions advancedViewMask = [indexAdvancedOptionsView autoresizingMask];
1035+
NSAutoresizingMaskOptions typeLabelMask = [indexTypeLabel autoresizingMask];
1036+
NSAutoresizingMaskOptions nameLabelMask = [indexNameLabel autoresizingMask];
1037+
NSAutoresizingMaskOptions buttonBarMask = [anchoredButtonBar autoresizingMask];
10381038

10391039
NSRect frame = [[self window] frame];
10401040

@@ -1053,8 +1053,7 @@ - (void)_resizeWindowForAdvancedOptionsViewByHeightDelta:(NSInteger)delta
10531053
[indexAdvancedOptionsView setAutoresizingMask:NSViewNotSizable | NSViewMinYMargin];
10541054
[indexTypeLabel setAutoresizingMask:NSViewNotSizable | NSViewMinYMargin];
10551055
[indexNameLabel setAutoresizingMask:NSViewNotSizable | NSViewMinYMargin];
1056-
1057-
[(NSView*)anchoredButtonBar setAutoresizingMask:NSViewNotSizable | NSViewMinYMargin];
1056+
[anchoredButtonBar setAutoresizingMask:NSViewNotSizable | NSViewMinYMargin];
10581057

10591058
NSInteger newMinHeight = (windowMinHeigth - heightOffset + delta < windowMinHeigth) ? windowMinHeigth : windowMinHeigth - heightOffset + delta;
10601059

@@ -1078,8 +1077,7 @@ - (void)_resizeWindowForAdvancedOptionsViewByHeightDelta:(NSInteger)delta
10781077
[indexAdvancedOptionsView setAutoresizingMask:advancedViewMask];
10791078
[indexTypeLabel setAutoresizingMask:typeLabelMask];
10801079
[indexNameLabel setAutoresizingMask:nameLabelMask];
1081-
1082-
[(NSView*)anchoredButtonBar setAutoresizingMask:buttonBarMask];
1080+
[anchoredButtonBar setAutoresizingMask:buttonBarMask];
10831081
}
10841082

10851083
#pragma mark -

Source/SPSplitView.m

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -58,17 +58,17 @@ @interface SPSplitViewHelperView : NSView
5858
NSView *wrappedView;
5959
}
6060

61-
- (id)initReplacingView:(NSView *)aView inVerticalSplitView:(BOOL)verticalSplitView;
61+
- (instancetype)initReplacingView:(NSView *)aView inVerticalSplitView:(BOOL)verticalSplitView;
6262
- (void)restoreOriginalView;
6363

6464
@end
6565

6666
@interface SPSplitViewAnimationRetainCycleBypass : NSObject
6767
{
68-
SPSplitView *parentSplitView;
68+
__unsafe_unretained SPSplitView *parentSplitView;
6969
}
7070

71-
- (id)initWithParent:(SPSplitView *)aSplitView;
71+
- (instancetype)initWithParent:(SPSplitView *)aSplitView;
7272
- (void)_animationStep:(NSTimer *)aTimer;
7373

7474
@end
@@ -1106,12 +1106,12 @@ @implementation SPSplitViewHelperView
11061106
* specified view, adding it as a subview to maintain the same appearance, and then
11071107
* can be animated without affecting the contained view.
11081108
*/
1109-
- (id)initReplacingView:(NSView *)aView inVerticalSplitView:(BOOL)verticalSplitView
1109+
- (instancetype)initReplacingView:(NSView *)aView inVerticalSplitView:(BOOL)verticalSplitView
11101110
{
11111111
self = [super initWithFrame:[aView frame]];
11121112
if (!self) return nil;
11131113

1114-
NSUInteger wrappedResizeMask = [wrappedView autoresizingMask];
1114+
NSAutoresizingMaskOptions wrappedResizeMask = [wrappedView autoresizingMask];
11151115

11161116
// Retain the wrapped view while this view exists
11171117
wrappedView = [aView retain];
@@ -1197,7 +1197,7 @@ - (void)dealloc
11971197

11981198
@implementation SPSplitViewAnimationRetainCycleBypass
11991199

1200-
- (id)initWithParent:(SPSplitView *)aSplitView
1200+
- (instancetype)initWithParent:(SPSplitView *)aSplitView
12011201
{
12021202
self = [super init];
12031203
if (!self) return nil;

0 commit comments

Comments
 (0)