Changeset 9577
- Timestamp:
- Nov 26, 2009, 2:11:00 AM (13 years ago)
- Location:
- trunk/macosx
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/macosx/Controller.m
r9561 r9577 1131 1131 NSString * urlString = [fURLSheetTextField stringValue]; 1132 1132 1133 if ([urlString compare: @"magnet:" options: (NSAnchoredSearch | NSCaseInsensitiveSearch)])1133 if ([urlString rangeOfString: @"magnet:" options: (NSAnchoredSearch | NSCaseInsensitiveSearch)].location != NSNotFound) 1134 1134 [self openMagnet: urlString]; 1135 1135 else … … 1151 1151 } 1152 1152 1153 1154 else 1155 { 1156 NSURL * url = [NSURL URLWithString: urlString]; 1157 [self performSelectorOnMainThread: @selector(openURL:) withObject: url waitUntilDone: NO]; 1158 } 1153 NSURL * url = [NSURL URLWithString: urlString]; 1154 [self performSelectorOnMainThread: @selector(openURL:) withObject: url waitUntilDone: NO]; 1159 1155 } 1160 1156 } -
trunk/macosx/Torrent.h
r9566 r9577 40 40 NSImage * fIcon; 41 41 42 NSString * f NameString, * fHashString;42 NSString * fHashString; 43 43 44 44 tr_file_stat * fFileStat; -
trunk/macosx/Torrent.m
r9574 r9577 188 188 [fPreviousFinishedIndexesDate release]; 189 189 190 [fNameString release];191 190 [fHashString release]; 192 191 … … 565 564 - (NSString *) name 566 565 { 567 return fNameString;566 return [NSString stringWithUTF8String: fInfo->name]; 568 567 } 569 568 … … 697 696 - (NSString *) torrentLocation 698 697 { 699 return [NSString stringWithUTF8String: fInfo->torrent];698 return fInfo->torrent ? [NSString stringWithUTF8String: fInfo->torrent] : @""; 700 699 } 701 700 … … 1562 1561 tr_torrentSetRatioLimitHitCallback(fHandle, ratioLimitHitCallback, self); 1563 1562 1564 fNameString = [[NSString alloc] initWithUTF8String: fInfo->name];1565 1563 fHashString = [[NSString alloc] initWithUTF8String: fInfo->hashString]; 1566 1564
Note: See TracChangeset
for help on using the changeset viewer.