Changeset 2409
- Timestamp:
- 03/06/05 14:35:19 (4 years ago)
- Files:
-
- trunk/JVChatConsolePanel.h (modified) (2 diffs)
- trunk/JVChatConsolePanel.m (modified) (3 diffs)
- trunk/JVChatRoomMember.h (modified) (2 diffs)
- trunk/JVChatRoomMember.m (modified) (2 diffs)
- trunk/JVChatRoomPanel.m (modified) (2 diffs)
- trunk/JVChatTranscriptPanel.h (modified) (2 diffs)
- trunk/JVChatTranscriptPanel.m (modified) (3 diffs)
- trunk/JVChatWindowController.h (modified) (1 diff)
- trunk/MVChatPluginManager.m (modified) (1 diff)
- trunk/Resources/ChatCore.scriptSuite (modified) (1 diff)
- trunk/Resources/ChatCore.scriptTerminology (modified) (1 diff)
- trunk/Resources/Colloquy.scriptSuite (modified) (2 diffs)
- trunk/Resources/Colloquy.scriptTerminology (modified) (4 diffs)
- trunk/Resources/Colloquy.sdef (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/JVChatConsolePanel.h
r2308 r2409 4 4 @class MVChatConnection; 5 5 6 @interface JVChatConsolePanel : NSObject <JVChatViewController > {6 @interface JVChatConsolePanel : NSObject <JVChatViewController, JVChatViewControllerScripting> { 7 7 @protected 8 8 IBOutlet NSView *contents; … … 30 30 - (IBAction) send:(id) sender; 31 31 @end 32 33 @interface JVChatConsolePanel (JVChatConsolePanelScripting) <JVChatListItemScripting>34 - (NSNumber *) uniqueIdentifier;35 @endtrunk/JVChatConsolePanel.m
r2401 r2409 147 147 148 148 - (id <JVChatListItem>) parent { 149 return nil; 150 } 151 152 - (NSArray *) children { 149 153 return nil; 150 154 } … … 467 471 468 472 #pragma mark - 473 #pragma mark Scripting Support 474 475 - (NSNumber *) uniqueIdentifier { 476 return [NSNumber numberWithUnsignedInt:(unsigned long) self]; 477 } 478 479 - (NSWindow *) window { 480 return [[self windowController] window]; 481 } 482 483 #pragma mark - 469 484 #pragma mark Toolbar Support 470 485 … … 582 597 } 583 598 @end 584 585 #pragma mark -586 587 @implementation JVChatConsolePanel (JVChatConsolePanelScripting)588 - (NSNumber *) uniqueIdentifier {589 return [NSNumber numberWithUnsignedInt:(unsigned long) self];590 }591 592 - (NSWindow *) window {593 return [[self windowController] window];594 }595 @endtrunk/JVChatRoomMember.h
r2308 r2409 6 6 @class JVBuddy; 7 7 8 @interface JVChatRoomMember : NSObject <JVChatListItem > {8 @interface JVChatRoomMember : NSObject <JVChatListItem, JVChatListItemScripting> { 9 9 JVChatRoomPanel *_parent; 10 10 MVChatUser *_user; … … 72 72 - (IBAction) cancelSheet:(id) sender; 73 73 @end 74 75 #pragma mark -76 77 @interface JVChatRoomMember (JVChatRoomMemberScripting) <JVChatListItemScripting>78 - (NSNumber *) uniqueIdentifier;79 @endtrunk/JVChatRoomMember.m
r2401 r2409 415 415 416 416 #pragma mark - 417 #pragma mark Scripting Support 418 419 - (NSNumber *) uniqueIdentifier { 420 return [NSNumber numberWithUnsignedInt:(unsigned long) self]; 421 } 422 423 - (NSArray *) children { 424 return nil; 425 } 426 427 #pragma mark - 417 428 #pragma mark GUI Actions 418 429 … … 681 692 } 682 693 @end 683 684 #pragma mark -685 686 @implementation JVChatRoomMember (JVChatRoomMemberScripting)687 - (NSScriptObjectSpecifier *) objectSpecifier {688 id classDescription = [NSClassDescription classDescriptionForClass:[JVChatRoomPanel class]];689 NSScriptObjectSpecifier *container = [[self room] objectSpecifier];690 return [[[NSUniqueIDSpecifier alloc] initWithContainerClassDescription:classDescription containerSpecifier:container key:@"chatMembers" uniqueID:[self uniqueIdentifier]] autorelease];691 }692 693 - (NSNumber *) uniqueIdentifier {694 return [NSNumber numberWithUnsignedInt:(unsigned long) self];695 }696 697 /*#pragma mark -698 699 - (void) voiceScriptCommand:(NSScriptCommand *) command {700 if( ! [self voice] ) [self toggleVoiceStatus:nil];701 }702 703 - (void) devoiceScriptCommand:(NSScriptCommand *) command {704 if( [self voice] ) [self toggleVoiceStatus:nil];705 }706 707 - (void) promoteScriptCommand:(NSScriptCommand *) command {708 if( ! [self operator] ) [self toggleOperatorStatus:nil];709 }710 711 - (void) demoteScriptCommand:(NSScriptCommand *) command {712 if( [self operator] ) [self toggleOperatorStatus:nil];713 } */714 @endtrunk/JVChatRoomPanel.m
r2371 r2409 181 181 - (id) childAtIndex:(int) index { 182 182 return [_sortedMembers objectAtIndex:index]; 183 } 184 185 - (NSArray *) children { 186 return _sortedMembers; 183 187 } 184 188 … … 1303 1307 } 1304 1308 @end 1309 1310 #pragma mark - 1311 1312 @implementation JVChatRoomMember (JVChatRoomMemberObjectSpecifier) 1313 - (NSScriptObjectSpecifier *) objectSpecifier { 1314 id classDescription = [NSClassDescription classDescriptionForClass:[JVChatRoomPanel class]]; 1315 NSScriptObjectSpecifier *container = [[self room] objectSpecifier]; 1316 return [[[NSUniqueIDSpecifier alloc] initWithContainerClassDescription:classDescription containerSpecifier:container key:@"chatMembers" uniqueID:[self uniqueIdentifier]] autorelease]; 1317 } 1318 @end trunk/JVChatTranscriptPanel.h
r2308 r2409 8 8 @class JVChatTranscript; 9 9 10 @interface JVChatTranscriptPanel : NSObject <JVChatViewController > {10 @interface JVChatTranscriptPanel : NSObject <JVChatViewController, JVChatViewControllerScripting> { 11 11 @protected 12 12 IBOutlet NSView *contents; … … 44 44 #pragma mark - 45 45 46 @interface JVChatTranscriptPanel (JVChatTranscriptScripting) <JVChatListItemScripting>47 - (NSNumber *) uniqueIdentifier;48 @end49 50 #pragma mark -51 52 46 @interface NSObject (MVChatPluginLinkClickSupport) 53 47 - (BOOL) handleClickedLink:(NSURL *) url inView:(id <JVChatViewController>) view; trunk/JVChatTranscriptPanel.m
r2401 r2409 195 195 } 196 196 197 - (NSArray *) children { 198 return nil; 199 } 200 197 201 - (NSMenu *) menu { 198 202 NSMenu *menu = [[[NSMenu alloc] initWithTitle:@""] autorelease]; … … 215 219 [ret setSize:NSMakeSize( 32., 32. )]; 216 220 return [[ret retain] autorelease]; 221 } 222 223 #pragma mark - 224 #pragma mark Scripting Support 225 226 - (NSNumber *) uniqueIdentifier { 227 return [NSNumber numberWithUnsignedInt:(unsigned long) self]; 228 } 229 230 - (BOOL) isEnabled { 231 return YES; 232 } 233 234 - (NSWindow *) window { 235 return [[self windowController] window]; 217 236 } 218 237 … … 784 803 } 785 804 @end 786 787 #pragma mark -788 789 @implementation JVChatTranscriptPanel (JVChatTranscriptScripting)790 - (NSNumber *) uniqueIdentifier {791 return [NSNumber numberWithUnsignedInt:(unsigned long) self];792 }793 794 - (NSWindow *) window {795 return [[self windowController] window];796 }797 @endtrunk/JVChatWindowController.h
r2407 r2409 93 93 @protocol JVChatListItemScripting 94 94 - (NSNumber *) uniqueIdentifier; 95 - (NSArray *) children; 96 - (NSString *) information; 97 - (NSString *) toolTip; 98 - (BOOL) isEnabled; 99 @end 100 101 @protocol JVChatViewControllerScripting <JVChatListItemScripting> 102 - (NSWindow *) window; 103 - (IBAction) close:(id) sender; 95 104 @end 96 105 97 106 @protocol JVChatListItem <NSObject> 98 107 - (id <JVChatListItem>) parent; 99 100 108 - (NSImage *) icon; 101 109 - (NSString *) title; trunk/MVChatPluginManager.m
r2401 r2409 219 219 } 220 220 @end 221 222 #pragma mark - 223 224 @interface MVReloadPluginsScriptCommand : NSScriptCommand {} 225 @end 226 227 #pragma mark - 228 229 @implementation MVReloadPluginsScriptCommand 230 - (id) performDefaultImplementation { 231 [[MVChatPluginManager defaultManager] reloadPlugins]; 232 return nil; 233 } 234 @end trunk/Resources/ChatCore.scriptSuite
r2405 r2409 458 458 <string>ChatCore.MVChatUser</string> 459 459 </dict> 460 </dict> 461 <key>ReloadPlugins</key> 462 <dict> 463 <key>AppleEventClassCode</key> 464 <string>ccoR</string> 465 <key>AppleEventCode</key> 466 <string>rLdX</string> 467 <key>CommandClass</key> 468 <string>MVReloadPluginsScriptCommand</string> 460 469 </dict> 461 470 <key>SendChatMessage</key> trunk/Resources/ChatCore.scriptTerminology
r2405 r2409 354 354 </dict> 355 355 </dict> 356 <key>ReloadPlugins</key> 357 <dict> 358 <key>Description</key> 359 <string>Reloads all plugins that are in the search paths. Plugins that have been deleted or moved will be unloaded.</string> 360 <key>Name</key> 361 <string>reload plugins</string> 362 </dict> 356 363 <key>SendChatMessage</key> 357 364 <dict> trunk/Resources/Colloquy.scriptSuite
r2408 r2409 432 432 <string>NSNumber<Bool></string> 433 433 </dict> 434 <key>numberOfChildren</key>435 <dict>436 <key>AppleEventCode</key>437 <string>cDcA</string>438 <key>ReadOnly</key>439 <string>YES</string>440 <key>Type</key>441 <string>NSNumber</string>442 </dict>443 434 <key>parent</key> 444 435 <dict> … … 471 462 <key>Superclass</key> 472 463 <string>NSCoreSuite.AbstractObject</string> 464 <key>ToManyRelationships</key> 465 <dict> 466 <key>children</key> 467 <dict> 468 <key>AppleEventCode</key> 469 <string>cliM</string> 470 <key>LocationRequiredToCreate</key> 471 <string>NO</string> 472 <key>ReadOnly</key> 473 <string>YES</string> 474 <key>Type</key> 475 <string>Colloquy.ListItem</string> 476 </dict> 477 </dict> 473 478 </dict> 474 479 <key>NSApplication</key> trunk/Resources/Colloquy.scriptTerminology
r2408 r2409 236 236 <string>Save any changes to disk as they occur? Always false when there is no file association.</string> 237 237 <key>Name</key> 238 <string>auto save changes</string>238 <string>auto save</string> 239 239 </dict> 240 240 <key>filePath</key> … … 358 358 <string>enabled</string> 359 359 </dict> 360 <key>numberOfChildren</key>361 <dict>362 <key>Description</key>363 <string>The number of children this item has under it.</string>364 <key>Name</key>365 <string>child count</string>366 </dict>367 360 <key>parent</key> 368 361 <dict> 369 362 <key>Description</key> 370 <string>This list item's parent(if any).</string>371 <key>Name</key> 372 <string> parent</string>363 <string>This list item's container (if any).</string> 364 <key>Name</key> 365 <string>container</string> 373 366 </dict> 374 367 <key>title</key> … … 554 547 <dict> 555 548 <key>Description</key> 556 <string>Should the browser be expanded? Default is no. </string>549 <string>Should the browser be expanded? Default is no. The room list will be refreshed if the browser is expanded.</string> 557 550 <key>Name</key> 558 551 <string>expanded</string> … … 566 559 </dict> 567 560 </dict> 561 <key>Description</key> 562 <string>Displays a new chat room browser window. Users can select a room from an expanded browser, or type a room in manually.</string> 568 563 <key>Name</key> 569 564 <string>display chat room browser</string> trunk/Resources/Colloquy.sdef
r2408 r2409 121 121 </class> 122 122 <class name="list item" code="cliM" description="Generic chat list item that all drawer items inherit from (e.g. members, etc.)."> 123 <elements> 124 <element type="list item" access="r"> 125 <cocoa method="children"/> 126 </element> 127 </elements> 123 128 <properties> 124 129 <property name="name" code="pnam" description="Title to show in the list." type="string" access="r"> … … 134 139 <cocoa method="toolTip"/> 135 140 </property> 136 <property name=" parent" code="pArA" description="This list item's parent(if any)." type="list item" access="r">141 <property name="container" code="pArA" description="This list item's container (if any)." type="list item" access="r"> 137 142 <cocoa method="parent"/> 138 </property>139 <property name="child count" code="cDcA" description="The number of children this item has under it." type="number" access="r">140 <cocoa method="numberOfChildren"/>141 143 </property> 142 144 </properties> … … 277 279 <cocoa method="filePath"/> 278 280 </property> 279 <property name="auto save changes" code="atSA" description="Save any changes to disk as they occur? Always false when there is no file association." type="boolean">281 <property name="auto save" code="atSA" description="Save any changes to disk as they occur? Always false when there is no file association." type="boolean"> 280 282 <cocoa method="automaticallyWritesChangesToFile"/> 281 283 </property> … … 358 360 </parameter> 359 361 </command> 360 <command name="display chat room browser" code="coRCdRbX" >362 <command name="display chat room browser" code="coRCdRbX" description="Displays a new chat room browser window. Users can select a room from an expanded browser, or type a room in manually."> 361 363 <cocoa class="JVOpenRoomBrowserScriptCommand"/> 362 364 <parameter name="for" code="dRb1" description="The connection to select. No selection by default." type="connection" optional="optional"> … … 366 368 <cocoa key="filter"/> 367 369 </parameter> 368 <parameter name="expanded" code="dRb3" description="Should the browser be expanded? Default is no. " type="boolean" optional="optional">370 <parameter name="expanded" code="dRb3" description="Should the browser be expanded? Default is no. The room list will be refreshed if the browser is expanded." type="boolean" optional="optional"> 369 371 <cocoa key="expanded"/> 370 372 </parameter> … … 622 624 <direct-parameter type="chat user" description="The chat user."/> 623 625 </command> 626 <command name="reload plugins" code="ccoRrLdX" description="Reloads all plugins that are in the search paths. Plugins that have been deleted or moved will be unloaded."> 627 <cocoa class="MVReloadPluginsScriptCommand"/> 628 </command> 624 629 </commands> 625 630 </suite>
