aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Source/SPConnectionController.m12
-rw-r--r--Source/SPConstants.h3
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