Changeset 821
- Timestamp:
- Aug 22, 2006, 3:23:00 AM (17 years ago)
- Location:
- trunk/macosx
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/macosx/MessageWindowController.h
r818 r821 33 33 34 34 NSTimer * fTimer; 35 NSDictionary * fAttributes; 35 36 } 36 37 -
trunk/macosx/MessageWindowController.m
r820 r821 40 40 fTimer = [NSTimer scheduledTimerWithTimeInterval: UPDATE_SECONDS target: self 41 41 selector: @selector(updateLog:) userInfo: nil repeats: YES]; 42 fAttributes = [[NSDictionary alloc] initWithObjectsAndKeys: [NSFont fontWithName: @"Monaco" size: 10], 43 NSFontAttributeName, nil]; 42 44 43 45 [[self window] update]; //make sure nib is loaded right away … … 49 51 { 50 52 [fTimer invalidate]; 53 [fAttributes release]; 54 51 55 [super dealloc]; 52 56 } … … 90 94 if (currentMessage != messages || ![[fTextView string] isEqualToString: @""]) 91 95 [[fTextView textStorage] appendAttributedString: [[[NSAttributedString alloc] 92 initWithString: @"\n"] autorelease]];96 initWithString: @"\n" attributes: fAttributes] autorelease]]; 93 97 94 98 int level = currentMessage->level; … … 105 109 dateWithCalendarFormat: @"%Y-%m-%d %H:%M:%S" timeZone: nil]; 106 110 messageString = [[[NSAttributedString alloc] initWithString: [NSString stringWithFormat: @"%@ %@ %s", 107 dateString, levelString, currentMessage->message] ] autorelease];111 dateString, levelString, currentMessage->message] attributes: fAttributes] autorelease]; 108 112 109 113 [[fTextView textStorage] appendAttributedString: messageString]; 110 114 } 111 115 112 tr_freeMessageList(messages); 113 114 [fTextView setFont: [NSFont fontWithName: @"Monaco" size: 10]]; //find a way to set this permanently 116 tr_freeMessageList(messages); 115 117 116 118 if (shouldScroll)
Note: See TracChangeset
for help on using the changeset viewer.