Changeset 820


Ignore:
Timestamp:
Aug 22, 2006, 3:11:24 AM (15 years ago)
Author:
livings124
Message:

Get rid of blank line at bottom of message log.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/macosx/MessageWindowController.m

    r819 r820  
    8787    for (currentMessage = messages; currentMessage != NULL; currentMessage = currentMessage->next)
    8888    {
     89        //new line if text view is not empty
     90        if (currentMessage != messages || ![[fTextView string] isEqualToString: @""])
     91            [[fTextView textStorage] appendAttributedString: [[[NSAttributedString alloc]
     92                                                                initWithString: @"\n"] autorelease]];
     93       
    8994        int level = currentMessage->level;
    9095        if (level == TR_MSG_ERR)
     
    99104        dateString = [[NSDate dateWithTimeIntervalSince1970: currentMessage->when]
    100105                            dateWithCalendarFormat: @"%Y-%m-%d %H:%M:%S" timeZone: nil];
    101         messageString = [[[NSAttributedString alloc] initWithString: [NSString stringWithFormat: @"%@ %@ %s\n",
     106        messageString = [[[NSAttributedString alloc] initWithString: [NSString stringWithFormat: @"%@ %@ %s",
    102107                            dateString, levelString, currentMessage->message]] autorelease];
    103108       
Note: See TracChangeset for help on using the changeset viewer.