mirror of
https://github.com/transmission/transmission
synced 2025-01-31 03:12:44 +00:00
kill some warnings
This commit is contained in:
parent
2b76183eed
commit
92d2b7cc3a
3 changed files with 32 additions and 60 deletions
|
@ -93,9 +93,6 @@
|
|||
|
||||
- (void) addRemoveTracker: (id) sender;
|
||||
|
||||
- (NSArray *) quickLookURLs;
|
||||
- (BOOL) canQuickLook;
|
||||
|
||||
- (void) setPiecesView: (id) sender;
|
||||
- (void) setPiecesViewForAvailable: (BOOL) available;
|
||||
|
||||
|
|
|
@ -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];
|
||||
|
|
|
@ -869,14 +869,6 @@
|
|||
return fPiecesBarPercent;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
- (BOOL) acceptsPreviewPanelControl: (QLPreviewPanel *) panel
|
||||
{
|
||||
return YES;
|
||||
|
@ -929,11 +921,6 @@
|
|||
return frame;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@end
|
||||
|
||||
@implementation TorrentTableView (Private)
|
||||
|
|
Loading…
Reference in a new issue