Changeset 3496
- Timestamp:
- 12/28/06 12:13:28 (2 years ago)
- Files:
-
- trunk/Chat Core.exp (modified) (1 diff)
- trunk/Chat Core/MVChatConnection.h (modified) (1 diff)
- trunk/Chat Core/MVChatConnection.m (modified) (1 diff)
- trunk/Controllers/JVChatController.m (modified) (2 diffs)
- trunk/Panels/JVChatRoomPanel.m (modified) (1 diff)
- trunk/Panels/JVDirectChatPanel.m (modified) (3 diffs)
- trunk/Resources/info.colloquy.plist (modified) (1 diff)
- trunk/Resources/notifications.plist (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/Chat Core.exp
r3377 r3496 16 16 _MVChatConnectionNeedCertificatePasswordNotification 17 17 _MVChatConnectionNeedPublicKeyVerificationNotification 18 _MVChatConnectionGotBeepNotification 18 19 _MVChatConnectionGotRawMessageNotification 19 20 _MVChatConnectionGotPrivateMessageNotification trunk/Chat Core/MVChatConnection.h
r3456 r3496 65 65 extern NSString *MVChatConnectionNeedPublicKeyVerificationNotification; 66 66 67 extern NSString *MVChatConnectionGotBeepNotification; 67 68 extern NSString *MVChatConnectionGotRawMessageNotification; 68 69 extern NSString *MVChatConnectionGotPrivateMessageNotification; trunk/Chat Core/MVChatConnection.m
r3484 r3496 26 26 NSString *MVChatConnectionNeedPublicKeyVerificationNotification = @"MVChatConnectionNeedPublicKeyVerificationNotification"; 27 27 28 NSString *MVChatConnectionGotBeepNotification = @"MVChatConnectionGotBeepNotification"; 28 29 NSString *MVChatConnectionGotRawMessageNotification = @"MVChatConnectionGotRawMessageNotification"; 29 30 NSString *MVChatConnectionGotPrivateMessageNotification = @"MVChatConnectionGotPrivateMessageNotification"; trunk/Controllers/JVChatController.m
r3418 r3496 90 90 [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector( _joinedRoom: ) name:MVChatRoomJoinedNotification object:nil]; 91 91 [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector( _invitedToRoom: ) name:MVChatRoomInvitedNotification object:nil]; 92 [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector( _gotBeep: ) name:MVChatConnectionGotBeepNotification object:nil]; 92 93 [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector( _gotPrivateMessage: ) name:MVChatConnectionGotPrivateMessageNotification object:nil]; 93 94 [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector( _gotRoomMessage: ) name:MVChatRoomGotMessageNotification object:nil]; … … 492 493 [context setObject:[NSString stringWithFormat:NSLocalizedString( @"You were invited to %@ by %@.", "bubble message invited to room" ), room, [user nickname]] forKey:@"description"]; 493 494 [[JVNotificationController defaultController] performNotification:@"JVChatRoomInvite" withContextInfo:context]; 495 } 496 497 - (void) _gotBeep:(NSNotification *) notification { 498 NSDictionary *userInfo = [notification userInfo]; 499 MVChatUser *user = [userInfo objectForKey:@"user"]; 500 501 NSMutableDictionary *context = [NSMutableDictionary dictionary]; 502 [context setObject:NSLocalizedString( @"Beep received", "beep bubble title" ) forKey:@"title"]; 503 [context setObject:[NSString stringWithFormat:NSLocalizedString( @"%@ is reclaiming your attention by means of a beep.", "beep bubble text" ), [user nickname]] forKey:@"description"]; 504 [context setObject:[NSImage imageNamed:@"activityNewImportant"] forKey:@"image"]; 505 [context setObject:[[user nickname] stringByAppendingString:@"JVChatBeeped"] forKey:@"coalesceKey"]; 506 [context setObject:self forKey:@"target"]; 507 [context setObject:NSStringFromSelector( @selector( activate: ) ) forKey:@"action"]; 508 [[JVNotificationController defaultController] performNotification:@"JVChatBeeped" withContextInfo:context]; 494 509 } 495 510 trunk/Panels/JVChatRoomPanel.m
r3490 r3496 307 307 else [context setObject:[NSString stringWithFormat:NSLocalizedString( @"%@ has %d messages waiting. \nLast from %@", "new room messages bubble text" ), [self title], [self newMessagesWaiting], [member displayName]] forKey:@"description"]; 308 308 [context setObject:[NSImage imageNamed:@"room"] forKey:@"image"]; 309 [context setObject:[[self windowTitle] stringByAppendingString:@" JVChatRoomActivity"] forKey:@"coalesceKey"];309 [context setObject:[[self windowTitle] stringByAppendingString:@"JVChatRoomActivity"] forKey:@"coalesceKey"]; 310 310 [context setObject:self forKey:@"target"]; 311 311 [context setObject:NSStringFromSelector( @selector( activate: ) ) forKey:@"action"]; trunk/Panels/JVDirectChatPanel.m
r3480 r3496 774 774 else [context setObject:[NSString stringWithFormat:NSLocalizedString( @"One of your highlight words was mentioned by %@.", "private chat mentioned bubble text" ), [self title]] forKey:@"description"]; 775 775 [context setObject:[NSImage imageNamed:@"activityNewImportant"] forKey:@"image"]; 776 [context setObject:[[self windowTitle] stringByAppendingString:@" JVChatMentioned"] forKey:@"coalesceKey"];776 [context setObject:[[self windowTitle] stringByAppendingString:@"JVChatMentioned"] forKey:@"coalesceKey"]; 777 777 [context setObject:self forKey:@"target"]; 778 778 [context setObject:NSStringFromSelector( @selector( activate: ) ) forKey:@"action"]; … … 833 833 [context setObject:[NSString stringWithFormat:NSLocalizedString( @"%@ wrote you a private message.", "first message bubble text" ), [self title]] forKey:@"description"]; 834 834 [context setObject:[NSImage imageNamed:@"messageUser"] forKey:@"image"]; 835 [context setObject:[[self windowTitle] stringByAppendingString:@" JVChatPrivateMessage"] forKey:@"coalesceKey"];835 [context setObject:[[self windowTitle] stringByAppendingString:@"JVChatPrivateMessage"] forKey:@"coalesceKey"]; 836 836 [context setObject:self forKey:@"target"]; 837 837 [context setObject:NSStringFromSelector( @selector( activate: ) ) forKey:@"action"]; … … 843 843 [context setObject:[NSString stringWithFormat:NSLocalizedString( @"You have %d messages waiting from %@.", "new messages bubble text" ), [self newMessagesWaiting], [self title]] forKey:@"description"]; 844 844 [context setObject:[NSImage imageNamed:@"messageUser"] forKey:@"image"]; 845 [context setObject:[[self windowTitle] stringByAppendingString:@" JVChatPrivateMessage"] forKey:@"coalesceKey"];845 [context setObject:[[self windowTitle] stringByAppendingString:@"JVChatPrivateMessage"] forKey:@"coalesceKey"]; 846 846 [context setObject:self forKey:@"target"]; 847 847 [context setObject:NSStringFromSelector( @selector( activate: ) ) forKey:@"action"]; trunk/Resources/info.colloquy.plist
r3260 r3496 186 186 <key>soundPath</key> 187 187 <string>Switch.aiff</string> 188 </dict> 189 <key>JVNotificationSettings JVChatBeeped</key> 190 <dict> 191 <key>bounceIcon</key> 192 <true/> 193 <key>bounceIconUntilFront</key> 194 <true/> 195 <key>playSound</key> 196 <true/> 197 <key>soundPath</key> 198 <string>Bell 1.aiff</string> 199 <key>showBubble</key> 200 <true/> 201 <key>showBubbleOnlyIfBackground</key> 202 <true/> 188 203 </dict> 189 204 <key>JVNotificationSettings JVChatMentioned</key> trunk/Resources/notifications.plist
r2694 r3496 153 153 <dict> 154 154 <key>identifier</key> 155 <string>JVChatBeeped</string> 156 <key>title</key> 157 <string>Someone Beeped You</string> 158 </dict> 159 <dict> 160 <key>identifier</key> 155 161 <string>JVChatMentioned</string> 156 162 <key>title</key>
