diff --git a/src/MacVim/MMAppController.m b/src/MacVim/MMAppController.m index c932be938b..d6b3d0c8ad 100644 --- a/src/MacVim/MMAppController.m +++ b/src/MacVim/MMAppController.m @@ -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. diff --git a/src/MacVim/MMVimController.m b/src/MacVim/MMVimController.m index 8e01088b6a..3094e4bccb 100644 --- a/src/MacVim/MMVimController.m +++ b/src/MacVim/MMVimController.m @@ -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];