Changeset 1119 for trunk/macosx


Ignore:
Timestamp:
Nov 23, 2006, 1:38:18 AM (15 years ago)
Author:
livings124
Message:

add support in libT and the mac interface for displaying comment, creator, and date created

Location:
trunk/macosx
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/macosx/Controller.h

    r1102 r1119  
    9595   
    9696    NSMutableArray                  * fAutoImportedNames;
    97         NSMutableDictionary                             * fPendingTorrentDownloads;
     97    NSMutableDictionary             * fPendingTorrentDownloads;
    9898}
    9999
  • trunk/macosx/English.lproj/InfoWindow.nib/classes.nib

    r1010 r1119  
    2020            OUTLETS = {
    2121                fAnnounceField = NSTextField;
     22                fCommentField = NSTextField;
    2223                fConnectedPeersField = NSTextField;
     24                fCreatorField = NSTextField;
    2325                fDataLocationField = NSTextField;
     26                fDateCreatedField = NSTextField;
    2427                fDateStartedField = NSTextField;
    2528                fDownloadedTotalField = NSTextField;
  • trunk/macosx/English.lproj/InfoWindow.nib/info.nib

    r1054 r1119  
    44<dict>
    55        <key>IBDocumentLocation</key>
    6         <string>69 61 356 240 0 0 1152 842 </string>
     6        <string>58 51 356 240 0 0 1024 746 </string>
    77        <key>IBEditorPositions</key>
    88        <dict>
  • trunk/macosx/InfoWindowController.h

    r1010 r1119  
    3939    IBOutlet NSTextField * fNameField, * fSizeField, * fTrackerField,
    4040                        * fAnnounceField, * fPieceSizeField, * fPiecesField,
    41                         * fHashField,
     41                        * fHashField, * fCommentField,
    4242                        * fTorrentLocationField, * fDataLocationField,
    43                         * fDateStartedField, * fStateField,
     43                        * fDateStartedField,
     44                        * fCreatorField, * fDateCreatedField,
     45                        * fStateField,
    4446                        * fDownloadedValidField, * fDownloadedTotalField, * fUploadedTotalField,
    4547                        * fRatioField, * fSwarmSpeedField;
  • trunk/macosx/InfoWindowController.m

    r1066 r1119  
    4040
    4141//15 spacing at the bottom of each tab
    42 #define TAB_INFO_HEIGHT 182.0
     42#define TAB_INFO_HEIGHT 255.0
    4343#define TAB_ACTIVITY_HEIGHT 109.0
    4444#define TAB_PEERS_HEIGHT 260.0
     
    158158        [fHashField setStringValue: @""];
    159159        [fHashField setToolTip: nil];
     160        [fCommentField setStringValue: @""];
     161        [fCommentField setToolTip: @""];
     162       
     163        [fCreatorField setStringValue: @""];
     164        [fDateCreatedField setStringValue: @""];
    160165       
    161166        [fTorrentLocationField setStringValue: @""];
     
    172177        [fAnnounceField setSelectable: NO];
    173178        [fHashField setSelectable: NO];
     179        [fCommentField setSelectable: NO];
     180        [fCreatorField setSelectable: NO];
    174181        [fTorrentLocationField setSelectable: NO];
    175182        [fDataLocationField setSelectable: NO];
     
    203210        NSString * tracker = [torrent tracker],
    204211                * announce = [torrent announce],
    205                 * hashString = [torrent hashString];
     212                * hashString = [torrent hashString],
     213                * commentString = [torrent comment];
    206214        [fTrackerField setStringValue: tracker];
    207215        [fTrackerField setToolTip: tracker];
     
    212220        [fHashField setStringValue: hashString];
    213221        [fHashField setToolTip: hashString];
     222        [fCommentField setStringValue: commentString];
     223        [fCommentField setToolTip: commentString];
     224       
     225        [fCreatorField setStringValue: [torrent creator]];
     226        [fDateCreatedField setObjectValue: [torrent dateCreated]];
    214227       
    215228        BOOL publicTorrent = [torrent publicTorrent];
     
    232245        [fAnnounceField setSelectable: YES];
    233246        [fHashField setSelectable: YES];
     247        [fCommentField setSelectable: YES];
     248        [fCreatorField setSelectable: YES];
    234249        [fTorrentLocationField setSelectable: YES];
    235250        [fDataLocationField setSelectable: YES];
  • trunk/macosx/Torrent.h

    r1094 r1119  
    108108- (NSString *) tracker;
    109109- (NSString *) announce;
     110
     111- (NSString *) comment;
     112- (NSString *) creator;
     113- (NSDate *)   dateCreated;
     114
    110115- (int)        pieceSize;
    111116- (int)        pieceCount;
  • trunk/macosx/Torrent.m

    r1102 r1119  
    713713}
    714714
     715- (NSString *) comment
     716{
     717    return [NSString stringWithUTF8String: fInfo->comment];
     718}
     719
     720- (NSString *) creator
     721{
     722    return [NSString stringWithUTF8String: fInfo->creator];
     723}
     724
     725- (NSDate *) dateCreated
     726{
     727    int date = fInfo->dateCreated;
     728    return date > 0 ? [NSDate dateWithTimeIntervalSince1970: fInfo->dateCreated] : nil;
     729}
     730
    715731- (int) pieceSize
    716732{
Note: See TracChangeset for help on using the changeset viewer.