Changeset 5264


Ignore:
Timestamp:
Mar 16, 2008, 3:44:10 PM (14 years ago)
Author:
livings124
Message:

clean up a little more of the message log code

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/macosx/MessageWindowController.m

    r5263 r5264  
    3838- (void) resizeColumn;
    3939- (NSString *) stringForMessage: (NSDictionary *) message;
    40 - (NSString *) fileForMessage: (NSDictionary *) message;
    4140
    4241@end
     
    243242                tableColumn: (NSTableColumn *) column row: (int) row mouseLocation: (NSPoint) mouseLocation
    244243{
    245     return [self fileForMessage: [fMessages objectAtIndex: row]];
     244    NSDictionary * message = [fMessages objectAtIndex: row];
     245    return [NSString stringWithFormat: @"%@:%@", [[message objectForKey: @"File"] lastPathComponent], [message objectForKey: @"Line"]];
    246246}
    247247
     
    377377    }
    378378   
    379     return [NSString stringWithFormat: @"%@ %@ %@: [%@] %@", [message objectForKey: @"Date"], [self fileForMessage: message],
    380             [message objectForKey: @"Name"], level, [message objectForKey: @"Message"], nil];
    381 }
    382 
    383 - (NSString *) fileForMessage: (NSDictionary *) message
    384 {
    385     NSString * file;
    386     if ((file = [message objectForKey: @"File"]))
    387         return [NSString stringWithFormat: @"%@:%@", [[message objectForKey: @"File"] lastPathComponent],
    388                 [message objectForKey: @"Line"]];
    389     else
    390         return nil;
     379    return [NSString stringWithFormat: @"%@ %@:%@ [%@] %@: %@", [message objectForKey: @"Date"],
     380            [[message objectForKey: @"File"] lastPathComponent], [message objectForKey: @"Line"], level,
     381            [message objectForKey: @"Name"], [message objectForKey: @"Message"], nil];
    391382}
    392383
Note: See TracChangeset for help on using the changeset viewer.