From c581188a73bea9d591e9cefd179d9ee0c059e933 Mon Sep 17 00:00:00 2001 From: Tobias Taschner Date: Thu, 6 Aug 2015 11:46:46 +0200 Subject: [PATCH] Remove unused code in cocoa file dialog implementation. The removed function was used for OS X versions prior to 10.7 and was not used any more. --- src/osx/cocoa/filedlg.mm | 26 -------------------------- 1 file changed, 26 deletions(-) diff --git a/src/osx/cocoa/filedlg.mm b/src/osx/cocoa/filedlg.mm index bdfa9c9be0..9e439b9ab8 100644 --- a/src/osx/cocoa/filedlg.mm +++ b/src/osx/cocoa/filedlg.mm @@ -52,32 +52,6 @@ // then the delegate method - (BOOL)panel:(id)sender shouldShowFilename:(NSString *)filename will have to // be implemented -namespace -{ - -bool HasAppKit_10_6() -{ - // Even if we require 10.6, we might be loaded by an application that - // was linked against 10.5. setAllowedFileTypes will still be ignored - // in this case. From NSSavePanel.h: - // NSOpenPanel: On versions less than 10.6, this property is ignored. - // For applications that link against 10.6 and higher, this property will - // determine which files should be enabled in the open panel. - int32_t version = NSVersionOfLinkTimeLibrary("AppKit"); - if (version == -1) - { - // If we're loaded by an application that doesn't link against AppKit, - // use the runtime version instead. This check will not work for the - // case above. - version = NSVersionOfRunTimeLibrary("AppKit"); - } - - // Notice that this still works correctly even if version is -1. - return version >= 0x40e2400 /* version of 10.6 AppKit */; -} - -} // anonymous namespace - @interface wxOpenPanelDelegate : NSObject wxOSX_10_6_AND_LATER() { wxFileDialog* _dialog;