Changeset 3977

Show
Ignore:
Timestamp:
03/27/06 21:39:15 (2 years ago)
Author:
morris
Message:

Need more control over when templates are loaded

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • WiredClient/trunk/WCAccounts.m

    r3974 r3977  
    278278 
    279279- (void)serverConnectionLoggedIn:(NSNotification *)notification { 
     280        [self windowTemplate]; 
     281 
    280282        [_allAccounts removeAllObjects]; 
    281283        [_shownAccounts removeAllObjects]; 
  • WiredClient/trunk/WCChat.m

    r3974 r3977  
    678678 
    679679- (void)serverConnectionLoggedIn:(NSNotification *)notification { 
     680        [self windowTemplate]; 
     681 
    680682        [_users removeAllObjects]; 
    681683        [_shownUsers removeAllObjects]; 
  • WiredClient/trunk/WCConnectionController.h

    r3974 r3977  
    4040- (id)initWithWindowNibName:(NSString *)windowNibName name:(NSString *)name connection:(WCServerConnection *)connection; 
    4141 
     42- (NSDictionary *)windowTemplate; 
     43 
    4244- (void)setName:(NSString *)name; 
    4345- (NSString *)name; 
  • WiredClient/trunk/WCConnectionController.m

    r3974 r3977  
    254254                           name:NSWindowWillCloseNotification 
    255255                         object:[self window]]; 
    256                           
    257         [self _loadWindowTemplate]; 
     256
     257 
     258 
     259 
     260- (NSDictionary *)windowTemplate { 
     261        if(!_windowTemplate) 
     262                [self _loadWindowTemplate]; 
     263         
     264        return _windowTemplate; 
    258265} 
    259266 
  • WiredClient/trunk/WCConsole.m

    r3974 r3977  
    166166 
    167167 
     168- (void)serverConnectionLoggedIn:(NSNotification *)notification { 
     169        [self windowTemplate]; 
     170} 
     171 
     172 
     173 
    168174- (void)serverConnectionServerInfoDidChange:(NSNotification *)notification { 
    169175        [[self window] setTitle:[[self connection] name] withSubtitle:[self name]]; 
  • WiredClient/trunk/WCFiles.m

    r3974 r3977  
    8787         
    8888        [self window]; 
     89        [self windowTemplate]; 
    8990         
    9091        [self _changeDirectory:[self _currentPath]]; 
  • WiredClient/trunk/WCMessages.m

    r3974 r3977  
    534534 
    535535- (void)serverConnectionLoggedIn:(NSNotification *)notification { 
     536        [self windowTemplate]; 
     537 
    536538        [self _validate]; 
    537539} 
  • WiredClient/trunk/WCNews.m

    r3974 r3977  
    206206 
    207207- (void)serverConnectionLoggedIn:(NSNotification *)notification { 
     208        [self windowTemplate]; 
     209 
    208210        [[_news mutableString] setString:@""]; 
    209211 
  • WiredClient/trunk/WCPublicChat.m

    r3974 r3977  
    249249 
    250250- (void)windowTemplateShouldSave:(NSMutableDictionary *)windowTemplate { 
    251         [windowTemplate setObject:[[self window] propertiesDictionaryWithoutVisibility] forKey:@"WCChatWindow"]; 
     251        [windowTemplate setObject:[[self window] propertiesDictionary] forKey:@"WCChatWindow"]; 
    252252         
    253253        [super windowTemplateShouldSave:windowTemplate]; 
     
    331331 
    332332- (void)serverConnectionLoggedIn:(NSNotification *)notification { 
     333        [super serverConnectionLoggedIn:notification]; 
     334 
    333335        [self showWindow:self]; 
    334          
    335         [super serverConnectionLoggedIn:notification]; 
    336336} 
    337337 
  • WiredClient/trunk/WCSearch.m

    r3974 r3977  
    296296 
    297297- (void)serverConnectionLoggedIn:(NSNotification *)notification { 
     298        [self windowTemplate]; 
     299 
    298300        [self _validate]; 
    299301} 
  • WiredClient/trunk/WCServerConnection.m

    r3974 r3977  
    157157                _cache                  = [[WCCache alloc] initWithCapacity:100]; 
    158158 
    159                 _chat                   = [[WCPublicChat publicChatWithConnection:self] retain]; 
    160  
    161159#if defined(DEBUG) || defined(TEST) 
    162160                _console                = [[WCConsole consoleWithConnection:self] retain]; 
     
    169167                _serverInfo             = [[WCServerInfo serverInfoWithConnection:self] retain]; 
    170168                _transfers              = [[WCTransfers transfersWithConnection:self] retain]; 
     169 
     170                _chat                   = [[WCPublicChat publicChatWithConnection:self] retain]; 
    171171        } 
    172172 
  • WiredClient/trunk/WCServerInfo.m

    r3974 r3977  
    204204 
    205205 
     206- (void)serverConnectionLoggedIn:(NSNotification *)notification { 
     207        [self windowTemplate]; 
     208} 
     209 
     210 
     211 
    206212- (void)serverConnectionReceivedServerInfo:(NSNotification *)notification { 
    207213        [[self window] setTitle:[NSSWF: 
  • WiredClient/trunk/WCTransfers.m

    r3974 r3977  
    10961096 
    10971097 
    1098 - (void)serverConnectionServerInfoDidChange:(NSNotification *)notification { 
    1099         [[self window] setTitle:[[self connection] name] withSubtitle:[self name]]; 
    1100 } 
    1101  
    1102  
    1103  
    11041098- (void)serverConnectionLoggedIn:(NSNotification *)notification { 
    11051099        NSEnumerator            *enumerator; 
    11061100        WCTransfer                      *transfer; 
    11071101 
    1108         if(![_removeButton isEnabled]) 
    1109                 return; 
     1102        [self windowTemplate]; 
    11101103 
    11111104        enumerator = [_transfers objectEnumerator]; 
    1112  
     1105         
    11131106        while((transfer = [enumerator nextObject])) { 
    11141107                if([transfer state] == WCTransferListing || [transfer state] == WCTransferRunning) 
    11151108                        [transfer setState:WCTransferStopping]; 
    11161109        } 
    1117  
     1110         
    11181111        [_transfersTableView setNeedsDisplay:YES]; 
    11191112        [_transfersTableView reloadData]; 
    1120          
     1113                
    11211114        [self _validate]; 
     1115} 
     1116 
     1117 
     1118 
     1119- (void)serverConnectionServerInfoDidChange:(NSNotification *)notification { 
     1120        [[self window] setTitle:[[self connection] name] withSubtitle:[self name]]; 
    11221121} 
    11231122