Permalink
Browse files

Fix renamed C type NSAutoresizingMaskOptions (10.10+)

  • Loading branch information...
dmoagx committed Nov 8, 2018
1 parent dee3201 commit 3074e64677af136f627e794456003986edd1a936
Showing with 45 additions and 45 deletions.
  1. +2 −0 Source/SPCompatibility.h
  2. +15 −15 Source/SPExportController.m
  3. +11 −11 Source/SPFieldMapperController.m
  4. +11 −13 Source/SPIndexesController.m
  5. +6 −6 Source/SPSplitView.m
@@ -84,6 +84,8 @@
// This enum is available since 10.5 but only got a "name" in 10.10
typedef NSUInteger NSCellHitResult;
// This bitfield is available since 10.0 but only got a "name" in 10.10
typedef NSUInteger NSAutoresizingMaskOptions;
@compatibility_alias NSTitlebarAccessoryViewController NSViewController;
@@ -2353,14 +2353,14 @@ - (NSString *)expandCustomFilenameFormatUsingTableName:(NSString *)table
*/
- (void)_resizeWindowForCustomFilenameViewByHeightDelta:(NSInteger)delta
{
NSUInteger popUpMask = [exportInputPopUpButton autoresizingMask];
NSUInteger fileCheckMask = [exportFilePerTableCheck autoresizingMask];
NSUInteger scrollMask = [exportTablelistScrollView autoresizingMask];
NSUInteger buttonBarMask = [exportTableListButtonBar autoresizingMask];
NSUInteger buttonMask = [exportCustomFilenameViewButton autoresizingMask];
NSUInteger textFieldMask = [exportCustomFilenameViewLabelButton autoresizingMask];
NSUInteger customFilenameViewMask = [exportCustomFilenameView autoresizingMask];
NSUInteger tabBarMask = [exportOptionsTabBar autoresizingMask];
NSAutoresizingMaskOptions popUpMask = [exportInputPopUpButton autoresizingMask];
NSAutoresizingMaskOptions fileCheckMask = [exportFilePerTableCheck autoresizingMask];
NSAutoresizingMaskOptions scrollMask = [exportTablelistScrollView autoresizingMask];
NSAutoresizingMaskOptions buttonBarMask = [exportTableListButtonBar autoresizingMask];
NSAutoresizingMaskOptions buttonMask = [exportCustomFilenameViewButton autoresizingMask];
NSAutoresizingMaskOptions textFieldMask = [exportCustomFilenameViewLabelButton autoresizingMask];
NSAutoresizingMaskOptions customFilenameViewMask = [exportCustomFilenameView autoresizingMask];
NSAutoresizingMaskOptions tabBarMask = [exportOptionsTabBar autoresizingMask];
NSRect frame = [[self window] frame];
@@ -2412,13 +2412,13 @@ - (void)_resizeWindowForCustomFilenameViewByHeightDelta:(NSInteger)delta
*/
- (void)_resizeWindowForAdvancedOptionsViewByHeightDelta:(NSInteger)delta
{
NSUInteger scrollMask = [exportTablelistScrollView autoresizingMask];
NSUInteger buttonBarMask = [exportTableListButtonBar autoresizingMask];
NSUInteger tabBarMask = [exportTypeTabBar autoresizingMask];
NSUInteger optionsTabBarMask = [exportOptionsTabBar autoresizingMask];
NSUInteger buttonMask = [exportAdvancedOptionsViewButton autoresizingMask];
NSUInteger textFieldMask = [exportAdvancedOptionsViewLabelButton autoresizingMask];
NSUInteger advancedViewMask = [exportAdvancedOptionsView autoresizingMask];
NSAutoresizingMaskOptions scrollMask = [exportTablelistScrollView autoresizingMask];
NSAutoresizingMaskOptions buttonBarMask = [exportTableListButtonBar autoresizingMask];
NSAutoresizingMaskOptions tabBarMask = [exportTypeTabBar autoresizingMask];
NSAutoresizingMaskOptions optionsTabBarMask = [exportOptionsTabBar autoresizingMask];
NSAutoresizingMaskOptions buttonMask = [exportAdvancedOptionsViewButton autoresizingMask];
NSAutoresizingMaskOptions textFieldMask = [exportAdvancedOptionsViewLabelButton autoresizingMask];
NSAutoresizingMaskOptions advancedViewMask = [exportAdvancedOptionsView autoresizingMask];
NSRect frame = [[self window] frame];
@@ -1324,17 +1324,17 @@ - (IBAction)insertRecentGlobalValue:(id)sender
- (void)resizeWindowByHeightDelta:(NSInteger)delta
{
#ifndef SP_CODA /* resizeWindowByHeightDelta: */
NSUInteger tableMask = [fieldMapperTableScrollView autoresizingMask];
NSUInteger headerSwitchMask = [importFieldNamesHeaderSwitch autoresizingMask];
NSUInteger alignPopupMask = [alignByPopup autoresizingMask];
NSUInteger alignPopupLabelMask = [alignByPopupLabel autoresizingMask];
NSUInteger importMethodLabelMask = [importMethodLabel autoresizingMask];
NSUInteger importMethodMask = [importMethodPopup autoresizingMask];
NSUInteger advancedButtonMask = [advancedButton autoresizingMask];
NSUInteger advancedLabelMask = [advancedLabel autoresizingMask];
NSUInteger insertViewMask = [advancedInsertView autoresizingMask];
NSUInteger updateViewMask = [advancedUpdateView autoresizingMask];
NSUInteger replaceViewMask = [advancedReplaceView autoresizingMask];
NSAutoresizingMaskOptions tableMask = [fieldMapperTableScrollView autoresizingMask];
NSAutoresizingMaskOptions headerSwitchMask = [importFieldNamesHeaderSwitch autoresizingMask];
NSAutoresizingMaskOptions alignPopupMask = [alignByPopup autoresizingMask];
NSAutoresizingMaskOptions alignPopupLabelMask = [alignByPopupLabel autoresizingMask];
NSAutoresizingMaskOptions importMethodLabelMask = [importMethodLabel autoresizingMask];
NSAutoresizingMaskOptions importMethodMask = [importMethodPopup autoresizingMask];
NSAutoresizingMaskOptions advancedButtonMask = [advancedButton autoresizingMask];
NSAutoresizingMaskOptions advancedLabelMask = [advancedLabel autoresizingMask];
NSAutoresizingMaskOptions insertViewMask = [advancedInsertView autoresizingMask];
NSAutoresizingMaskOptions updateViewMask = [advancedUpdateView autoresizingMask];
NSAutoresizingMaskOptions replaceViewMask = [advancedReplaceView autoresizingMask];
NSRect frame = [[self window] frame];
if(frame.size.height>600 && delta > heightOffset) {
@@ -1026,15 +1026,15 @@ - (void)_removingIndexFailedWithForeignKeyError:(NSDictionary *)info
*/
- (void)_resizeWindowForAdvancedOptionsViewByHeightDelta:(NSInteger)delta
{
NSUInteger popUpMask = [indexTypePopUpButton autoresizingMask];
NSUInteger nameFieldMask = [indexNameTextField autoresizingMask];
NSUInteger scrollMask = [indexedColumnsScrollView autoresizingMask];
NSUInteger buttonMask = [indexAdvancedOptionsViewButton autoresizingMask];
NSUInteger textFieldMask = [indexAdvancedOptionsViewLabelButton autoresizingMask];
NSUInteger advancedViewMask = [indexAdvancedOptionsView autoresizingMask];
NSUInteger typeLabelMask = [indexTypeLabel autoresizingMask];
NSUInteger nameLabelMask = [indexNameLabel autoresizingMask];
NSUInteger buttonBarMask = [(NSView*)anchoredButtonBar autoresizingMask];
NSAutoresizingMaskOptions popUpMask = [indexTypePopUpButton autoresizingMask];
NSAutoresizingMaskOptions nameFieldMask = [indexNameTextField autoresizingMask];
NSAutoresizingMaskOptions scrollMask = [indexedColumnsScrollView autoresizingMask];
NSAutoresizingMaskOptions buttonMask = [indexAdvancedOptionsViewButton autoresizingMask];
NSAutoresizingMaskOptions textFieldMask = [indexAdvancedOptionsViewLabelButton autoresizingMask];
NSAutoresizingMaskOptions advancedViewMask = [indexAdvancedOptionsView autoresizingMask];
NSAutoresizingMaskOptions typeLabelMask = [indexTypeLabel autoresizingMask];
NSAutoresizingMaskOptions nameLabelMask = [indexNameLabel autoresizingMask];
NSAutoresizingMaskOptions buttonBarMask = [anchoredButtonBar autoresizingMask];
NSRect frame = [[self window] frame];
@@ -1053,8 +1053,7 @@ - (void)_resizeWindowForAdvancedOptionsViewByHeightDelta:(NSInteger)delta
[indexAdvancedOptionsView setAutoresizingMask:NSViewNotSizable | NSViewMinYMargin];
[indexTypeLabel setAutoresizingMask:NSViewNotSizable | NSViewMinYMargin];
[indexNameLabel setAutoresizingMask:NSViewNotSizable | NSViewMinYMargin];
[(NSView*)anchoredButtonBar setAutoresizingMask:NSViewNotSizable | NSViewMinYMargin];
[anchoredButtonBar setAutoresizingMask:NSViewNotSizable | NSViewMinYMargin];
NSInteger newMinHeight = (windowMinHeigth - heightOffset + delta < windowMinHeigth) ? windowMinHeigth : windowMinHeigth - heightOffset + delta;
@@ -1078,8 +1077,7 @@ - (void)_resizeWindowForAdvancedOptionsViewByHeightDelta:(NSInteger)delta
[indexAdvancedOptionsView setAutoresizingMask:advancedViewMask];
[indexTypeLabel setAutoresizingMask:typeLabelMask];
[indexNameLabel setAutoresizingMask:nameLabelMask];
[(NSView*)anchoredButtonBar setAutoresizingMask:buttonBarMask];
[anchoredButtonBar setAutoresizingMask:buttonBarMask];
}
#pragma mark -
@@ -58,17 +58,17 @@ @interface SPSplitViewHelperView : NSView
NSView *wrappedView;
}
- (id)initReplacingView:(NSView *)aView inVerticalSplitView:(BOOL)verticalSplitView;
- (instancetype)initReplacingView:(NSView *)aView inVerticalSplitView:(BOOL)verticalSplitView;
- (void)restoreOriginalView;
@end
@interface SPSplitViewAnimationRetainCycleBypass : NSObject
{
SPSplitView *parentSplitView;
__unsafe_unretained SPSplitView *parentSplitView;
}
- (id)initWithParent:(SPSplitView *)aSplitView;
- (instancetype)initWithParent:(SPSplitView *)aSplitView;
- (void)_animationStep:(NSTimer *)aTimer;
@end
@@ -1106,12 +1106,12 @@ @implementation SPSplitViewHelperView
* specified view, adding it as a subview to maintain the same appearance, and then
* can be animated without affecting the contained view.
*/
- (id)initReplacingView:(NSView *)aView inVerticalSplitView:(BOOL)verticalSplitView
- (instancetype)initReplacingView:(NSView *)aView inVerticalSplitView:(BOOL)verticalSplitView
{
self = [super initWithFrame:[aView frame]];
if (!self) return nil;
NSUInteger wrappedResizeMask = [wrappedView autoresizingMask];
NSAutoresizingMaskOptions wrappedResizeMask = [wrappedView autoresizingMask];
// Retain the wrapped view while this view exists
wrappedView = [aView retain];
@@ -1197,7 +1197,7 @@ - (void)dealloc
@implementation SPSplitViewAnimationRetainCycleBypass
- (id)initWithParent:(SPSplitView *)aSplitView
- (instancetype)initWithParent:(SPSplitView *)aSplitView
{
self = [super init];
if (!self) return nil;

0 comments on commit 3074e64

Please sign in to comment.