From 61caf165abce032e8c41dedeb39c0fc93575aec0 Mon Sep 17 00:00:00 2001 From: Mitchell Livingston Date: Mon, 7 Sep 2009 14:54:22 +0000 Subject: [PATCH] add some 10.6 checks for quick look --- macosx/Controller.m | 5 ++++- macosx/FileOutlineController.m | 2 +- macosx/InfoWindowController.m | 5 ++++- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/macosx/Controller.m b/macosx/Controller.m index 648ae550b..a1dcb9534 100644 --- a/macosx/Controller.m +++ b/macosx/Controller.m @@ -1474,7 +1474,7 @@ static void sleepCallback(void * controller, io_service_t y, natural_t messageTy { [fInfoController setInfoForTorrents: [fTableView selectedTorrents]]; - if ([QLPreviewPanel sharedPreviewPanelExists] && [[QLPreviewPanel sharedPreviewPanel] isVisible]) + if ([NSApp isOnSnowLeopardOrBetter] && [QLPreviewPanel sharedPreviewPanelExists] && [[QLPreviewPanel sharedPreviewPanel] isVisible]) [[QLPreviewPanel sharedPreviewPanel] reloadData]; } @@ -3965,6 +3965,9 @@ static void sleepCallback(void * controller, io_service_t y, natural_t messageTy - (void) toggleQuickLook: (id) sender { + if (![NSApp isOnSnowLeopardOrBetter]) + return; + if ([[QLPreviewPanel sharedPreviewPanel] isVisible]) [[QLPreviewPanel sharedPreviewPanel] orderOut: nil]; else diff --git a/macosx/FileOutlineController.m b/macosx/FileOutlineController.m index 7b47a36db..d11bccc3d 100644 --- a/macosx/FileOutlineController.m +++ b/macosx/FileOutlineController.m @@ -132,7 +132,7 @@ typedef enum - (void) outlineViewSelectionDidChange: (NSNotification *) notification { - if ([QLPreviewPanel sharedPreviewPanelExists] && [[QLPreviewPanel sharedPreviewPanel] isVisible]) + if ([NSApp isOnSnowLeopardOrBetter] && [QLPreviewPanel sharedPreviewPanelExists] && [[QLPreviewPanel sharedPreviewPanel] isVisible]) { [[QLPreviewPanel sharedPreviewPanel] reloadData]; [[QLPreviewPanel sharedPreviewPanel] updateController]; diff --git a/macosx/InfoWindowController.m b/macosx/InfoWindowController.m index 2d150c03a..03cbaeca1 100644 --- a/macosx/InfoWindowController.m +++ b/macosx/InfoWindowController.m @@ -822,7 +822,7 @@ typedef enum [[window contentView] addSubview: view]; [view setHidden: NO]; - if ((fCurrentTabTag == TAB_FILES_TAG || oldTabTag == TAB_FILES_TAG) + if ([NSApp isOnSnowLeopardOrBetter] && (fCurrentTabTag == TAB_FILES_TAG || oldTabTag == TAB_FILES_TAG) && ([QLPreviewPanel sharedPreviewPanelExists] && [[QLPreviewPanel sharedPreviewPanel] isVisible])) [[QLPreviewPanel sharedPreviewPanel] updateController]; } @@ -1696,6 +1696,9 @@ typedef enum - (BOOL) canQuickLook { + if (![NSApp isOnSnowLeopardOrBetter]) + return NO; + FileOutlineView * fileOutlineView = [fFileController outlineView]; NSIndexSet * indexes = [fileOutlineView selectedRowIndexes]; -- 2.40.0