]> granicus.if.org Git - transmission/commitdiff
add some 10.6 checks for quick look
authorMitchell Livingston <livings124@transmissionbt.com>
Mon, 7 Sep 2009 14:54:22 +0000 (14:54 +0000)
committerMitchell Livingston <livings124@transmissionbt.com>
Mon, 7 Sep 2009 14:54:22 +0000 (14:54 +0000)
macosx/Controller.m
macosx/FileOutlineController.m
macosx/InfoWindowController.m

index 648ae550b95096f417d3d7bae8d3694997a63ed9..a1dcb9534a4bc6110179885083e81a4a85545f84 100644 (file)
@@ -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
index 7b47a36db3290aeb3f5b6b1e3df40216ac376505..d11bccc3d52af76954e0d183aaa6a307efcfc0a2 100644 (file)
@@ -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];
index 2d150c03a191bc15557cb646d4060223f22a5735..03cbaeca1ea66072bd76c19832b9ebb8da94132d 100644 (file)
@@ -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];