Changeset 1411
- Timestamp:
- 08/02/04 22:36:40 (4 years ago)
- Files:
-
- WiredClient/trunk/WCChat.h (modified) (3 diffs)
- WiredClient/trunk/WCChat.m (modified) (10 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
WiredClient/trunk/WCChat.h
r1383 r1411 1 /* $Id: WCChat.h,v 1.1 8 2004/07/28 08:00:26morris Exp $ */1 /* $Id: WCChat.h,v 1.19 2004/08/02 20:36:40 morris Exp $ */ 2 2 3 3 /* … … 47 47 IBOutlet NSView *_chatView; 48 48 IBOutlet NSTextField *_topicTextField; 49 IBOutlet NSTextField *_ usersTextField;49 IBOutlet NSTextField *_topicNickTextField; 50 50 IBOutlet WCSplitView *_chatSplitView; 51 51 IBOutlet NSScrollView *_chatOutputScrollView; … … 103 103 - (void) update; 104 104 - (void) updateButtons; 105 - (void) updateUserCount;106 105 - (void) showSetTopic; 107 106 - (void) saveChatToURL:(NSURL *)url; WiredClient/trunk/WCChat.m
r1398 r1411 1 /* $Id: WCChat.m,v 1.5 5 2004/07/30 12:43:40 morris Exp $ */1 /* $Id: WCChat.m,v 1.56 2004/08/02 20:36:40 morris Exp $ */ 2 2 3 3 /* … … 319 319 [_sortedUsers retain]; 320 320 321 // --- update users322 [self updateUserCount];323 324 321 // --- and reload the table 325 322 [_userListTableView reloadData]; … … 421 418 } 422 419 423 // --- update users424 [self updateUserCount];425 426 420 // --- reload the table 427 421 [_userListTableView reloadData]; … … 472 466 _sortedUsers = [_shownUsers keysSortedByValueUsingSelector:@selector(joinTimeSort:)]; 473 467 [_sortedUsers retain]; 474 475 // --- update users476 [self updateUserCount];477 468 478 469 // --- reload the table … … 534 525 } 535 526 536 // --- update users537 [self updateUserCount];538 539 527 // --- reload the table 540 528 [_userListTableView setNeedsDisplay:YES]; … … 621 609 [_sortedUsers retain]; 622 610 623 // --- update users624 [self updateUserCount];625 626 611 // --- reload the table 627 612 [_userListTableView reloadData]; … … 669 654 _sortedUsers = [_shownUsers keysSortedByValueUsingSelector:@selector(joinTimeSort:)]; 670 655 [_sortedUsers retain]; 671 672 // --- update users673 [self updateUserCount];674 656 675 657 // --- reload the table … … 886 868 887 869 - (void)chatShouldShowTopic:(NSNotification *)notification { 888 NSString *argument, *cid, * topic;870 NSString *argument, *cid, *nick, *date, *topic; 889 871 NSArray *fields; 890 872 WCConnection *connection; … … 900 882 fields = [argument componentsSeparatedByString:WCFieldSeparator]; 901 883 cid = [fields objectAtIndex:0]; 902 topic = [fields objectAtIndex:1]; 884 nick = [fields objectAtIndex:1]; 885 date = [fields objectAtIndex:4]; 886 topic = [fields objectAtIndex:5]; 903 887 904 888 if([cid unsignedIntValue] != _cid) 905 889 return; 906 890 907 // --- set t opic891 // --- set text fields 908 892 [_topicTextField setToolTip:topic]; 909 893 [_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]]]; 910 900 } 911 901 … … 1315 1305 1316 1306 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 1326 1307 - (void)showSetTopic { 1327 1308 // --- set topic
