Changeset 819


Ignore:
Timestamp:
Aug 22, 2006, 2:56:09 AM (17 years ago)
Author:
livings124
Message:

Re-add time to message log.

Location:
trunk
Files:
2 edited

Legend:

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

    r810 r819  
    262262                4DCCBB3C09C3D71100D3CABF /* TorrentCell.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; name = TorrentCell.m; path = macosx/TorrentCell.m; sourceTree = "<group>"; };
    263263                4DCCBB3D09C3D71100D3CABF /* TorrentCell.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = TorrentCell.h; path = macosx/TorrentCell.h; sourceTree = "<group>"; };
    264                 4DDBB71909E16BAE00284745 /* transmissioncli */ = {isa = PBXFileReference; includeInIndex = 0; lastKnownFileType = "compiled.mach-o.executable"; path = transmissioncli; sourceTree = BUILT_PRODUCTS_DIR; };
     264                4DDBB71909E16BAE00284745 /* transmissioncli */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = transmissioncli; sourceTree = BUILT_PRODUCTS_DIR; };
    265265                4DDBB71B09E16BF100284745 /* transmissioncli.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = transmissioncli.c; path = cli/transmissioncli.c; sourceTree = "<group>"; };
    266266                4DDFDD20099A5D8E00189D81 /* DownloadBadge.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = DownloadBadge.png; path = macosx/Images/DownloadBadge.png; sourceTree = "<group>"; };
  • trunk/macosx/MessageWindowController.m

    r818 r819  
    7474- (void) updateLog: (NSTimer *) timer
    7575{
    76     tr_msg_list_t * messages = tr_getQueuedMessages(), * currentMessage;
    77     if (!messages)
     76    tr_msg_list_t * messages, * currentMessage;
     77    if (!(messages = tr_getQueuedMessages()))
    7878        return;
    7979   
     
    8484    NSAttributedString * messageString;
    8585    NSString * levelString;
     86    NSCalendarDate * dateString;
    8687    for (currentMessage = messages; currentMessage != NULL; currentMessage = currentMessage->next)
    8788    {
     
    9697            levelString = @"???";
    9798       
    98         messageString = [[[NSAttributedString alloc] initWithString: [NSString stringWithFormat: @"%@ %s\n",
    99                                                             levelString, currentMessage->message]] autorelease];
     99        dateString = [[NSDate dateWithTimeIntervalSince1970: currentMessage->when]
     100                            dateWithCalendarFormat: @"%Y-%m-%d %H:%M:%S" timeZone: nil];
     101        messageString = [[[NSAttributedString alloc] initWithString: [NSString stringWithFormat: @"%@ %@ %s\n",
     102                            dateString, levelString, currentMessage->message]] autorelease];
     103       
    100104        [[fTextView textStorage] appendAttributedString: messageString];
    101105    }
Note: See TracChangeset for help on using the changeset viewer.