Changeset 2270
- Timestamp:
- Jul 1, 2007, 5:32:55 PM (15 years ago)
- Location:
- trunk/macosx
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/macosx/Controller.h
r2238 r2270 57 57 IBOutlet NSScrollView * fScrollView; 58 58 IBOutlet TorrentTableView * fTableView; 59 NSToolbar * fToolbar;60 59 61 60 IBOutlet NSMenuItem * fOpenIgnoreDownloadFolder; -
trunk/macosx/Controller.m
r2266 r2270 164 164 fTorrents = [[NSMutableArray alloc] init]; 165 165 fDisplayedTorrents = [[NSMutableArray alloc] init]; 166 fPendingTorrentDownloads = [[NSMutableDictionary alloc] init];167 166 168 167 fDefaults = [NSUserDefaults standardUserDefaults]; … … 191 190 [fMessageController release]; 192 191 [fPrefsController release]; 193 194 [fToolbar release];195 192 196 193 [fTorrents release]; … … 203 200 204 201 [fAutoImportedNames release]; 205 [fPendingTorrentDownloads release]; 202 if (fPendingTorrentDownloads) 203 [fPendingTorrentDownloads release]; 206 204 207 205 tr_close(fLib); … … 215 213 [fFilterBar setBackgroundImage: [NSImage imageNamed: @"FilterBarBackground.png"]]; 216 214 217 [fWindow setAcceptsMouseMovedEvents: YES]; //ensure filter buttons display correctly 218 219 fToolbar = [[NSToolbar alloc] initWithIdentifier: @"Transmission Toolbar"]; 220 [fToolbar setDelegate: self]; 221 [fToolbar setAllowsUserCustomization: YES]; 222 [fToolbar setAutosavesConfiguration: YES]; 223 [fWindow setToolbar: fToolbar]; 224 [fWindow setDelegate: self]; 215 NSToolbar * toolbar = [[NSToolbar alloc] initWithIdentifier: @"Transmission Toolbar"]; 216 [toolbar setDelegate: self]; 217 [toolbar setAllowsUserCustomization: YES]; 218 [toolbar setAutosavesConfiguration: YES]; 219 [fWindow setToolbar: toolbar]; 220 [toolbar release]; 225 221 226 222 [fWindow makeFirstResponder: fTableView]; 227 223 [fWindow setExcludedFromWindowsMenu: YES]; 224 [fWindow setAcceptsMouseMovedEvents: YES]; //ensure filter buttons display correctly 228 225 229 226 //set table size … … 525 522 { 526 523 //remove all torrent downloads 527 NSEnumerator * enumerator = [[fPendingTorrentDownloads allValues] objectEnumerator]; 528 NSDictionary * downloadDict; 529 NSURLDownload * download; 530 while ((downloadDict = [enumerator nextObject])) 531 { 532 download = [downloadDict objectForKey: @"Download"]; 533 [download cancel]; 534 [download release]; 535 } 536 [fPendingTorrentDownloads removeAllObjects]; 524 NSEnumerator * enumerator; 525 if (fPendingTorrentDownloads) 526 { 527 enumerator = [[fPendingTorrentDownloads allValues] objectEnumerator]; 528 NSDictionary * downloadDict; 529 NSURLDownload * download; 530 while ((downloadDict = [enumerator nextObject])) 531 { 532 download = [downloadDict objectForKey: @"Download"]; 533 [download cancel]; 534 [download release]; 535 } 536 [fPendingTorrentDownloads removeAllObjects]; 537 } 537 538 538 539 //stop timers … … 618 619 -(void) download: (NSURLDownload *) download didCreateDestination: (NSString *) path 619 620 { 621 if (!fPendingTorrentDownloads) 622 fPendingTorrentDownloads = [[NSMutableDictionary alloc] init]; 623 620 624 [fPendingTorrentDownloads setObject: [NSDictionary dictionaryWithObjectsAndKeys: 621 625 path, @"Path", download, @"Download", nil] forKey: [[download request] URL]]; -
trunk/macosx/Torrent.m
r2269 r2270 195 195 [fDownloadFolder release]; 196 196 [fIncompleteFolder release]; 197 197 198 198 [fPublicTorrentLocation release]; 199 200 199 201 200 [fDateAdded release]; 202 201 [fDateCompleted release]; 203 202 [fDateActivity release]; 204 203 205 204 [fAnnounceDate release]; 206 205 207 206 [fIcon release]; 208 207 [fIconFlipped release]; 209 208 [fIconSmall release]; 210 209 211 210 [fProgressString release]; 212 211 [fStatusString release]; 213 212 [fShortStatusString release]; 214 213 [fRemainingTimeString release]; 215 214 216 215 [fFileList release]; 217 216 [fFlatFileList release]; 218 217 219 218 [fBitmap release]; 220 219
Note: See TracChangeset
for help on using the changeset viewer.