diff --git a/macosx/InfoWindowController.h b/macosx/InfoWindowController.h index b1c063239..687a61915 100644 --- a/macosx/InfoWindowController.h +++ b/macosx/InfoWindowController.h @@ -93,9 +93,6 @@ - (void) addRemoveTracker: (id) sender; -- (NSArray *) quickLookURLs; -- (BOOL) canQuickLook; - - (void) setPiecesView: (id) sender; - (void) setPiecesViewForAvailable: (BOOL) available; diff --git a/macosx/InfoWindowController.m b/macosx/InfoWindowController.m index d3af1a2f4..3f7dc9729 100644 --- a/macosx/InfoWindowController.m +++ b/macosx/InfoWindowController.m @@ -82,6 +82,8 @@ typedef enum - (void) setWebSeedTableHidden: (BOOL) hide animate: (BOOL) animate; - (NSArray *) peerSortDescriptors; +- (NSArray *) quickLookURLs; +- (BOOL) canQuickLook; - (BOOL) canQuickLookFile: (FileListNode *) item; - (void) addTrackers; @@ -1102,11 +1104,6 @@ typedef enum return [[fTrackers objectAtIndex: i] intValue] == 0; } - - - - - - (BOOL) acceptsPreviewPanelControl: (QLPreviewPanel *) panel { return fCurrentTabTag == TAB_FILES_TAG && [self canQuickLook]; @@ -1160,45 +1157,6 @@ typedef enum return frame; } - - - - -#warning private -- (NSArray *) quickLookURLs -{ - FileOutlineView * fileOutlineView = [fFileController outlineView]; - Torrent * torrent = [fTorrents objectAtIndex: 0]; - NSString * folder = [torrent downloadFolder]; - NSIndexSet * indexes = [fileOutlineView selectedRowIndexes]; - NSMutableArray * urlArray = [NSMutableArray arrayWithCapacity: [indexes count]]; - - for (NSUInteger i = [indexes firstIndex]; i != NSNotFound; i = [indexes indexGreaterThanIndex: i]) - { - FileListNode * item = [fileOutlineView itemAtRow: i]; - if ([self canQuickLookFile: item]) - [urlArray addObject: [NSURL fileURLWithPath: [folder stringByAppendingPathComponent: [item fullPath]]]]; - } - - return urlArray; -} - -#warning need? private? -- (BOOL) canQuickLook -{ - FileOutlineView * fileOutlineView = [fFileController outlineView]; - NSIndexSet * indexes = [fileOutlineView selectedRowIndexes]; - - for (NSUInteger i = [indexes firstIndex]; i != NSNotFound; i = [indexes indexGreaterThanIndex: i]) - if ([self canQuickLookFile: [fileOutlineView itemAtRow: i]]) - return YES; - - return NO; -} - - - - - (void) setPiecesView: (id) sender { [self setPiecesViewForAvailable: [sender selectedSegment] == PIECES_CONTROL_AVAILABLE]; @@ -1708,6 +1666,36 @@ typedef enum return descriptors; } +- (NSArray *) quickLookURLs +{ + FileOutlineView * fileOutlineView = [fFileController outlineView]; + Torrent * torrent = [fTorrents objectAtIndex: 0]; + NSString * folder = [torrent downloadFolder]; + NSIndexSet * indexes = [fileOutlineView selectedRowIndexes]; + NSMutableArray * urlArray = [NSMutableArray arrayWithCapacity: [indexes count]]; + + for (NSUInteger i = [indexes firstIndex]; i != NSNotFound; i = [indexes indexGreaterThanIndex: i]) + { + FileListNode * item = [fileOutlineView itemAtRow: i]; + if ([self canQuickLookFile: item]) + [urlArray addObject: [NSURL fileURLWithPath: [folder stringByAppendingPathComponent: [item fullPath]]]]; + } + + return urlArray; +} + +- (BOOL) canQuickLook +{ + FileOutlineView * fileOutlineView = [fFileController outlineView]; + NSIndexSet * indexes = [fileOutlineView selectedRowIndexes]; + + for (NSUInteger i = [indexes firstIndex]; i != NSNotFound; i = [indexes indexGreaterThanIndex: i]) + if ([self canQuickLookFile: [fileOutlineView itemAtRow: i]]) + return YES; + + return NO; +} + - (BOOL) canQuickLookFile: (FileListNode *) item { Torrent * torrent = [fTorrents objectAtIndex: 0]; diff --git a/macosx/TorrentTableView.m b/macosx/TorrentTableView.m index d3266c58a..3900e7f26 100644 --- a/macosx/TorrentTableView.m +++ b/macosx/TorrentTableView.m @@ -869,14 +869,6 @@ return fPiecesBarPercent; } - - - - - - - - - (BOOL) acceptsPreviewPanelControl: (QLPreviewPanel *) panel { return YES; @@ -929,11 +921,6 @@ return frame; } - - - - - @end @implementation TorrentTableView (Private)