mirror of
https://github.com/transmission/transmission.git
synced 2025-12-24 12:28:52 +00:00
add some 10.6 checks for quick look
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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];
|
||||
|
||||
@@ -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];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user