diff options
author | Max Lohrmann <dmoagx@users.noreply.github.com> | 2017-01-28 14:26:06 +0100 |
---|---|---|
committer | Max Lohrmann <dmoagx@users.noreply.github.com> | 2017-01-28 14:26:06 +0100 |
commit | ed5194021547e62ba2bd3ef40a287543888ad837 (patch) | |
tree | fdc67c619b8519f5c0085dbd7ab2a7b890e0024b /Source | |
parent | bd75d9a98c695689eedc26b28d68dd6a9d7008b4 (diff) | |
download | sequelpro-ed5194021547e62ba2bd3ef40a287543888ad837.tar.gz sequelpro-ed5194021547e62ba2bd3ef40a287543888ad837.tar.bz2 sequelpro-ed5194021547e62ba2bd3ef40a287543888ad837.zip |
Reenable SSH/SSL file picker accessory view by default on OS X 10.11+ (#2673)
Diffstat (limited to 'Source')
-rw-r--r-- | Source/SPConnectionController.m | 12 | ||||
-rw-r--r-- | Source/SPConstants.h | 3 |
2 files changed, 15 insertions, 0 deletions
diff --git a/Source/SPConnectionController.m b/Source/SPConnectionController.m index 4a509796..a2159b4f 100644 --- a/Source/SPConnectionController.m +++ b/Source/SPConnectionController.m @@ -71,6 +71,14 @@ static NSString *SPExportFavoritesFilename = @"SequelProFavorites.plist"; @end #endif +#if __MAC_OS_X_VERSION_MAX_ALLOWED < __MAC_10_11 +@interface NSOpenPanel (NSOpenPanel_ElCaptian) + +@property (getter=isAccessoryViewDisclosed) BOOL accessoryViewDisclosed; + +@end +#endif + /** * This is a utility function to validate SSL key/certificate files * @param fileData The contents of the file @@ -468,6 +476,10 @@ static NSComparisonResult _compareFavoritesUsingKey(id favorite1, id favorite2, keySelectionPanel = [[NSOpenPanel openPanel] retain]; // retain/release needed on OS X ≤ 10.6 according to Apple doc [keySelectionPanel setShowsHiddenFiles:[prefs boolForKey:SPHiddenKeyFileVisibilityKey]]; [keySelectionPanel setAccessoryView:accessoryView]; + //on os x 10.11+ the accessory view will be hidden by default and has to be made visible + if(accessoryView && [keySelectionPanel respondsToSelector:@selector(setAccessoryViewDisclosed:)]) { + [keySelectionPanel setAccessoryViewDisclosed:YES]; + } [keySelectionPanel setDelegate:self]; [keySelectionPanel beginSheetModalForWindow:[dbDocument parentWindow] completionHandler:^(NSInteger returnCode) { diff --git a/Source/SPConstants.h b/Source/SPConstants.h index 493e7c5c..161b5b0b 100644 --- a/Source/SPConstants.h +++ b/Source/SPConstants.h @@ -675,6 +675,9 @@ void _SPClear(id *addr); #ifndef __MAC_10_10 #define __MAC_10_10 101000 #endif +#ifndef __MAC_10_11 +#define __MAC_10_11 101100 +#endif // This enum is available since 10.5 but only got a "name" in 10.10 #if __MAC_OS_X_VERSION_MAX_ALLOWED < __MAC_10_10 |