disable QuickLook on Snow Leopard, for now

This commit is contained in:
Mitchell Livingston 2009-08-22 12:59:40 +00:00
parent 88d6ad318a
commit a8f7ef8a3a
1 changed files with 4 additions and 1 deletions

View File

@ -146,7 +146,10 @@ QuickLookController * fQuickLookInstance = nil;
//load the QuickLook framework and set the delegate
//animation types: 0 = none; 1 = fade; 2 = zoom
fQuickLookAvailable = [[NSBundle bundleWithPath: @"/System/Library/PrivateFrameworks/QuickLookUI.framework"] load];
//disable on Snow Leopard for now
const NSInteger appKitVersionNumber10_5 = 949;
fQuickLookAvailable = floor(NSAppKitVersionNumber) <= appKitVersionNumber10_5
&& [[NSBundle bundleWithPath: @"/System/Library/PrivateFrameworks/QuickLookUI.framework"] load];
if (fQuickLookAvailable)
[[[QLPreviewPanel sharedPreviewPanel] windowController] setDelegate: self];
}