Ignore:
Timestamp:
Nov 18, 2007, 12:28:37 AM (15 years ago)
Author:
livings124
Message:

have the info controller format the peer status string, for efficiency sakes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/macosx/InfoWindowController.m

    r3862 r3863  
    801801        }
    802802        else if ([ident isEqualToString: @"Status"])
    803             return [peer objectForKey: @"Status"];
     803        {
     804            switch ([[peer objectForKey: @"Status"] intValue])
     805            {
     806                case TR_PEER_STATUS_HANDSHAKE:
     807                    return NSLocalizedString(@"Handshaking", "peer -> status");
     808                case TR_PEER_STATUS_PEER_IS_CHOKED:
     809                    return NSLocalizedString(@"Peer is Choked", "peer -> status");
     810                case TR_PEER_STATUS_CLIENT_IS_CHOKED:
     811                    return NSLocalizedString(@"Choked", "peer -> status");
     812                case TR_PEER_STATUS_CLIENT_IS_INTERESTED:
     813                    return NSLocalizedString(@"Choked and Interested", "peer -> status");
     814                case TR_PEER_STATUS_READY:
     815                    return NSLocalizedString(@"Ready", "peer -> status");
     816                case TR_PEER_STATUS_REQUEST_SENT:
     817                    return NSLocalizedString(@"Request Sent", "peer -> status");
     818                case TR_PEER_STATUS_ACTIVE:
     819                    return NSLocalizedString(@"Active", "peer -> status");
     820            }
     821        }
    804822        else
    805823            return [peer objectForKey: @"IP"];
Note: See TracChangeset for help on using the changeset viewer.