Changeset 6244
- Timestamp:
- Jun 22, 2008, 1:31:50 AM (14 years ago)
- Location:
- trunk/macosx
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/macosx/Controller.h
r6226 r6244 261 261 - (NSArray *) quickLookURLs; 262 262 - (BOOL) canQuickLook; 263 - (BOOL) canQuickLookTorrent: (Torrent *) torrent; 263 264 - (NSRect) quickLookFrameWithURL: (NSURL*) url; 264 265 - (void) toggleQuickLook: (id) sender; -
trunk/macosx/Controller.m
r6242 r6244 474 474 [self updateUI]; 475 475 fTimer = [NSTimer scheduledTimerWithTimeInterval: UPDATE_UI_SECONDS target: self 476 selector: @selector(updateUI) userInfo: nil repeats: YES];476 selector: @selector(updateUI) userInfo: nil repeats: YES]; 477 477 [[NSRunLoop currentRunLoop] addTimer: fTimer forMode: NSModalPanelRunLoopMode]; 478 478 [[NSRunLoop currentRunLoop] addTimer: fTimer forMode: NSEventTrackingRunLoopMode]; … … 4104 4104 4105 4105 while ((torrent = [enumerator nextObject])) 4106 { 4107 if ([torrent isFolder] || [torrent isComplete]) 4106 if ([self canQuickLookTorrent: torrent]) 4108 4107 [urlArray addObject: [NSURL fileURLWithPath: [torrent dataLocation]]]; 4109 }4110 4108 4111 4109 return urlArray; … … 4119 4117 4120 4118 while ((torrent = [enumerator nextObject])) 4121 { 4122 if ([torrent isFolder] || [torrent isComplete]) 4119 if ([self canQuickLookTorrent: torrent]) 4123 4120 return YES; 4124 }4125 4121 4126 4122 return NO; 4123 } 4124 4125 - (BOOL) canQuickLookTorrent: (Torrent *) torrent 4126 { 4127 if (![[NSFileManager defaultManager] fileExistsAtPath: [torrent dataLocation]]) 4128 return NO; 4129 4130 return [torrent isFolder] || [torrent isComplete]; 4127 4131 } 4128 4132 -
trunk/macosx/InfoWindowController.m
r6219 r6244 72 72 73 73 - (NSView *) tabViewForTag: (int) tag; 74 - (void) setWebSeedTableHidden: (BOOL) hide animate: (BOOL) animate; 74 75 - (NSArray *) peerSortDescriptors; 75 - (void) setWebSeedTableHidden: (BOOL) hide animate: (BOOL) animate; 76 77 - (BOOL) canQuickLookFile: (FileListNode *) item; 76 78 77 79 - (void) addTrackers; … … 1089 1091 { 1090 1092 FileListNode * item = [fileOutlineView itemAtRow: i]; 1091 if ([ item isFolder] || [torrent fileProgress: [[item indexes] firstIndex]] == 1.0)1093 if ([self canQuickLookFile: item]) 1092 1094 [urlArray addObject: [NSURL fileURLWithPath: [folder stringByAppendingPathComponent: [item fullPath]]]]; 1093 1095 } … … 1104 1106 int i; 1105 1107 for (i = [indexes firstIndex]; i != NSNotFound; i = [indexes indexGreaterThanIndex: i]) 1106 { 1107 FileListNode * item = [fileOutlineView itemAtRow: i]; 1108 if ([item isFolder] || [torrent fileProgress: [[item indexes] firstIndex]] == 1.0) 1108 if ([self canQuickLookFile: [fileOutlineView itemAtRow: i]]) 1109 1109 return YES; 1110 }1111 1110 1112 1111 return NO; … … 1601 1600 } 1602 1601 1602 - (BOOL) canQuickLookFile: (FileListNode *) item 1603 { 1604 Torrent * torrent = [fTorrents objectAtIndex: 0]; 1605 1606 if (![[NSFileManager defaultManager] fileExistsAtPath: [[torrent downloadFolder] stringByAppendingPathComponent: [item fullPath]]]) 1607 return NO; 1608 1609 return [item isFolder] || [torrent fileProgress: [[item indexes] firstIndex]] == 1.0; 1610 } 1611 1603 1612 - (void) addTrackers 1604 1613 { -
trunk/macosx/Torrent.m
r6215 r6244 258 258 } 259 259 260 #warning when queue and seeding options are folded into libt, no need to call this on all torrents - use tr_torrentGetStatus261 260 - (void) update 262 261 {
Note: See TracChangeset
for help on using the changeset viewer.