Changeset 9542


Ignore:
Timestamp:
Nov 22, 2009, 3:40:19 AM (13 years ago)
Author:
livings124
Message:

in the message window code, create the processed file name/line number right away, to avoid having to store an extra number

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/macosx/MessageWindowController.m

    r9408 r9542  
    155155                            : [[NSProcessInfo processInfo] processName];
    156156       
     157        NSString * file = [NSString stringWithFormat: @"%@:%d", [[NSString stringWithUTF8String: currentMessage->file] lastPathComponent],
     158                            currentMessage->line];
     159       
    157160        NSDictionary * message  = [NSDictionary dictionaryWithObjectsAndKeys:
    158161                                    [NSString stringWithUTF8String: currentMessage->message], @"Message",
     
    161164                                    [NSNumber numberWithInteger: currentMessage->level], @"Level",
    162165                                    name, @"Name",
    163                                     [NSString stringWithUTF8String: currentMessage->file], @"File",
    164                                     [NSNumber numberWithInteger: currentMessage->line], @"Line", nil];
    165                                
     166                                    file, @"File", nil];
     167       
    166168        [fMessages addObject: message];
    167169    }
     
    246248{
    247249    NSDictionary * message = [fMessages objectAtIndex: row];
    248     return [NSString stringWithFormat: @"%@:%@", [[message objectForKey: @"File"] lastPathComponent], [message objectForKey: @"Line"]];
     250    return [message objectForKey: @"File"];
    249251}
    250252
     
    384386    }
    385387   
    386     return [NSString stringWithFormat: @"%@ %@:%@ [%@] %@: %@", [message objectForKey: @"Date"],
    387             [[message objectForKey: @"File"] lastPathComponent], [message objectForKey: @"Line"], level,
     388    return [NSString stringWithFormat: @"%@ %@ [%@] %@: %@", [message objectForKey: @"Date"],
     389            [message objectForKey: @"File"], level,
    388390            [message objectForKey: @"Name"], [message objectForKey: @"Message"], nil];
    389391}
Note: See TracChangeset for help on using the changeset viewer.