Only update peer table when it's visible

This commit is contained in:
Mitchell Livingston
2006-09-03 16:16:35 +00:00
parent 4d0bc33f92
commit 4c100c1bf9
2 changed files with 27 additions and 15 deletions

View File

@@ -38,7 +38,7 @@
{
if ((self = [super initWithWindowNibName: name]))
{
NSMutableParagraphStyle * paragraph = [[NSMutableParagraphStyle defaultParagraphStyle] mutableCopy];
NSMutableParagraphStyle * paragraph = [[NSParagraphStyle defaultParagraphStyle] mutableCopy];
[paragraph setHeadIndent: 20.0];
fAttributes = [[NSDictionary alloc] initWithObjectsAndKeys:
@@ -87,7 +87,7 @@
- (void) updateLog: (NSTimer *) timer
{
tr_msg_list_t * messages, * currentMessage;
if (!(messages = tr_getQueuedMessages()))
if ((messages = tr_getQueuedMessages()) == NULL)
return;
//keep scrolled to bottom if already at bottom or there is no scroll bar yet