Changeset 4751
- Timestamp:
- 05/11/07 20:36:03 (2 years ago)
- Files:
-
- WiredClient/trunk/English.lproj/ReleaseNotes.rtf (modified) (1 diff)
- WiredClient/trunk/Growl (added)
- WiredClient/trunk/Growl/Growl.framework (added)
- WiredClient/trunk/Growl/Growl.framework/Growl (added)
- WiredClient/trunk/Growl/Growl.framework/Headers (added)
- WiredClient/trunk/Growl/Growl.framework/Resources (added)
- WiredClient/trunk/Growl/Growl.framework/Versions (added)
- WiredClient/trunk/Growl/Growl.framework/Versions/A (added)
- WiredClient/trunk/Growl/Growl.framework/Versions/A/Growl (added)
- WiredClient/trunk/Growl/Growl.framework/Versions/A/Headers (added)
- WiredClient/trunk/Growl/Growl.framework/Versions/A/Headers/Growl.h (added)
- WiredClient/trunk/Growl/Growl.framework/Versions/A/Headers/GrowlApplicationBridge-Carbon.h (added)
- WiredClient/trunk/Growl/Growl.framework/Versions/A/Headers/GrowlApplicationBridge.h (added)
- WiredClient/trunk/Growl/Growl.framework/Versions/A/Headers/GrowlDefines.h (added)
- WiredClient/trunk/Growl/Growl.framework/Versions/A/Resources (added)
- WiredClient/trunk/Growl/Growl.framework/Versions/A/Resources/Info.plist (added)
- WiredClient/trunk/Growl/Growl.framework/Versions/Current (added)
- WiredClient/trunk/NSNotificationCenter-WCAdditions.h (modified) (1 diff)
- WiredClient/trunk/NSNotificationCenter-WCAdditions.m (modified) (2 diffs)
- WiredClient/trunk/WCApplicationController.h (modified) (1 diff)
- WiredClient/trunk/WCApplicationController.m (modified) (6 diffs)
- WiredClient/trunk/WCCache.h (modified) (2 diffs)
- WiredClient/trunk/WCCache.m (modified) (3 diffs)
- WiredClient/trunk/WCChat.m (modified) (9 diffs)
- WiredClient/trunk/WCDock.h (modified) (1 diff)
- WiredClient/trunk/WCDock.m (modified) (7 diffs)
- WiredClient/trunk/WCMessages.m (modified) (2 diffs)
- WiredClient/trunk/WCNews.m (modified) (1 diff)
- WiredClient/trunk/WCPreferences.m (modified) (2 diffs)
- WiredClient/trunk/WCPublicChat.m (modified) (1 diff)
- WiredClient/trunk/WCServerConnection.h (modified) (2 diffs)
- WiredClient/trunk/WCServerConnection.m (modified) (6 diffs)
- WiredClient/trunk/WCSettings.h (modified) (1 diff)
- WiredClient/trunk/WCSettings.m (modified) (1 diff)
- WiredClient/trunk/WCTrackers.m (modified) (2 diffs)
- WiredClient/trunk/WCTransfer.h (modified) (2 diffs)
- WiredClient/trunk/WCTransfer.m (modified) (2 diffs)
- WiredClient/trunk/WCTransfers.m (modified) (5 diffs)
- WiredClient/trunk/WiredClient.xcodeproj/project.pbxproj (modified) (9 diffs)
- WiredClient/trunk/prefix.pch (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
WiredClient/trunk/English.lproj/ReleaseNotes.rtf
r4463 r4751 30 30 \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural 31 31 32 \f1\b0 \cf0 - Fix a problem with chat window being hidden after connect\ 32 \f1\b0 \cf0 - Add Growl support\ 33 - Fix a problem with chat window being hidden after connect\ 33 34 - Fix a problem with transfer queueing when adding multiple transfers at the same time\ 34 35 - Don't scroll chat to bottom after changing preferences\ WiredClient/trunk/NSNotificationCenter-WCAdditions.h
r4439 r4751 26 26 * POSSIBILITY OF SUCH DAMAGE. 27 27 */ 28 28 /* 29 29 @interface NSNotificationCenter(WCNotificationCenterAdditions) 30 30 31 31 - (void)postNotificationName:(NSString *)name eventTag:(int)tag; 32 - (void)postNotificationName:(NSString *)name eventTag:(int)tag eventInfo:(id)eventInfo; 32 33 - (void)mainThreadPostNotificationName:(NSString *)name eventTag:(int)tag; 34 - (void)mainThreadPostNotificationName:(NSString *)name eventTag:(int)tag eventInfo:(id)eventInfo; 33 35 34 36 @end 37 38 39 @interface NSNotification(WCNotificationAdditions) 40 41 - (id)eventInfo; 42 43 @end 44 */ WiredClient/trunk/NSNotificationCenter-WCAdditions.m
r4439 r4751 26 26 * POSSIBILITY OF SUCH DAMAGE. 27 27 */ 28 /* 29 #import "NSNotificationCenter-WCAdditions.h" 28 30 29 #import "NSNotificationCenter-WCAdditions.h" 31 #define WCNSNotificationEventInfoKey @"WCNSNotificationEventInfoKey" 32 30 33 31 34 @implementation NSNotificationCenter(WCNotificationCenterAdditions) 32 35 33 36 - (void)postNotificationName:(NSString *)name eventTag:(int)tag { 34 [self postNotificationName:name object:[WCSettings eventForTag:tag]]; 37 // [self postNotificationName:name eventTag:tag eventInfo:NULL]; 38 } 39 40 41 42 - (void)postNotificationName:(NSString *)name eventTag:(int)tag eventInfo:(id)info { 43 // [self postNotificationName:name 44 // object:[WCSettings eventForTag:tag] 45 // userInfo:[NSDictionary dictionaryWithObject:info forKey:WCNSNotificationEventInfoKey]]; 35 46 } 36 47 … … 38 49 39 50 - (void)mainThreadPostNotificationName:(NSString *)name eventTag:(int)tag { 40 [self mainThreadPostNotificationName:name object:[WCSettings eventForTag:tag]]; 51 // [self mainThreadPostNotificationName:name eventTag:tag eventInfo:NULL]; 52 } 53 54 55 56 - (void)mainThreadPostNotificationName:(NSString *)name eventTag:(int)tag eventInfo:(id)info { 57 [self mainThreadPostNotificationName:name 58 object:[WCSettings eventForTag:tag] 59 userInfo:[NSDictionary dictionaryWithObject:info forKey:WCNSNotificationEventInfoKey]]; 41 60 } 42 61 43 62 @end 63 64 65 66 @implementation NSNotification(WCNotificationAdditions) 67 68 - (id)eventInfo { 69 return [[self userInfo] objectForKey:WCNSNotificationEventInfoKey]; 70 } 71 72 @end 73 */ WiredClient/trunk/WCApplicationController.h
r4439 r4751 27 27 */ 28 28 29 @interface WCApplicationController : WIObject {29 @interface WCApplicationController : WIObject <GrowlApplicationBridgeDelegate> { 30 30 IBOutlet NSMenu *_bookmarksMenu; 31 31 IBOutlet NSMenu *_insertSmileyMenu; WiredClient/trunk/WCApplicationController.m
r4481 r4751 27 27 */ 28 28 29 #import "NSNotificationCenter-WCAdditions.h" 29 30 #import "WCAboutWindow.h" 30 31 #import "WCApplicationController.h" … … 39 40 #import "WCStats.h" 40 41 #import "WCTrackers.h" 42 #import "WCUser.h" 43 44 #define WCGrowlServerConnected @"Connected to server" 45 #define WCGrowlServerDisconnected @"Disconnected from server" 46 #define WCGrowlError @"Error" 47 #define WCGrowlUserJoined @"User joined" 48 #define WCGrowlUserChangedNick @"User changed nick" 49 #define WCGrowlUserChangedStatus @"User changed status" 50 #define WCGrowlUserJoined @"User joined" 51 #define WCGrowlUserLeft @"User left" 52 #define WCGrowlChatReceived @"Chat received" 53 #define WCGrowlHighlightedChatReceived @"Highlighted chat received" 54 #define WCGrowlMessageReceived @"Message received" 55 #define WCGrowlNewsPosted @"News posted" 56 #define WCGrowlBroadcastReceived @"Broadcast received" 57 #define WCGrowlTransferStarted @"Transfer started" 58 #define WCGrowlTransferFinished @"Transfer finished" 59 41 60 42 61 static NSInteger _WCCompareSmileyLength(id, id, void *); … … 96 115 NSLog(@"*** -[%@ %@]: could not find image \"%@\"", [self class], NSStringFromSelector(_cmd), file); 97 116 } 98 99 117 100 118 array = [NSMutableArray arrayWithObjects: … … 353 371 354 372 [WIDateFormatter setDefaultFormatterBehavior:NSDateFormatterBehavior10_4]; 373 374 [GrowlApplicationBridge setGrowlDelegate:self]; 355 375 356 376 (void) [WCDock dock]; … … 454 474 - (void)serverConnectionTriggeredEvent:(NSNotification *)notification { 455 475 NSDictionary *event; 476 WCServerConnection *connection; 477 NSNumber *clickContext; 478 id info1, info2; 456 479 457 480 event = [notification object]; 481 connection = [[notification userInfo] objectForKey:WCServerConnectionEventConnectionKey]; 482 info1 = [[notification userInfo] objectForKey:WCServerConnectionEventInfo1Key]; 483 info2 = [[notification userInfo] objectForKey:WCServerConnectionEventInfo2Key]; 458 484 459 485 if([event boolForKey:WCEventsPlaySound]) … … 462 488 if([event boolForKey:WCEventsBounceInDock]) 463 489 [NSApp requestUserAttention:NSInformationalRequest]; 490 491 clickContext = [NSNumber numberWithUnsignedInteger:[[WCDock dock] indexOfConnection:connection]]; 492 493 switch([event intForKey:WCEventsEvent]) { 494 case WCEventsServerConnected: 495 [GrowlApplicationBridge notifyWithTitle:NSLS(@"Connected", @"Growl event connected title") 496 description:[NSSWF:NSLS(@"Connected to %@", @"Growl event connected description (server)"), 497 [connection name]] 498 notificationName:WCGrowlServerConnected 499 iconData:NULL 500 priority:0.0 501 isSticky:NO 502 clickContext:NULL]; 503 break; 504 505 case WCEventsServerDisconnected: 506 [GrowlApplicationBridge notifyWithTitle:NSLS(@"Disconnected", @"Growl event disconnected title") 507 description:[NSSWF:NSLS(@"Disconnected from %@", @"Growl event disconnected description (server)"), 508 [connection name]] 509 notificationName:WCGrowlServerDisconnected 510 iconData:NULL 511 priority:0.0 512 isSticky:NO 513 clickContext:clickContext]; 514 break; 515 516 case WCEventsError: 517 [GrowlApplicationBridge notifyWithTitle:[info1 localizedDescription] 518 description:[info1 localizedFailureReason] 519 notificationName:WCGrowlError 520 iconData:NULL 521 priority:0.0 522 isSticky:NO 523 clickContext:clickContext]; 524 break; 525 526 case WCEventsUserJoined: 527 [GrowlApplicationBridge notifyWithTitle:NSLS(@"User joined", @"Growl event user joined title") 528 description:[info1 nick] 529 notificationName:WCGrowlUserJoined 530 iconData:[[info1 icon] TIFFRepresentation] 531 priority:0.0 532 isSticky:NO 533 clickContext:clickContext]; 534 break; 535 536 case WCEventsUserChangedNick: 537 [GrowlApplicationBridge notifyWithTitle:NSLS(@"User changed nick", @"Growl event user changed nick title") 538 description:[NSSWF:NSLS(@"%@ is now known as %@", @"Growl event user changed nick description (oldnick, newnick)"), 539 [info1 nick], info2] 540 notificationName:WCGrowlUserChangedNick 541 iconData:[[info1 icon] TIFFRepresentation] 542 priority:0.0 543 isSticky:NO 544 clickContext:clickContext]; 545 break; 546 547 case WCEventsUserChangedStatus: 548 [GrowlApplicationBridge notifyWithTitle:NSLS(@"User changed status", @"Growl event user changed status title") 549 description:[NSSWF:NSLS(@"%@ changed status to %@", @"Growl event user changed status description (nick, status)"), 550 [info1 nick], info2] 551 notificationName:WCGrowlUserChangedStatus 552 iconData:[[info1 icon] TIFFRepresentation] 553 priority:0.0 554 isSticky:NO 555 clickContext:clickContext]; 556 break; 557 558 case WCEventsUserLeft: 559 [GrowlApplicationBridge notifyWithTitle:NSLS(@"User left", @"Growl event user left title") 560 description:[info1 nick] 561 notificationName:WCGrowlUserLeft 562 iconData:[[info1 icon] TIFFRepresentation] 563 priority:0.0 564 isSticky:NO 565 clickContext:clickContext]; 566 break; 567 568 case WCEventsChatReceived: 569 [GrowlApplicationBridge notifyWithTitle:NSLS(@"Chat received", @"Growl event chat received title") 570 description:[NSSWF:@"%@: %@", [info1 nick], info2] 571 notificationName:WCGrowlChatReceived 572 iconData:[[info1 icon] TIFFRepresentation] 573 priority:0.0 574 isSticky:NO 575 clickContext:clickContext]; 576 break; 577 578 case WCEventsHighlightedChatReceived: 579 [GrowlApplicationBridge notifyWithTitle:NSLS(@"Chat received", @"Growl event chat received title") 580 description:[NSSWF:@"%@: %@", [info1 nick], info2] 581 notificationName:WCGrowlHighlightedChatReceived 582 iconData:[[info1 icon] TIFFRepresentation] 583 priority:0.0 584 isSticky:NO 585 clickContext:clickContext]; 586 break; 587 588 case WCEventsMessageReceived: 589 [GrowlApplicationBridge notifyWithTitle:NSLS(@"Message received", @"Growl event message received title") 590 description:[NSSWF:@"%@: %@", [[(WCMessage *) info1 user] nick], [info1 message]] 591 notificationName:WCGrowlMessageReceived 592 iconData:[[[(WCMessage *) info1 user] icon] TIFFRepresentation] 593 priority:0.0 594 isSticky:NO 595 clickContext:clickContext]; 596 break; 597 598 case WCEventsNewsPosted: 599 [GrowlApplicationBridge notifyWithTitle:NSLS(@"News posted", @"Growl event news posted title") 600 description:[NSSWF:@"%@: %@", info1, info2] 601 notificationName:WCGrowlNewsPosted 602 iconData:NULL 603 priority:0.0 604 isSticky:NO 605 clickContext:clickContext]; 606 break; 607 608 case WCEventsBroadcastReceived: 609 [GrowlApplicationBridge notifyWithTitle:NSLS(@"Broadcast received", @"Growl event broadcast received title") 610 description:[NSSWF:@"%@: %@", [[(WCMessage *) info1 user] nick], [info1 message]] 611 notificationName:WCGrowlBroadcastReceived 612 iconData:[[[(WCMessage *) info1 user] icon] TIFFRepresentation] 613 priority:0.0 614 isSticky:NO 615 clickContext:clickContext]; 616 break; 617 618 case WCEventsTransferStarted: 619 [GrowlApplicationBridge notifyWithTitle:NSLS(@"Transfer started", @"Growl event transfer started title") 620 description:[info1 name] 621 notificationName:WCGrowlTransferStarted 622 iconData:[[info1 icon] TIFFRepresentation] 623 priority:0.0 624 isSticky:NO 625 clickContext:clickContext]; 626 break; 627 628 case WCEventsTransferFinished: 629 [GrowlApplicationBridge notifyWithTitle:NSLS(@"Transfer finished", @"Growl event transfer started title") 630 description:[info1 name] 631 notificationName:WCGrowlTransferFinished 632 iconData:[[info1 icon] TIFFRepresentation] 633 priority:0.0 634 isSticky:NO 635 clickContext:clickContext]; 636 break; 637 } 638 } 639 640 641 642 #pragma mark - 643 644 - (NSDictionary *)registrationDictionaryForGrowl { 645 return [NSDictionary dictionaryWithObjectsAndKeys: 646 [NSArray arrayWithObjects: 647 WCGrowlServerConnected, 648 WCGrowlServerDisconnected, 649 WCGrowlError, 650 WCGrowlUserJoined, 651 WCGrowlUserChangedNick, 652 WCGrowlUserChangedStatus, 653 WCGrowlUserLeft, 654 WCGrowlChatReceived, 655 WCGrowlHighlightedChatReceived, 656 WCGrowlMessageReceived, 657 WCGrowlNewsPosted, 658 WCGrowlBroadcastReceived, 659 WCGrowlTransferStarted, 660 WCGrowlTransferFinished, 661 NULL], 662 GROWL_NOTIFICATIONS_ALL, 663 [NSArray arrayWithObjects: 664 WCGrowlServerDisconnected, 665 WCGrowlHighlightedChatReceived, 666 WCGrowlMessageReceived, 667 WCGrowlNewsPosted, 668 WCGrowlBroadcastReceived, 669 WCGrowlTransferFinished, 670 NULL], 671 GROWL_NOTIFICATIONS_DEFAULT, 672 NULL]; 673 } 674 675 676 677 - (void)growlNotificationWasClicked:(id)clickContext { 678 WCServerConnection *connection; 679 680 [NSApp activateIgnoringOtherApps:YES]; 681 682 connection = [[WCDock dock] connectionAtIndex:[clickContext unsignedIntegerValue]]; 683 684 [[WCDock dock] openConnection:connection]; 464 685 } 465 686 WiredClient/trunk/WCCache.h
r4439 r4751 31 31 NSMutableDictionary *_files; 32 32 NSMutableDictionary *_fileIcons; 33 NSMutableDictionary *_transferIcons;34 33 NSLock *_lock; 35 34 } … … 47 46 - (NSImage *)fileIconForExtension:(NSString *)extension; 48 47 49 - (void)setTransferIcon:(NSImage *)icon forExtension:(NSString *)extension;50 - (NSImage *)transferIconForExtension:(NSString *)extension;51 52 48 @end WiredClient/trunk/WCCache.m
r4439 r4751 51 51 _files = [[NSMutableDictionary alloc] initWithCapacity:_capacity]; 52 52 _fileIcons = [[NSMutableDictionary alloc] initWithCapacity:_capacity]; 53 _transferIcons = [[NSMutableDictionary alloc] initWithCapacity:_capacity];54 53 55 54 return self; … … 63 62 [_files release]; 64 63 [_fileIcons release]; 65 [_transferIcons release];66 64 67 65 [super dealloc]; … … 137 135 } 138 136 139 140 141 #pragma mark -142 143 - (void)setTransferIcon:(NSImage *)icon forExtension:(NSString *)extension {144 [_lock lock];145 146 if([_transferIcons count] > _capacity)147 [_transferIcons removeObjectForKey:[[_transferIcons allKeys] objectAtIndex:0]];148 149 [_transferIcons setObject:icon forKey:extension];150 151 [_lock unlock];152 }153 154 155 156 - (NSImage *)transferIconForExtension:(NSString *)extension {157 NSImage *image;158 159 [_lock lock];160 image = [_transferIcons objectForKey:extension];161 [_lock unlock];162 163 return image;164 }165 166 137 @end WiredClient/trunk/WCChat.m
r4481 r4751 79 79 - (NSString *)_stringByDecomposingAttributedString:(NSAttributedString *)attributedString; 80 80 81 - (BOOL)_isHighlightedChat:(NSString *)chat; 82 81 83 @end 82 84 … … 253 255 - (void)_printUserChange:(WCUser *)user status:(NSString *)status { 254 256 [self printEvent:[NSSWF: 255 NSLS(@"%@ changed status to %@", @"Client renamemessage (nick, status)"),257 NSLS(@"%@ changed status to %@", @"Client status changed message (nick, status)"), 256 258 [user nick], 257 259 status]]; … … 571 573 } 572 574 575 576 577 #pragma mark - 578 579 - (BOOL)_isHighlightedChat:(NSString *)chat { 580 NSEnumerator *enumerator; 581 NSDictionary *highlight; 582 583 enumerator = [[WCSettings objectForKey:WCHighlights] objectEnumerator]; 584 585 while((highlight = [enumerator nextObject])) { 586 if([chat rangeOfString:[highlight objectForKey:WCHighlightsPattern] options:NSCaseInsensitiveSearch].location != NSNotFound) 587 return YES; 588 } 589 590 return NO; 591 } 592 573 593 @end 574 594 … … 856 876 [[self connection] postNotificationName:WCChatUsersDidChange object:[self connection]]; 857 877 858 [[self connection] postNotificationName:WCServerConnectionTriggeredEvent eventTag:WCEventsUserJoined];878 [[self connection] triggerEvent:WCEventsUserJoined info1:user]; 859 879 } 860 880 … … 881 901 [self _printUserLeave:user]; 882 902 903 [[self connection] triggerEvent:WCEventsUserLeft info1:user]; 904 883 905 [_shownUsers removeObject:user]; 884 906 [_users removeObjectForKey:[NSNumber numberWithUnsignedInt:[user userID]]]; 885 907 886 908 [[self connection] postNotificationName:WCChatUsersDidChange object:[self connection]]; 887 888 [[self connection] postNotificationName:WCServerConnectionTriggeredEvent eventTag:WCEventsUserLeft];889 909 } 890 910 … … 912 932 [self _printUserChange:user nick:nick]; 913 933 914 [[self connection] postNotificationName:WCServerConnectionTriggeredEvent eventTag:WCEventsUserChangedNick];934 [[self connection] triggerEvent:WCEventsUserChangedNick info1:user info2:nick]; 915 935 } 916 936 … … 919 939 [self _printUserChange:user status:status]; 920 940 921 [[self connection] postNotificationName:WCServerConnectionTriggeredEvent eventTag:WCEventsUserChangedStatus]; 922 } 923 941 [[self connection] triggerEvent:WCEventsUserChangedStatus info1:user info2:status]; 942 } 943 944 [user setNick:nick]; 945 [user setStatus:status]; 924 946 [user setIdle:[idle intValue]]; 925 947 [user setAdmin:[admin intValue]]; 926 [user setNick:nick];927 [user setStatus:status];928 948 929 949 [_userListTableView setNeedsDisplay:YES]; … … 1032 1052 1033 1053 [self _printChat:chat by:user]; 1034 1035 [[self connection] postNotificationName:WCServerConnectionTriggeredEvent eventTag:WCEventsChatReceived]; 1054 1055 if([self _isHighlightedChat:chat]) 1056 [[self connection] triggerEvent:WCEventsHighlightedChatReceived info1:user info2:chat]; 1057 else 1058 [[self connection] triggerEvent:WCEventsChatReceived info1:user info2:chat]; 1036 1059 } 1037 1060 … … 1061 1084 [self _printActionChat:chat by:user]; 1062 1085 1063 [[self connection] postNotificationName:WCServerConnectionTriggeredEvent eventTag:WCEventsChatReceived]; 1086 if([self _isHighlightedChat:chat]) 1087 [[self connection] triggerEvent:WCEventsHighlightedChatReceived info1:user info2:chat]; 1088 else 1089 [[self connection] triggerEvent:WCEventsChatReceived info1:user info2:chat]; 1064 1090 } 1065 1091 WiredClient/trunk/WCDock.h
r4460 r4751 56 56 - (void)openConnection:(WCServerConnection *)connection; 57 57 - (WCServerConnection *)connectionWithURL:(WIURL *)url; 58 - (unsigned int)connectedConnections; 58 - (WCServerConnection *)connectionAtIndex:(NSUInteger)index; 59 - (NSUInteger)indexOfConnection:(WCServerConnection *)connection; 60 - (NSUInteger)connectedConnections; 59 61 60 62 - (IBAction)open:(id)sender; WiredClient/trunk/WCDock.m
r4460 r4751 41 41 42 42 - (WCServerConnection *)_selectedConnection; 43 - (WCServerConnection *)_connectionAtIndex:( unsigned int)index;43 - (WCServerConnection *)_connectionAtIndex:(NSUInteger)index; 44 44 45 45 - (void)_openConnection:(WCServerConnection *)connection; … … 101 101 102 102 103 - (WCServerConnection *)_connectionAtIndex:( unsigned int)index {103 - (WCServerConnection *)_connectionAtIndex:(NSUInteger)index { 104 104 if(index < [_shownConnections count]) 105 105 return [_shownConnections objectAtIndex:index]; … … 372 372 373 373 374 - (unsigned int)connectedConnections { 374 - (WCServerConnection *)connectionAtIndex:(NSUInteger)index { 375 return [_shownConnections objectAtIndex:index]; 376 } 377 378 379 380 - (NSUInteger)indexOfConnection:(WCServerConnection *)connection { 381 return [_shownConnections indexOfObject:connection]; 382 } 383 384 385 386 - (NSUInteger)connectedConnections { 375 387 NSEnumerator *enumerator; 376 388 WCServerConnection *connection; 377 unsigned intcount;389 NSUInteger count; 378 390 379 391 enumerator = [_shownConnections objectEnumerator]; … … 456 468 i = [_shownConnections indexOfObject:connection] + 1; 457 469 458 if(( unsigned int) i >= [_shownConnections count])470 if((NSUInteger) i >= [_shownConnections count]) 459 471 i = 0; 460 472 … … 543 555 NSAlert *alert; 544 556 WCServerConnection *connection; 545 unsigned inti, count;557 NSUInteger i, count; 546 558 547 559 alert = [NSAlert alertWithMessageText:NSLS(@"Restore All Layouts To Default?", @"Restore all layouts to default dialog title") … … 569 581 #pragma mark - 570 582 571 - ( int)numberOfRowsInTableView:(NSTableView *)tableView {583 - (NSInteger)numberOfRowsInTableView:(NSTableView *)tableView { 572 584 return [_shownConnections count]; 573 585 } … … 575 587 576 588 577 - (id)tableView:(NSTableView *)tableView objectValueForTableColumn:(NSTableColumn *)tableColumn row:( int)row {589 - (id)tableView:(NSTableView *)tableView objectValueForTableColumn:(NSTableColumn *)tableColumn row:(NSInteger)row { 578 590 WCServerConnection *connection; 579 591 NSImage *image; WiredClient/trunk/WCMessages.m
r4481 r4751 621 621 [[self connection] postNotificationName:WCMessagesDidAddMessage object:message]; 622 622 623 [[self connection] postNotificationName:WCServerConnectionTriggeredEvent eventTag:WCEventsMessageReceived];623 [[self connection] triggerEvent:WCEventsMessageReceived info1:message]; 624 624 } 625 625 … … 658 658 [[self connection] postNotificationName:WCMessagesDidAddMessage object:message]; 659 659 660 [[self connection] postNotificationName:WCServerConnectionTriggeredEvent eventTag:WCEventsBroadcastReceived];660 [[self connection] triggerEvent:WCEventsBroadcastReceived info1:message]; 661 661 } 662 662 WiredClient/trunk/WCNews.m
r4481 r4751 307 307 } 308 308 309 [[self connection] postNotificationName:WCServerConnectionTriggeredEvent eventTag:WCEventsNewsPosted];309 [[self connection] triggerEvent:WCEventsNewsPosted info1:nick info2:message]; 310 310 } 311 311 WiredClient/trunk/WCPreferences.m
r4631 r4751 184 184 [NSNumber numberWithInt:WCEventsUserLeft], 185 185 [NSNumber numberWithInt:WCEventsChatReceived], 186 [NSNumber numberWithInt:WCEventsHighlightedChatReceived], 186 187 [NSNumber numberWithInt:WCEventsMessageReceived], 187 188 [NSNumber numberWithInt:WCEventsNewsPosted], … … 237 238 case WCEventsChatReceived: 238 239 [item setTitle:NSLS(@"Chat Received", @"Event")]; 240 break; 241 242 case WCEventsHighlightedChatReceived: 243 [item setTitle:NSLS(@"Highlighted Chat Received", @"Event")]; 239 244 break;&nbs
