Changeset 4315


Ignore:
Timestamp:
Dec 24, 2007, 4:18:09 PM (15 years ago)
Author:
livings124
Message:

set up message log in tr_initFull

Location:
trunk/macosx
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/macosx/Controller.m

    r4312 r4315  
    204204                        FALSE, /* reset in prefs */
    205205                        -1, /* reset in prefs */
    206                         [fDefaults integerForKey: @"PeersGlobal"]);
     206                        [fDefaults integerForKey: @"PeersGlobal"],
     207                        [fDefaults integerForKey: @"MessageLevel"],
     208                        YES);
    207209       
    208210        [NSApp setDelegate: self];
  • trunk/macosx/MessageWindowController.m

    r4100 r4315  
    4545- (id) init
    4646{
    47     if ((self = [super initWithWindowNibName: @"MessageWindow"]))
    48     {
    49         fMessages = [[NSMutableArray alloc] init];
    50        
    51         fTimer = [NSTimer scheduledTimerWithTimeInterval: UPDATE_SECONDS target: self
    52                     selector: @selector(updateLog:) userInfo: nil repeats: YES];
    53        
    54         tr_setMessageLevel([[NSUserDefaults standardUserDefaults] integerForKey: @"MessageLevel"]);
    55         tr_setMessageQueuing(1);
    56     }
    57     return self;
     47    return [super initWithWindowNibName: @"MessageWindow"];
    5848}
    5949
     
    6858}
    6959
     60#warning don't update when the window is closed
    7061- (void) awakeFromNib
    7162{
     63    fMessages = [[NSMutableArray alloc] init];
     64       
     65    fTimer = [NSTimer scheduledTimerWithTimeInterval: UPDATE_SECONDS target: self
     66                selector: @selector(updateLog:) userInfo: nil repeats: YES];
     67   
    7268    NSWindow * window = [self window];
    7369    [window setFrameAutosaveName: @"MessageWindowFrame"];
     
    7975    //initially sort peer table by IP
    8076    if ([[fMessageTable sortDescriptors] count] == 0)
    81     {
    8277        [fMessageTable setSortDescriptors: [NSArray arrayWithObject: [[fMessageTable tableColumnWithIdentifier: @"Date"]
    8378                                            sortDescriptorPrototype]]];
    84         [self updateLog: nil];
    85     }
    8679   
    8780    fErrorImage = [NSImage imageNamed: @"RedDot.png"];
     
    107100            [fLevelButton selectItemAtIndex: LEVEL_DEBUG];
    108101    }
     102   
     103    [self updateLog: nil];
    109104}
    110105
Note: See TracChangeset for help on using the changeset viewer.