Changeset 2463
- Timestamp:
- 03/13/05 23:21:32 (4 years ago)
- Files:
-
- trunk/Colloquy.xcode/project.pbxproj (modified) (10 diffs)
- trunk/JVChatController.h (modified) (3 diffs)
- trunk/JVChatController.m (modified) (5 diffs)
- trunk/JVDirectChatPanel.h (modified) (1 diff)
- trunk/JVDirectChatPanel.m (modified) (2 diffs)
- trunk/JVSmartTranscriptPanel.h (added)
- trunk/JVSmartTranscriptPanel.m (added)
- trunk/Languages/Dutch.lproj/Colloquy.nib/info.nib (modified) (1 diff)
- trunk/Languages/Dutch.lproj/Colloquy.nib/keyedobjects.nib (modified) (previous)
- trunk/Languages/English.lproj/Colloquy.nib/info.nib (modified) (1 diff)
- trunk/Languages/English.lproj/Colloquy.nib/keyedobjects.nib (modified) (previous)
- trunk/Languages/English.lproj/JVSmartTranscriptFilterSheet.nib (added)
- trunk/Languages/English.lproj/JVSmartTranscriptFilterSheet.nib/classes.nib (added)
- trunk/Languages/English.lproj/JVSmartTranscriptFilterSheet.nib/info.nib (added)
- trunk/Languages/English.lproj/JVSmartTranscriptFilterSheet.nib/keyedobjects.nib (added)
- trunk/Languages/German.lproj/Colloquy.nib/info.nib (modified) (1 diff)
- trunk/Languages/German.lproj/Colloquy.nib/keyedobjects.nib (modified) (previous)
- trunk/MVApplicationController.m (modified) (1 diff)
- trunk/Resources/smartTranscript.png (added)
- trunk/Resources/smartTranscriptTab.png (added)
- trunk/Resources/smartTranscriptTabActivity.png (added)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/Colloquy.xcode/project.pbxproj
r2441 r2463 800 800 1C7EF5C006B346E50037F173, 801 801 1C7EF5C106B346E50037F173, 802 1CF4D2F007E5489D00DB421A, 803 1CF4D30207E5497400DB421A, 802 804 ); 803 805 isa = PBXGroup; … … 1426 1428 }; 1427 1429 }; 1430 1C70377C07E49F25005CEA40 = { 1431 fileEncoding = 4; 1432 isa = PBXFileReference; 1433 lastKnownFileType = sourcecode.c.h; 1434 path = JVSmartTranscriptPanel.h; 1435 refType = 4; 1436 sourceTree = "<group>"; 1437 }; 1438 1C70377D07E49F25005CEA40 = { 1439 fileEncoding = 4; 1440 isa = PBXFileReference; 1441 lastKnownFileType = sourcecode.c.objc; 1442 path = JVSmartTranscriptPanel.m; 1443 refType = 4; 1444 sourceTree = "<group>"; 1445 }; 1446 1C70377F07E49F25005CEA40 = { 1447 fileRef = 1C70377D07E49F25005CEA40; 1448 isa = PBXBuildFile; 1449 settings = { 1450 }; 1451 }; 1452 1C703EF307E4B956005CEA40 = { 1453 children = ( 1454 1C703EF407E4B956005CEA40, 1455 ); 1456 isa = PBXVariantGroup; 1457 name = JVSmartTranscriptFilterSheet.nib; 1458 path = ""; 1459 refType = 4; 1460 sourceTree = "<group>"; 1461 }; 1462 1C703EF407E4B956005CEA40 = { 1463 isa = PBXFileReference; 1464 lastKnownFileType = wrapper.nib; 1465 name = English; 1466 path = Languages/English.lproj/JVSmartTranscriptFilterSheet.nib; 1467 refType = 4; 1468 sourceTree = "<group>"; 1469 }; 1470 1C703EF507E4B956005CEA40 = { 1471 fileRef = 1C703EF307E4B956005CEA40; 1472 isa = PBXBuildFile; 1473 settings = { 1474 }; 1475 }; 1428 1476 1C7055C40519E54C00A8FE6E = { 1429 1477 isa = PBXFileReference; … … 1600 1648 1C7C77E507DBD4E600FB5F83 = { 1601 1649 fileRef = 1C7C76ED07DBA1D000FB5F83; 1602 isa = PBXBuildFile;1603 settings = {1604 };1605 };1606 1C7E023C06B42C470037F173 = {1607 children = (1608 1C7E023D06B42C470037F173,1609 );1610 isa = PBXVariantGroup;1611 name = JVTranscriptSelectSheet.nib;1612 path = "";1613 refType = 4;1614 sourceTree = "<group>";1615 };1616 1C7E023D06B42C470037F173 = {1617 isa = PBXFileReference;1618 lastKnownFileType = wrapper.nib;1619 name = English;1620 path = Languages/English.lproj/JVTranscriptSelectSheet.nib;1621 refType = 4;1622 sourceTree = "<group>";1623 };1624 1C7E023E06B42C470037F173 = {1625 fileRef = 1C7E023C06B42C470037F173;1626 1650 isa = PBXBuildFile; 1627 1651 settings = { … … 2153 2177 1CD6C414051DFA1D00A8FE10, 2154 2178 1CD6C413051DFA1C00A8FE10, 2179 1C70377D07E49F25005CEA40, 2180 1C70377C07E49F25005CEA40, 2155 2181 1CCB279E04FE93FE00A8FE6E, 2156 2182 1CCB279D04FE93FE00A8FE6E, … … 2388 2414 1C7EF5C206B346E50037F173, 2389 2415 1C7EF5C306B346E50037F173, 2390 1C7E023E06B42C470037F173,2391 2416 1CF627CB07558F79005DFCFA, 2392 2417 1C0A4C9C0799BDB00093B702, … … 2396 2421 1C7C76EB07DBA1C100FB5F83, 2397 2422 1C7C76EC07DBA1C100FB5F83, 2423 1C703EF507E4B956005CEA40, 2424 1CF4D2F107E5489D00DB421A, 2425 1CF4D30307E5497400DB421A, 2426 1CF4D38907E54C0C00DB421A, 2398 2427 ); 2399 2428 isa = PBXResourcesBuildPhase; … … 2878 2907 1C66913A07BFA76D008400F7, 2879 2908 1CE3C4F807E13F4C004931E6, 2909 1C70377F07E49F25005CEA40, 2880 2910 ); 2881 2911 isa = PBXSourcesBuildPhase; … … 4717 4747 shellPath = /bin/sh; 4718 4748 shellScript = "touch Resources/Styles\ntouch Resources/Emoticons\n"; 4749 }; 4750 1CF4D2F007E5489D00DB421A = { 4751 isa = PBXFileReference; 4752 lastKnownFileType = image.png; 4753 name = smartTranscriptTab.png; 4754 path = Resources/smartTranscriptTab.png; 4755 refType = 4; 4756 sourceTree = "<group>"; 4757 }; 4758 1CF4D2F107E5489D00DB421A = { 4759 fileRef = 1CF4D2F007E5489D00DB421A; 4760 isa = PBXBuildFile; 4761 settings = { 4762 }; 4763 }; 4764 1CF4D30207E5497400DB421A = { 4765 isa = PBXFileReference; 4766 lastKnownFileType = image.png; 4767 name = smartTranscriptTabActivity.png; 4768 path = Resources/smartTranscriptTabActivity.png; 4769 refType = 4; 4770 sourceTree = "<group>"; 4771 }; 4772 1CF4D30307E5497400DB421A = { 4773 fileRef = 1CF4D30207E5497400DB421A; 4774 isa = PBXBuildFile; 4775 settings = { 4776 }; 4777 }; 4778 1CF4D38807E54C0C00DB421A = { 4779 isa = PBXFileReference; 4780 lastKnownFileType = image.png; 4781 name = smartTranscript.png; 4782 path = Resources/smartTranscript.png; 4783 refType = 4; 4784 sourceTree = "<group>"; 4785 }; 4786 1CF4D38907E54C0C00DB421A = { 4787 fileRef = 1CF4D38807E54C0C00DB421A; 4788 isa = PBXBuildFile; 4789 settings = { 4790 }; 4719 4791 }; 4720 4792 1CF4E51D0698E9FB00986498 = { … … 5156 5228 1C9982040603F097006C6417, 5157 5229 0A3187FA067ECEB600271E42, 5158 1C7 E023C06B42C470037F173,5230 1C703EF307E4B956005CEA40, 5159 5231 ); 5160 5232 isa = PBXGroup; … … 5252 5324 CB66DEA10631F8160034F76E, 5253 5325 1C6075E005138ED600A8FE6E, 5326 1CF4D38807E54C0C00DB421A, 5254 5327 1CF9BB9A04FBE96D00A8FE6E, 5255 5328 1C705701051A830200A8FE6E, trunk/JVChatController.h
r2308 r2463 8 8 @class JVDirectChatPanel; 9 9 @class JVChatTranscriptPanel; 10 @class JVSmartTranscriptPanel; 10 11 @class JVChatConsolePanel; 11 12 @class KAInternalIgnoreRule; … … 20 21 } 21 22 + (JVChatController *) defaultManager; 22 23 + (NSMenu *) smartTranscriptMenu; 24 + (void) refreshSmartTranscriptMenu; 25 23 26 - (NSSet *) allChatWindowControllers; 24 27 - (JVChatWindowController *) newChatWindowController; … … 36 39 - (JVChatConsolePanel *) chatConsoleForConnection:(MVChatConnection *) connection ifExists:(BOOL) exists; 37 40 41 - (JVSmartTranscriptPanel *) newSmartTranscript; 42 38 43 - (void) disposeViewController:(id <JVChatViewController>) controller; 39 44 - (void) detachViewController:(id <JVChatViewController>) controller; trunk/JVChatController.m
r2435 r2463 10 10 #import "JVNotificationController.h" 11 11 #import "JVChatTranscriptPanel.h" 12 #import "JVSmartTranscriptPanel.h" 12 13 #import "JVDirectChatPanel.h" 13 14 #import "JVChatRoomPanel.h" … … 20 21 21 22 static JVChatController *sharedInstance = nil; 23 static NSMenu *smartTranscriptMenu = nil; 22 24 23 25 @interface JVChatController (JVChatControllerPrivate) … … 32 34 extern JVChatController *sharedInstance; 33 35 return ( sharedInstance ? sharedInstance : ( sharedInstance = [[self alloc] init] ) ); 36 } 37 38 + (NSMenu *) smartTranscriptMenu { 39 extern NSMenu *smartTranscriptMenu; 40 [self refreshSmartTranscriptMenu]; 41 return smartTranscriptMenu; 42 } 43 44 + (void) refreshSmartTranscriptMenu { 45 extern NSMenu *smartTranscriptMenu; 46 if( ! smartTranscriptMenu ) smartTranscriptMenu = [[NSMenu alloc] initWithTitle:@""]; 47 48 NSMenuItem *menuItem = nil; 49 NSEnumerator *enumerator = [[[[smartTranscriptMenu itemArray] copy] autorelease] objectEnumerator]; 50 while( ( menuItem = [enumerator nextObject] ) ) 51 [smartTranscriptMenu removeItem:menuItem]; 52 53 NSURL *url = nil; 54 NSString *item = nil; 55 NSMutableArray *items = [NSMutableArray array]; 56 57 /* NSEnumerator *nameEnumerator = [items objectEnumerator]; 58 NSImage *icon = [[[NSImage imageNamed:@"room"] copy] autorelease]; 59 [icon setScalesWhenResized:YES]; 60 [icon setSize:NSMakeSize( 16., 16. )]; 61 enumerator = [rooms objectEnumerator]; 62 while( ( url = [enumerator nextObject] ) && ( item = [nameEnumerator nextObject] ) ) { 63 menuItem = [[[NSMenuItem alloc] initWithTitle:item action:@selector( _connectToFavorite: ) keyEquivalent:@""] autorelease]; 64 [menuItem setImage:icon]; 65 [menuItem setTarget:self]; 66 [menuItem setRepresentedObject:url]; 67 [smartTranscriptMenu addItem:menuItem]; 68 } */ 69 70 if( ! [items count] ) { 71 menuItem = [[[NSMenuItem alloc] initWithTitle:NSLocalizedString( @"No Smart Transcripts", "no smart transcripts menu title" ) action:NULL keyEquivalent:@""] autorelease]; 72 [smartTranscriptMenu addItem:menuItem]; 73 } 74 75 [smartTranscriptMenu addItem:[NSMenuItem separatorItem]]; 76 77 menuItem = [[[NSMenuItem alloc] initWithTitle:NSLocalizedString( @"New Smart Transcript...", "new smart transcript menu title" ) action:@selector( _newSmartTranscript: ) keyEquivalent:@"N"] autorelease]; 78 [menuItem setKeyEquivalentModifierMask:(NSCommandKeyMask | NSAlternateKeyMask)]; 79 [menuItem setTarget:[JVChatController defaultManager]]; 80 [smartTranscriptMenu addItem:menuItem]; 34 81 } 35 82 … … 198 245 [_chatControllers addObject:ret]; 199 246 [self _addViewControllerToPreferedWindowController:ret andFocus:YES]; 247 } 248 return [[ret retain] autorelease]; 249 } 250 251 #pragma mark - 252 253 - (JVSmartTranscriptPanel *) newSmartTranscript { 254 JVSmartTranscriptPanel *ret = nil; 255 if( ( ret = [[[JVSmartTranscriptPanel alloc] initWithSettings:nil] autorelease] ) ) { 256 [_chatControllers addObject:ret]; 257 [self _addViewControllerToPreferedWindowController:ret andFocus:YES]; 258 [ret editSettings:nil]; 200 259 } 201 260 return [[ret retain] autorelease]; … … 457 516 } 458 517 518 - (IBAction) _newSmartTranscript:(id) sender { 519 [[JVChatController defaultManager] newSmartTranscript]; 520 } 459 521 @end 460 522 trunk/JVDirectChatPanel.h
r2371 r2463 7 7 @class JVMutableChatMessage; 8 8 @class JVBuddy; 9 10 extern NSString *JVChatMessageWasProcessedNotification; 9 11 10 12 @interface JVDirectChatPanel : JVChatTranscriptPanel { trunk/JVDirectChatPanel.m
r2452 r2463 100 100 static NSString *JVToolbarSendFileItemIdentifier = @"JVToolbarSendFileItem"; 101 101 102 NSString *JVChatMessageWasProcessedNotification = @"JVChatMessageWasProcessedNotification"; 103 102 104 @interface JVDirectChatPanel (JVDirectChatPrivate) <ABImageClient> 103 105 - (NSString *) _selfCompositeName; … … 756 758 _newMessageCount--; 757 759 } 760 761 [[NSNotificationCenter defaultCenter] postNotificationName:JVChatMessageWasProcessedNotification object:self userInfo:[NSDictionary dictionaryWithObject:newMessage forKey:@"message"]]; 758 762 759 763 [self _setCurrentMessage:nil]; trunk/Languages/Dutch.lproj/Colloquy.nib/info.nib
r2241 r2463 17 17 </array> 18 18 <key>IBSystem Version</key> 19 <string>7 S215</string>19 <string>7W77</string> 20 20 </dict> 21 21 </plist> trunk/Languages/English.lproj/Colloquy.nib/info.nib
r2241 r2463 17 17 </array> 18 18 <key>IBSystem Version</key> 19 <string>7 S215</string>19 <string>7W77</string> 20 20 </dict> 21 21 </plist> trunk/Languages/German.lproj/Colloquy.nib/info.nib
r2241 r2463 17 17 </array> 18 18 <key>IBSystem Version</key> 19 <string>7 S215</string>19 <string>7W77</string> 20 20 </dict> 21 21 </plist> trunk/MVApplicationController.m
r2437 r2463 321 321 322 322 [[[[[[NSApplication sharedApplication] mainMenu] itemAtIndex:1] submenu] itemWithTag:20] setSubmenu:[MVConnectionsController favoritesMenu]]; 323 [[[[[[NSApplication sharedApplication] mainMenu] itemAtIndex:1] submenu] itemWithTag:30] setSubmenu:[JVChatController smartTranscriptMenu]]; 323 324 324 325 NSRange range = NSRangeFromString( [[NSUserDefaults standardUserDefaults] stringForKey:@"JVFileTransferPortRange"] );
