mirror of
https://github.com/transmission/transmission
synced 2025-03-04 18:48:06 +00:00
Get rid of blank line at bottom of message log.
This commit is contained in:
parent
32cdb550fb
commit
f548d17e8e
1 changed files with 6 additions and 1 deletions
|
@ -86,6 +86,11 @@
|
|||
NSCalendarDate * dateString;
|
||||
for (currentMessage = messages; currentMessage != NULL; currentMessage = currentMessage->next)
|
||||
{
|
||||
//new line if text view is not empty
|
||||
if (currentMessage != messages || ![[fTextView string] isEqualToString: @""])
|
||||
[[fTextView textStorage] appendAttributedString: [[[NSAttributedString alloc]
|
||||
initWithString: @"\n"] autorelease]];
|
||||
|
||||
int level = currentMessage->level;
|
||||
if (level == TR_MSG_ERR)
|
||||
levelString = @"ERR";
|
||||
|
@ -98,7 +103,7 @@
|
|||
|
||||
dateString = [[NSDate dateWithTimeIntervalSince1970: currentMessage->when]
|
||||
dateWithCalendarFormat: @"%Y-%m-%d %H:%M:%S" timeZone: nil];
|
||||
messageString = [[[NSAttributedString alloc] initWithString: [NSString stringWithFormat: @"%@ %@ %s\n",
|
||||
messageString = [[[NSAttributedString alloc] initWithString: [NSString stringWithFormat: @"%@ %@ %s",
|
||||
dateString, levelString, currentMessage->message]] autorelease];
|
||||
|
||||
[[fTextView textStorage] appendAttributedString: messageString];
|
||||
|
|
Loading…
Add table
Reference in a new issue