Changeset 5674


Ignore:
Timestamp:
Apr 24, 2008, 1:55:33 AM (14 years ago)
Author:
livings124
Message:

mac changes for #377, number one (it doesn't compile yet)

Location:
trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/Transmission.xcodeproj/project.pbxproj

    r5665 r5674  
    153153                A29DF8BE0DB2545F00D04E5A /* verify.h in Headers */ = {isa = PBXBuildFile; fileRef = A2D22A110D65EED100007D5F /* verify.h */; };
    154154                A29E04B50DA8764100705643 /* Network.png in Resources */ = {isa = PBXBuildFile; fileRef = A29E04B40DA8764100705643 /* Network.png */; };
     155                A29EBE540DC01FC9006CEE80 /* web.c in Sources */ = {isa = PBXBuildFile; fileRef = A29EBE520DC01FC9006CEE80 /* web.c */; };
     156                A29EBE550DC01FC9006CEE80 /* web.h in Headers */ = {isa = PBXBuildFile; fileRef = A29EBE530DC01FC9006CEE80 /* web.h */; };
    155157                A2A1CB7A0BF29D5500AE959F /* PeerProgressIndicatorCell.m in Sources */ = {isa = PBXBuildFile; fileRef = A2A1CB780BF29D5500AE959F /* PeerProgressIndicatorCell.m */; };
    156158                A2A3065C0AAD24A80049E2AC /* UKFileWatcher.m in Sources */ = {isa = PBXBuildFile; fileRef = A2A306540AAD24A80049E2AC /* UKFileWatcher.m */; };
     
    571573                A29DF8B80DB2544C00D04E5A /* torrent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = torrent.h; path = libtransmission/torrent.h; sourceTree = "<group>"; };
    572574                A29E04B40DA8764100705643 /* Network.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = Network.png; path = macosx/Images/Network.png; sourceTree = "<group>"; };
     575                A29EBE520DC01FC9006CEE80 /* web.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = web.c; path = libtransmission/web.c; sourceTree = "<group>"; };
     576                A29EBE530DC01FC9006CEE80 /* web.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = web.h; path = libtransmission/web.h; sourceTree = "<group>"; };
    573577                A2A1CB770BF29D5500AE959F /* PeerProgressIndicatorCell.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = PeerProgressIndicatorCell.h; path = macosx/PeerProgressIndicatorCell.h; sourceTree = "<group>"; };
    574578                A2A1CB780BF29D5500AE959F /* PeerProgressIndicatorCell.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; name = PeerProgressIndicatorCell.m; path = macosx/PeerProgressIndicatorCell.m; sourceTree = "<group>"; };
     
    12161220                        isa = PBXGroup;
    12171221                        children = (
     1222                                A29EBE520DC01FC9006CEE80 /* web.c */,
     1223                                A29EBE530DC01FC9006CEE80 /* web.h */,
    12181224                                A2BC19DF0CA9D82300DD302A /* evutil.h */,
    12191225                                4D36BBC80CA309AA00A63CA5 /* evutil.c */,
     
    13811387                                A29DF8BD0DB2545A00D04E5A /* ggets.h in Headers */,
    13821388                                A29DF8BE0DB2545F00D04E5A /* verify.h in Headers */,
     1389                                A29EBE550DC01FC9006CEE80 /* web.h in Headers */,
    13831390                        );
    13841391                        runOnlyForDeploymentPostprocessing = 0;
     
    18021809                                A29DF8B90DB2544C00D04E5A /* resume.c in Sources */,
    18031810                                A29DF8BC0DB2545900D04E5A /* ggets.c in Sources */,
     1811                                A29EBE540DC01FC9006CEE80 /* web.c in Sources */,
    18041812                        );
    18051813                        runOnlyForDeploymentPostprocessing = 0;
  • trunk/macosx/Badger.m

    r5479 r5674  
    8686    if ([NSApp isOnLeopardOrBetter])
    8787    {
     88        #warning only update if change to values
    8889        [[NSApp dockTile] display];
    8990        return;
  • trunk/macosx/Controller.m

    r5671 r5674  
    636636        [download cancel];
    637637       
    638         NSRunAlertPanel(NSLocalizedString(@"Torrent download failed", @"Download not a torrent -> title"),
     638        NSRunAlertPanel(NSLocalizedString(@"Torrent download failed", "Download not a torrent -> title"),
    639639            [NSString stringWithFormat: NSLocalizedString(@"It appears that the file \"%@\" from %@ is not a torrent file.",
    640             @"Download not a torrent -> message"), suggestedName,
     640            "Download not a torrent -> message"), suggestedName,
    641641            [[[[download request] URL] absoluteString] stringByReplacingPercentEscapesUsingEncoding: NSUTF8StringEncoding]],
    642             NSLocalizedString(@"OK", @"Download not a torrent -> button"), nil, nil);
     642            NSLocalizedString(@"OK", "Download not a torrent -> button"), nil, nil);
    643643       
    644644        [download release];
     
    660660- (void) download: (NSURLDownload *) download didFailWithError: (NSError *) error
    661661{
    662     NSRunAlertPanel(NSLocalizedString(@"Torrent download failed", @"Torrent download error -> title"),
    663         [NSString stringWithFormat: NSLocalizedString(@"The torrent could not be downloaded from %@ because an error occurred (%@).",
    664         @"Torrent download failed -> message"),
     662    NSRunAlertPanel(NSLocalizedString(@"Torrent download failed", "Torrent download error -> title"),
     663        [NSString stringWithFormat: NSLocalizedString(@"The torrent could not be downloaded from %@: %@.",
     664        "Torrent download failed -> message"),
    665665        [[[[download request] URL] absoluteString] stringByReplacingPercentEscapesUsingEncoding: NSUTF8StringEncoding],
    666         [error localizedDescription]], NSLocalizedString(@"OK", @"Torrent download failed -> button"), nil, nil);
     666        [error localizedDescription]], NSLocalizedString(@"OK", "Torrent download failed -> button"), nil, nil);
    667667   
    668668    [fPendingTorrentDownloads removeObjectForKey: [[download request] URL]];
     
    959959        return;
    960960   
     961    #warning disable OK button when blank
    961962    NSString * urlString = [fURLSheetTextField stringValue];
    962963    if (![urlString isEqualToString: @""])
     
    972973                                    [urlString substringFromIndex: beforeCom + 1]];
    973974                else
    974                     urlString = [NSString stringWithFormat: @"http://www.%@.com", urlString];
     975                    urlString = [NSString stringWithFormat: @"http://www.%@.com/", urlString];
    975976            }
    976977            else
     
    33553356            case SORT_ACTIVITY_TAG:
    33563357                sortType = SORT_ACTIVITY;
    3357                 break;
    3358             default:
    3359                 sortType = @"";
    33603358        }
    33613359       
     
    33813379            case STATUS_TRANSFER_SESSION_TAG:
    33823380                statusLabel = STATUS_TRANSFER_SESSION;
    3383                 break;
    3384             default:
    3385                 statusLabel = @"";;
    33863381        }
    33873382       
  • trunk/macosx/CreatorWindowController.m

    r5663 r5674  
    195195   
    196196    //parse tracker string
     197    #warning check if it works with https
    197198    if (tr_httpParseURL([trackerString UTF8String], -1, NULL, NULL, NULL))
    198199    {
     
    207208        NSRange prefixRange = [trackerString rangeOfString: @"://"];
    208209        NSString * prefix = [trackerString substringToIndex: prefixRange.location];
    209         if ([prefix caseInsensitiveCompare: @"http"] != NSOrderedSame)
    210             [alert setMessageText: NSLocalizedString(@"The tracker address must begin with \"http://\".",
     210        if ([prefix caseInsensitiveCompare: @"http"] != NSOrderedSame && [prefix caseInsensitiveCompare: @"https"] != NSOrderedSame)
     211            [alert setMessageText: NSLocalizedString(@"The tracker address must begin with \"http://\" or \"https://\".",
    211212                                                    "Create torrent -> warning -> message")];
    212213        else if ([trackerString length] == NSMaxRange(prefixRange)) //don't allow blank addresses
  • trunk/macosx/Torrent.m

    r5671 r5674  
    721721- (NSString *) trackerAddress
    722722{
    723     return [NSString stringWithFormat: @"http://%s:%d", fStat->tracker->address, fStat->tracker->port];
    724 }
    725 
     723    return [NSString stringWithUTF8String: fStat->tracker->announce];
     724}
     725
     726#warning now redundant
    726727- (NSString *) trackerAddressAnnounce
    727728{
     
    780781    NSMutableArray * allTrackers = [NSMutableArray array];
    781782   
    782     int i;
    783     for (i = 0; i < fInfo->trackerTiers; i++)
    784     {
    785         if (separators)
     783    int i, tier = -1;
     784    for (i = 0; i < fInfo->trackerCount; i++)
     785    {
     786        if (tier != fInfo->trackers[i].tier)
    786787            [allTrackers addObject: [NSNumber numberWithInt: i]];
    787788       
    788         int j;
    789         for (j = 0; j < fInfo->trackerList[i].count; j++)
    790             [allTrackers addObject: [NSString stringWithFormat: @"http://%s:%d",
    791                 fInfo->trackerList[i].list[j].address, fInfo->trackerList[i].list[j].port]];
     789        [allTrackers addObject: [NSString stringWithUTF8String: fInfo->trackers[i].announce]];
    792790    }
    793791   
Note: See TracChangeset for help on using the changeset viewer.