A29DF8BD0DB2545A00D04E5A /* ggets.h in Headers */ = {isa = PBXBuildFile; fileRef = A2D307920D9EC4800051FD27 /* ggets.h */; };
A29DF8BE0DB2545F00D04E5A /* verify.h in Headers */ = {isa = PBXBuildFile; fileRef = A2D22A110D65EED100007D5F /* verify.h */; };
A29E04B50DA8764100705643 /* Network.png in Resources */ = {isa = PBXBuildFile; fileRef = A29E04B40DA8764100705643 /* Network.png */; };
+ A29EBE540DC01FC9006CEE80 /* web.c in Sources */ = {isa = PBXBuildFile; fileRef = A29EBE520DC01FC9006CEE80 /* web.c */; };
+ A29EBE550DC01FC9006CEE80 /* web.h in Headers */ = {isa = PBXBuildFile; fileRef = A29EBE530DC01FC9006CEE80 /* web.h */; };
A2A1CB7A0BF29D5500AE959F /* PeerProgressIndicatorCell.m in Sources */ = {isa = PBXBuildFile; fileRef = A2A1CB780BF29D5500AE959F /* PeerProgressIndicatorCell.m */; };
A2A3065C0AAD24A80049E2AC /* UKFileWatcher.m in Sources */ = {isa = PBXBuildFile; fileRef = A2A306540AAD24A80049E2AC /* UKFileWatcher.m */; };
A2A3065E0AAD24A80049E2AC /* UKFNSubscribeFileWatcher.m in Sources */ = {isa = PBXBuildFile; fileRef = A2A306560AAD24A80049E2AC /* UKFNSubscribeFileWatcher.m */; };
A29DF8B70DB2544C00D04E5A /* resume.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = resume.h; path = libtransmission/resume.h; sourceTree = "<group>"; };
A29DF8B80DB2544C00D04E5A /* torrent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = torrent.h; path = libtransmission/torrent.h; sourceTree = "<group>"; };
A29E04B40DA8764100705643 /* Network.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = Network.png; path = macosx/Images/Network.png; sourceTree = "<group>"; };
+ A29EBE520DC01FC9006CEE80 /* web.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = web.c; path = libtransmission/web.c; sourceTree = "<group>"; };
+ A29EBE530DC01FC9006CEE80 /* web.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = web.h; path = libtransmission/web.h; sourceTree = "<group>"; };
A2A1CB770BF29D5500AE959F /* PeerProgressIndicatorCell.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = PeerProgressIndicatorCell.h; path = macosx/PeerProgressIndicatorCell.h; sourceTree = "<group>"; };
A2A1CB780BF29D5500AE959F /* PeerProgressIndicatorCell.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; name = PeerProgressIndicatorCell.m; path = macosx/PeerProgressIndicatorCell.m; sourceTree = "<group>"; };
A2A306530AAD24A80049E2AC /* UKFileWatcher.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = UKFileWatcher.h; path = macosx/UKKQueue/UKFileWatcher.h; sourceTree = "<group>"; };
BE75C3570C72A0D600DBEFE0 /* libevent */ = {
isa = PBXGroup;
children = (
+ A29EBE520DC01FC9006CEE80 /* web.c */,
+ A29EBE530DC01FC9006CEE80 /* web.h */,
A2BC19DF0CA9D82300DD302A /* evutil.h */,
4D36BBC80CA309AA00A63CA5 /* evutil.c */,
BE75C3810C72A1C100DBEFE0 /* evhttp.h */,
A29DF8BB0DB2544C00D04E5A /* torrent.h in Headers */,
A29DF8BD0DB2545A00D04E5A /* ggets.h in Headers */,
A29DF8BE0DB2545F00D04E5A /* verify.h in Headers */,
+ A29EBE550DC01FC9006CEE80 /* web.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
4D4ADFC70DA1631500A68297 /* blocklist.c in Sources */,
A29DF8B90DB2544C00D04E5A /* resume.c in Sources */,
A29DF8BC0DB2545900D04E5A /* ggets.c in Sources */,
+ A29EBE540DC01FC9006CEE80 /* web.c in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
{
if ([NSApp isOnLeopardOrBetter])
{
+ #warning only update if change to values
[[NSApp dockTile] display];
return;
}
{
[download cancel];
- NSRunAlertPanel(NSLocalizedString(@"Torrent download failed", @"Download not a torrent -> title"),
+ NSRunAlertPanel(NSLocalizedString(@"Torrent download failed", "Download not a torrent -> title"),
[NSString stringWithFormat: NSLocalizedString(@"It appears that the file \"%@\" from %@ is not a torrent file.",
- @"Download not a torrent -> message"), suggestedName,
+ "Download not a torrent -> message"), suggestedName,
[[[[download request] URL] absoluteString] stringByReplacingPercentEscapesUsingEncoding: NSUTF8StringEncoding]],
- NSLocalizedString(@"OK", @"Download not a torrent -> button"), nil, nil);
+ NSLocalizedString(@"OK", "Download not a torrent -> button"), nil, nil);
[download release];
}
- (void) download: (NSURLDownload *) download didFailWithError: (NSError *) error
{
- NSRunAlertPanel(NSLocalizedString(@"Torrent download failed", @"Torrent download error -> title"),
- [NSString stringWithFormat: NSLocalizedString(@"The torrent could not be downloaded from %@ because an error occurred (%@).",
- @"Torrent download failed -> message"),
+ NSRunAlertPanel(NSLocalizedString(@"Torrent download failed", "Torrent download error -> title"),
+ [NSString stringWithFormat: NSLocalizedString(@"The torrent could not be downloaded from %@: %@.",
+ "Torrent download failed -> message"),
[[[[download request] URL] absoluteString] stringByReplacingPercentEscapesUsingEncoding: NSUTF8StringEncoding],
- [error localizedDescription]], NSLocalizedString(@"OK", @"Torrent download failed -> button"), nil, nil);
+ [error localizedDescription]], NSLocalizedString(@"OK", "Torrent download failed -> button"), nil, nil);
[fPendingTorrentDownloads removeObjectForKey: [[download request] URL]];
[download release];
if (returnCode != 1)
return;
+ #warning disable OK button when blank
NSString * urlString = [fURLSheetTextField stringValue];
if (![urlString isEqualToString: @""])
{
[urlString substringToIndex: beforeCom],
[urlString substringFromIndex: beforeCom + 1]];
else
- urlString = [NSString stringWithFormat: @"http://www.%@.com", urlString];
+ urlString = [NSString stringWithFormat: @"http://www.%@.com/", urlString];
}
else
urlString = [@"http://" stringByAppendingString: urlString];
break;
case SORT_ACTIVITY_TAG:
sortType = SORT_ACTIVITY;
- break;
- default:
- sortType = @"";
}
[menuItem setState: [sortType isEqualToString: [fDefaults stringForKey: @"Sort"]] ? NSOnState : NSOffState];
break;
case STATUS_TRANSFER_SESSION_TAG:
statusLabel = STATUS_TRANSFER_SESSION;
- break;
- default:
- statusLabel = @"";;
}
[menuItem setState: [statusLabel isEqualToString: [fDefaults stringForKey: @"StatusLabel"]] ? NSOnState : NSOffState];
trackerString = [@"http://" stringByAppendingString: trackerString];
//parse tracker string
+ #warning check if it works with https
if (tr_httpParseURL([trackerString UTF8String], -1, NULL, NULL, NULL))
{
NSAlert * alert = [[[NSAlert alloc] init] autorelease];
//check common reasons for failure
NSRange prefixRange = [trackerString rangeOfString: @"://"];
NSString * prefix = [trackerString substringToIndex: prefixRange.location];
- if ([prefix caseInsensitiveCompare: @"http"] != NSOrderedSame)
- [alert setMessageText: NSLocalizedString(@"The tracker address must begin with \"http://\".",
+ if ([prefix caseInsensitiveCompare: @"http"] != NSOrderedSame && [prefix caseInsensitiveCompare: @"https"] != NSOrderedSame)
+ [alert setMessageText: NSLocalizedString(@"The tracker address must begin with \"http://\" or \"https://\".",
"Create torrent -> warning -> message")];
else if ([trackerString length] == NSMaxRange(prefixRange)) //don't allow blank addresses
[alert setMessageText: NSLocalizedString(@"The tracker address cannot be blank.", "Create torrent -> warning -> message")];
- (NSString *) trackerAddress
{
- return [NSString stringWithFormat: @"http://%s:%d", fStat->tracker->address, fStat->tracker->port];
+ return [NSString stringWithUTF8String: fStat->tracker->announce];
}
+#warning now redundant
- (NSString *) trackerAddressAnnounce
{
return [NSString stringWithUTF8String: fStat->tracker->announce];
{
NSMutableArray * allTrackers = [NSMutableArray array];
- int i;
- for (i = 0; i < fInfo->trackerTiers; i++)
+ int i, tier = -1;
+ for (i = 0; i < fInfo->trackerCount; i++)
{
- if (separators)
+ if (tier != fInfo->trackers[i].tier)
[allTrackers addObject: [NSNumber numberWithInt: i]];
- int j;
- for (j = 0; j < fInfo->trackerList[i].count; j++)
- [allTrackers addObject: [NSString stringWithFormat: @"http://%s:%d",
- fInfo->trackerList[i].list[j].address, fInfo->trackerList[i].list[j].port]];
+ [allTrackers addObject: [NSString stringWithUTF8String: fInfo->trackers[i].announce]];
}
return allTrackers;