Changeset 1411

Show
Ignore:
Timestamp:
08/02/04 22:36:40 (4 years ago)
Author:
morris
Message:

add topic nick field

remove users field

Files:

Legend:

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

    r1383 r1411  
    1 /* $Id: WCChat.h,v 1.18 2004/07/28 08:00:26 morris Exp $ */ 
     1/* $Id: WCChat.h,v 1.19 2004/08/02 20:36:40 morris Exp $ */ 
    22 
    33/* 
     
    4747        IBOutlet NSView                                 *_chatView; 
    4848        IBOutlet NSTextField                    *_topicTextField; 
    49         IBOutlet NSTextField                    *_usersTextField; 
     49        IBOutlet NSTextField                    *_topicNickTextField; 
    5050        IBOutlet WCSplitView                    *_chatSplitView; 
    5151        IBOutlet NSScrollView                   *_chatOutputScrollView; 
     
    103103- (void)                                                        update; 
    104104- (void)                                                        updateButtons; 
    105 - (void)                                                        updateUserCount; 
    106105- (void)                                                        showSetTopic; 
    107106- (void)                                                        saveChatToURL:(NSURL *)url; 
  • WiredClient/trunk/WCChat.m

    r1398 r1411  
    1 /* $Id: WCChat.m,v 1.55 2004/07/30 12:43:40 morris Exp $ */ 
     1/* $Id: WCChat.m,v 1.56 2004/08/02 20:36:40 morris Exp $ */ 
    22 
    33/* 
     
    319319        [_sortedUsers retain]; 
    320320 
    321         // --- update users 
    322         [self updateUserCount]; 
    323  
    324321        // --- and reload the table 
    325322        [_userListTableView reloadData]; 
     
    421418        } 
    422419 
    423         // --- update users 
    424         [self updateUserCount]; 
    425  
    426420        // --- reload the table 
    427421        [_userListTableView reloadData]; 
     
    472466        _sortedUsers = [_shownUsers keysSortedByValueUsingSelector:@selector(joinTimeSort:)]; 
    473467        [_sortedUsers retain]; 
    474  
    475         // --- update users 
    476         [self updateUserCount]; 
    477468 
    478469        // --- reload the table 
     
    534525        } 
    535526 
    536         // --- update users 
    537         [self updateUserCount]; 
    538  
    539527        // --- reload the table 
    540528        [_userListTableView setNeedsDisplay:YES]; 
     
    621609        [_sortedUsers retain]; 
    622610 
    623         // --- update users 
    624         [self updateUserCount]; 
    625  
    626611        // --- reload the table 
    627612        [_userListTableView reloadData]; 
     
    669654        _sortedUsers = [_shownUsers keysSortedByValueUsingSelector:@selector(joinTimeSort:)]; 
    670655        [_sortedUsers retain]; 
    671  
    672         // --- update users 
    673         [self updateUserCount]; 
    674656 
    675657        // --- reload the table 
     
    886868 
    887869- (void)chatShouldShowTopic:(NSNotification *)notification { 
    888         NSString                *argument, *cid, *topic; 
     870        NSString                *argument, *cid, *nick, *date, *topic; 
    889871        NSArray                 *fields; 
    890872        WCConnection    *connection; 
     
    900882        fields          = [argument componentsSeparatedByString:WCFieldSeparator]; 
    901883        cid                     = [fields objectAtIndex:0]; 
    902         topic           = [fields objectAtIndex:1]; 
     884        nick            = [fields objectAtIndex:1]; 
     885        date            = [fields objectAtIndex:4]; 
     886        topic           = [fields objectAtIndex:5]; 
    903887         
    904888        if([cid unsignedIntValue] != _cid) 
    905889                return; 
    906890         
    907         // --- set topic 
     891        // --- set text fields 
    908892        [_topicTextField setToolTip:topic]; 
    909893        [_topicTextField setStringValue:topic]; 
     894        [_topicNickTextField setStringValue:[NSString stringWithFormat: 
     895                NSLocalizedString(@"%@ %C %@", @"Chat topic set by (nick, time)"), 
     896                nick, 
     897                0x2014, 
     898                [[NSDate dateWithISO8601String:date] 
     899                        commonDateStringWithRelative:YES capitalized:YES seconds:NO]]]; 
    910900} 
    911901 
     
    13151305 
    13161306 
    1317 - (void)updateUserCount { 
    1318         [_usersTextField setStringValue:[NSString stringWithFormat: 
    1319                 NSLocalizedString(@"%u online, %u active", @"User list status"), 
    1320                 [self numberOfUsers], 
    1321                 [self numberOfActiveUsers]]]; 
    1322 } 
    1323  
    1324  
    1325  
    13261307- (void)showSetTopic { 
    13271308        // --- set topic