Changeset 4785

Show
Ignore:
Timestamp:
05/22/07 22:43:57 (1 year ago)
Author:
morris
Message:

When reconnecting, reset topic and banner

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • WiredClient/trunk/WCChat.h

    r4481 r4785  
    9191- (id)initChatWithConnection:(WCServerConnection *)connection windowNibName:(NSString *)windowNibName name:(NSString *)name; 
    9292 
     93- (void)serverConnectionServerInfoDidChange:(NSNotification *)notification; 
    9394- (void)serverConnectionLoggedIn:(NSNotification *)notification; 
    9495 
  • WiredClient/trunk/WCChat.m

    r4751 r4785  
    161161                        0x2014, 
    162162                        [_topicDateFormatter stringFromDate:[_topic date]]]]; 
     163        } else { 
     164                [_topicTextField setToolTip:NULL]; 
     165                [_topicTextField setStringValue:@""]; 
     166                [_topicNickTextField setStringValue:@""]; 
    163167        } 
    164168} 
     
    772776- (void)connectionDidClose:(NSNotification *)notification { 
    773777        [self validate]; 
     778} 
     779 
     780 
     781 
     782- (void)serverConnectionServerInfoDidChange:(NSNotification *)notification { 
     783        if([[self connection] isReconnecting]) { 
     784                [_topic release]; 
     785                _topic = NULL; 
     786                 
     787                [self _updateTopic]; 
     788        } 
    774789} 
    775790 
  • WiredClient/trunk/WCPublicChat.m

    r4775 r4785  
    339339- (void)serverConnectionLoggedIn:(NSNotification *)notification { 
    340340        [super serverConnectionLoggedIn:notification]; 
    341  
     341         
    342342        [[self connection] sendCommand:WCWhoCommand withArgument:[NSSWF:@"%u", [self chatID]]]; 
    343343 
     
    362362        [item setToolTip:[[self connection] name]]; 
    363363         
    364         if([[self connection] isReconnecting]) 
     364        if([[self connection] isReconnecting]) { 
     365                [[_toolbarItems objectForKey:@"Banner"] setImage:[NSImage imageNamed:@"Banner"]]; 
     366 
    365367                [self printEvent:[NSSWF:NSLS(@"Re-established connection to %@", @"Disconnected chat message"), [[self connection] name]]]; 
    366 
    367  
     368        } 
     369 
     370        [super serverConnectionServerInfoDidChange:notification]; 
     371
    368372 
    369373