mirror of
https://github.com/macvim-dev/macvim.git
synced 2026-06-07 15:37:14 +02:00
Fix deprecation warning regarding NSOKButton on 10.10+.
This commit is contained in:
@@ -1095,7 +1095,12 @@ fsEventCallback(ConstFSEventStreamRef streamRef,
|
||||
#else
|
||||
NSInteger result = [panel runModalForDirectory:dir file:nil types:nil];
|
||||
#endif
|
||||
|
||||
#if (MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_10)
|
||||
if (NSModalResponseOK == result) {
|
||||
#else
|
||||
if (NSOKButton == result) {
|
||||
#endif
|
||||
// NOTE: -[NSOpenPanel filenames] is deprecated on 10.7 so use
|
||||
// -[NSOpenPanel URLs] instead. The downside is that we have to check
|
||||
// that each URL is really a path first.
|
||||
|
||||
@@ -888,7 +888,11 @@ static BOOL isUnsafeMessage(int msgid);
|
||||
context:(void *)context
|
||||
{
|
||||
NSString *path = nil;
|
||||
#if (MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_10)
|
||||
if (code == NSModalResponseOK) {
|
||||
#else
|
||||
if (code == NSOKButton) {
|
||||
#endif
|
||||
NSURL *url = [panel URL];
|
||||
if ([url isFileURL])
|
||||
path = [url path];
|
||||
|
||||
Reference in New Issue
Block a user