Changeset 1382
- Timestamp:
- 07/27/04 21:07:08 (4 years ago)
- Files:
-
- WiredClient/trunk/English.lproj/MainMenu.nib/classes.nib (modified) (3 diffs)
- WiredClient/trunk/English.lproj/MainMenu.nib/info.nib (modified) (1 diff)
- WiredClient/trunk/English.lproj/MainMenu.nib/keyedobjects.nib (modified) (previous)
- WiredClient/trunk/English.lproj/MainMenu.nib/objects.nib (modified) (previous)
- WiredClient/trunk/English.lproj/Messages.nib/info.nib (modified) (1 diff)
- WiredClient/trunk/English.lproj/Messages.nib/keyedobjects.nib (modified) (previous)
- WiredClient/trunk/English.lproj/Messages.nib/objects.nib (modified) (previous)
- WiredClient/trunk/English.lproj/PrivateChat.nib/classes.nib (modified) (1 diff)
- WiredClient/trunk/English.lproj/PrivateChat.nib/info.nib (modified) (2 diffs)
- WiredClient/trunk/English.lproj/PrivateChat.nib/keyedobjects.nib (modified) (previous)
- WiredClient/trunk/English.lproj/PrivateChat.nib/objects.nib (modified) (previous)
- WiredClient/trunk/English.lproj/PublicChat.nib/classes.nib (modified) (1 diff)
- WiredClient/trunk/English.lproj/PublicChat.nib/info.nib (modified) (2 diffs)
- WiredClient/trunk/English.lproj/PublicChat.nib/keyedobjects.nib (modified) (previous)
- WiredClient/trunk/English.lproj/PublicChat.nib/objects.nib (modified) (previous)
- WiredClient/trunk/WCChat.h (modified) (3 diffs)
- WiredClient/trunk/WCChat.m (modified) (4 diffs)
- WiredClient/trunk/WCMain.h (modified) (3 diffs)
- WiredClient/trunk/WCMain.m (modified) (3 diffs)
- WiredClient/trunk/WCPublicChat.m (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
WiredClient/trunk/English.lproj/MainMenu.nib/classes.nib
r1307 r1382 21 21 bookmark = id; 22 22 broadcast = id; 23 cancel = id;24 23 chat = id; 25 24 connect = id; … … 45 44 search = id; 46 45 serverInfo = id; 46 setTopic = id; 47 47 showTrackers = id; 48 48 smallerText = id; … … 80 80 "_searchMenuItem" = NSMenuItem; 81 81 "_serverInfoMenuItem" = NSMenuItem; 82 "_setTopicMenuItem" = NSMenuItem; 82 83 "_transfersMenuItem" = NSMenuItem; 83 84 "_viewMenu" = NSMenu; WiredClient/trunk/English.lproj/MainMenu.nib/info.nib
r1242 r1382 16 16 <integer>217</integer> 17 17 </array> 18 <key>IBOpenObjects</key> 19 <array> 20 <integer>29</integer> 21 </array> 18 22 <key>IBSystem Version</key> 19 <string>7 F44</string>23 <string>7H63</string> 20 24 </dict> 21 25 </plist> WiredClient/trunk/English.lproj/Messages.nib/info.nib
r1381 r1382 4 4 <dict> 5 5 <key>IBDocumentLocation</key> 6 <string> 403 111401 299 0 0 1280 1002 </string>6 <string>608 103 401 299 0 0 1280 1002 </string> 7 7 <key>IBFramework Version</key> 8 8 <string>364.0</string> WiredClient/trunk/English.lproj/PrivateChat.nib/classes.nib
r1379 r1382 19 19 "_privateMessageButton" = NSButton; 20 20 "_sendPrivateMessageMenuItem" = NSMenuItem; 21 "_setTopicPanel" = NSPanel; 22 "_setTopicTextView" = NSTextView; 21 23 "_topicTextField" = NSTextField; 22 24 "_userListMenu" = NSMenu; WiredClient/trunk/English.lproj/PrivateChat.nib/info.nib
r1379 r1382 4 4 <dict> 5 5 <key>IBDocumentLocation</key> 6 <string> 544 209403 412 0 0 1280 1002 </string>6 <string>458 151 403 412 0 0 1280 1002 </string> 7 7 <key>IBEditorPositions</key> 8 8 <dict> … … 20 20 <integer>196</integer> 21 21 <integer>139</integer> 22 <integer>250</integer> 22 23 </array> 23 24 <key>IBSystem Version</key> WiredClient/trunk/English.lproj/PublicChat.nib/classes.nib
r1379 r1382 25 25 "_privateMessageButton" = NSButton; 26 26 "_sendPrivateMessageMenuItem" = NSMenuItem; 27 "_setTopicPanel" = NSPanel; 28 "_setTopicTextView" = NSTextView; 27 29 "_topicTextField" = NSTextField; 28 30 "_userListMenu" = NSMenu; WiredClient/trunk/English.lproj/PublicChat.nib/info.nib
r1379 r1382 4 4 <dict> 5 5 <key>IBDocumentLocation</key> 6 <string> 503 107408 436 0 0 1280 1002 </string>6 <string>348 113 408 436 0 0 1280 1002 </string> 7 7 <key>IBEditorPositions</key> 8 8 <dict> … … 19 19 <array> 20 20 <integer>10</integer> 21 <integer>407</integer> 21 22 </array> 22 23 <key>IBSystem Version</key> WiredClient/trunk/WCChat.h
r1376 r1382 1 /* $Id: WCChat.h,v 1.1 6 2004/07/27 17:37:44morris Exp $ */1 /* $Id: WCChat.h,v 1.17 2004/07/27 19:07:00 morris Exp $ */ 2 2 3 3 /* … … 59 59 IBOutlet NSTableColumn *_nickTableColumn; 60 60 61 IBOutlet NSPanel *_setTopicPanel; 62 IBOutlet NSTextView *_setTopicTextView; 63 61 64 IBOutlet NSMenu *_userListMenu; 62 65 IBOutlet NSMenuItem *_sendPrivateMessageMenuItem; … … 100 103 - (void) updateButtons; 101 104 - (void) updateUserCount; 105 - (void) showSetTopic; 102 106 - (void) saveChatToURL:(NSURL *)url; 103 107 - (void) printEvent:(NSString *)argument; WiredClient/trunk/WCChat.m
r1376 r1382 1 /* $Id: WCChat.m,v 1.5 2 2004/07/27 17:37:44morris Exp $ */1 /* $Id: WCChat.m,v 1.53 2004/07/27 19:07:00 morris Exp $ */ 2 2 3 3 /* … … 31 31 #import "NSMutableAttributedStringAdditions.h" 32 32 #import "NSTextViewAdditions.h" 33 #import "NSWindowControllerAdditions.h" 33 34 #import "WCAccount.h" 34 35 #import "WCChat.h" … … 970 971 971 972 973 - (void)setTopicSheetDidEnd:(NSWindow *)sheet returnCode:(int)returnCode contextInfo:(void *)contextInfo { 974 if(returnCode == NSRunStoppedResponse) { 975 // --- send the topic command 976 [_connection sendCommand:WCTopicCommand 977 withArgument:[NSString stringWithFormat:@"%u", [self cid]] 978 withArgument:[_setTopicTextView string] 979 withSender:self]; 980 } 981 982 // --- close sheet 983 [_setTopicPanel close]; 984 985 // --- clear for next round 986 [_setTopicTextView setString:@""]; 987 } 988 989 990 972 991 - (BOOL)textView:(NSTextView *)textView doCommandBySelector:(SEL)selector { 973 992 BOOL commandKey, optionKey, controlKey, value = NO; 974 993 975 // --- we only handle the input area 994 // --- handle topic text view 995 if(textView == _setTopicTextView) { 996 if(selector == @selector(insertNewline:)) { 997 if([[[NSApp currentEvent] characters] characterAtIndex:0] == NSEnterCharacter) { 998 [self submitSheet:textView]; 999 1000 value = YES; 1001 } 1002 } 1003 } 1004 1005 // --- below is only handle the input area 976 1006 if(textView != _chatInputTextView) 977 return NO;1007 return value; 978 1008 979 1009 // --- get key state … … 1293 1323 1294 1324 1325 - (void)showSetTopic { 1326 // --- set topic 1327 [_setTopicTextView setString:[_topicTextField stringValue]]; 1328 [_setTopicTextView setSelectedRange:NSMakeRange(0, [[_setTopicTextView string] length])]; 1329 1330 // --- bring up sheet 1331 [NSApp beginSheet:_setTopicPanel 1332 modalForWindow:[self window] 1333 modalDelegate:self 1334 didEndSelector:@selector(setTopicSheetDidEnd:returnCode:contextInfo:) 1335 contextInfo:NULL]; 1336 } 1337 1338 1339 1295 1340 - (void)printEvent:(NSString *)argument { 1296 1341 NSString *output, *time; WiredClient/trunk/WCMain.h
r1356 r1382 1 /* $Id: WCMain.h,v 1. 8 2004/06/01 20:52:11morris Exp $ */1 /* $Id: WCMain.h,v 1.9 2004/07/27 19:07:00 morris Exp $ */ 2 2 3 3 /* … … 52 52 IBOutlet NSMenuItem *_postNewMenuItem; 53 53 IBOutlet NSMenuItem *_broadcastMenuItem; 54 IBOutlet NSMenuItem *_setTopicMenuItem; 54 55 IBOutlet NSMenuItem *_disconnectMenuItem; 55 56 … … 118 119 - (IBAction) postNews:(id)sender; 119 120 - (IBAction) broadcast:(id)sender; 121 - (IBAction) setTopic:(id)sender; 120 122 - (IBAction) disconnect:(id)sender; 121 123 WiredClient/trunk/WCMain.m
r1367 r1382 1 /* $Id: WCMain.m,v 1.3 5 2004/07/21 07:45:36morris Exp $ */1 /* $Id: WCMain.m,v 1.36 2004/07/27 19:07:00 morris Exp $ */ 2 2 3 3 /* … … 427 427 else if(item == _broadcastMenuItem) 428 428 return [[connection account] broadcast]; 429 else if(item == _setTopicMenuItem) 430 return [controller isKindOfClass:[WCChat class]] && ([controller cid] != 1 || [[connection account] setTopic]); 429 431 else if(item == _disconnectMenuItem) 430 432 return (connection != NULL); … … 823 825 824 826 827 - (IBAction)setTopic:(id)sender { 828 [(WCChat *) [[NSApp keyWindow] windowController] showSetTopic]; 829 } 830 831 832 825 833 - (IBAction)disconnect:(id)sender { 826 834 [[[[(WCWindowController *) [[NSApp keyWindow] windowController] connection] chat] window] performClose:self]; WiredClient/trunk/WCPublicChat.m
r1377 r1382 1 /* $Id: WCPublicChat.m,v 1.3 2 2004/07/27 18:28:26morris Exp $ */1 /* $Id: WCPublicChat.m,v 1.33 2004/07/27 19:07:00 morris Exp $ */ 2 2 3 3 /* … … 337 337 withArgument:[_kickMessageTextField stringValue] 338 338 withSender:self]; 339 340 [user release]; 341 } 339 } 340 341 // --- release 342 [user release]; 342 343 343 344 // --- close sheet … … 359 360 withArgument:[_banMessageTextField stringValue] 360 361 withSender:self]; 361 362 [user release]; 363 } 362 } 363 364 // --- release 365 [user release]; 364 366 365 367 // --- close sheet … … 369 371 [_banMessageTextField setStringValue:@""]; 370 372 } 371 372 373 373 374
