Changeset 1413
- Timestamp:
- 08/03/04 21:28:27 (4 years ago)
- Files:
-
- WiredClient/trunk/WCChat.h (modified) (2 diffs)
- WiredClient/trunk/WCFiles.h (modified) (2 diffs)
- WiredClient/trunk/WCMain.m (modified) (3 diffs)
- WiredClient/trunk/WCOutlineView.h (modified) (2 diffs)
- WiredClient/trunk/WCOutlineView.m (modified) (3 diffs)
- WiredClient/trunk/WCSearch.h (modified) (2 diffs)
- WiredClient/trunk/WCTableView.h (modified) (7 diffs)
- WiredClient/trunk/WCTableView.m (modified) (6 diffs)
- WiredClient/trunk/WCTrackers.h (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
WiredClient/trunk/WCChat.h
r1411 r1413 1 /* $Id: WCChat.h,v 1. 19 2004/08/02 20:36:40morris Exp $ */1 /* $Id: WCChat.h,v 1.20 2004/08/03 19:28:27 morris Exp $ */ 2 2 3 3 /* … … 39 39 40 40 @class WCConnection, WCSplitView, WCTextView, WCTableView; 41 42 @protocol WCTableViewMenuValidation;43 41 44 42 @interface WCChat : WCWindowController <WCGetInfoValidation> { WiredClient/trunk/WCFiles.h
r1383 r1413 1 /* $Id: WCFiles.h,v 1.1 0 2004/07/28 08:00:26morris Exp $ */1 /* $Id: WCFiles.h,v 1.11 2004/08/03 19:28:27 morris Exp $ */ 2 2 3 3 /* … … 28 28 29 29 #import "WCWindowController.h" 30 #import "WCTableView.h" 30 31 31 32 @class WCConnection, WCFile, WCTableView; 32 33 33 @protocol WCGetInfoValidation , WCTableViewOptionsSelection;34 @protocol WCGetInfoValidation; 34 35 35 @interface WCFiles : WCWindowController <WCGetInfoValidation, WCTableView OptionsSelection> {36 @interface WCFiles : WCWindowController <WCGetInfoValidation, WCTableViewSelectOptions> { 36 37 IBOutlet WCTableView *_filesTableView; 37 38 IBOutlet NSScrollView *_filesScrollView; WiredClient/trunk/WCMain.m
r1382 r1413 1 /* $Id: WCMain.m,v 1.3 6 2004/07/27 19:07:00morris Exp $ */1 /* $Id: WCMain.m,v 1.37 2004/08/03 19:28:27 morris Exp $ */ 2 2 3 3 /* … … 434 434 // --- view menu 435 435 else if(item == _viewOptionsMenuItem) 436 return [controller conformsToProtocol:@protocol(WCTableView OptionsSelection)];436 return [controller conformsToProtocol:@protocol(WCTableViewSelectOptions)]; 437 437 438 438 // --- files menu … … 914 914 controller = [[NSApp keyWindow] windowController]; 915 915 916 if([controller conformsToProtocol:@protocol(WCTableView OptionsSelection)])916 if([controller conformsToProtocol:@protocol(WCTableViewSelectOptions)]) 917 917 [(WCTableView *) [controller tableView] showViewOptions]; 918 918 } WiredClient/trunk/WCOutlineView.h
r1346 r1413 1 /* $Id: WCOutlineView.h,v 1. 3 2004/05/26 16:49:08morris Exp $ */1 /* $Id: WCOutlineView.h,v 1.4 2004/08/03 19:28:27 morris Exp $ */ 2 2 3 3 /* … … 27 27 */ 28 28 29 @protocol WCOutlineView InfoCopying29 @protocol WCOutlineViewCopyInfo 30 30 31 31 - (void) outlineViewShouldCopyInfo:(NSOutlineView *)sender; WiredClient/trunk/WCOutlineView.m
r1346 r1413 1 /* $Id: WCOutlineView.m,v 1. 3 2004/05/26 16:49:08morris Exp $ */1 /* $Id: WCOutlineView.m,v 1.4 2004/08/03 19:28:27 morris Exp $ */ 2 2 3 3 /* … … 109 109 NSTableColumn *tableColumn; 110 110 111 if([[self delegate] conformsToProtocol:@protocol(WCTableView OptionsSelection)]) {111 if([[self delegate] conformsToProtocol:@protocol(WCTableViewSelectOptions)]) { 112 112 key = [NSString stringWithFormat:@"WCTableViewOptions %@ Columns", [self autosaveName]]; 113 113 columns = [[NSUserDefaults standardUserDefaults] arrayForKey:key]; … … 131 131 id view; 132 132 133 if([[self delegate] conformsToProtocol:@protocol(WCTableView OptionsSelection)]) {133 if([[self delegate] conformsToProtocol:@protocol(WCTableViewSelectOptions)]) { 134 134 enumerator = [[[[[self delegate] viewOptionsPanel] contentView] subviews] objectEnumerator]; 135 135 WiredClient/trunk/WCSearch.h
r1383 r1413 1 /* $Id: WCSearch.h,v 1. 7 2004/07/28 08:00:26morris Exp $ */1 /* $Id: WCSearch.h,v 1.8 2004/08/03 19:28:27 morris Exp $ */ 2 2 3 3 /* … … 28 28 29 29 #import "WCWindowController.h" 30 #import "WCTableView.h" 30 31 31 32 @class WCTableView, WCConnection; 32 33 33 @protocol WCGetInfoValidatio n, WCTableViewOptionsSelection;34 @protocol WCGetInfoValidatio; 34 35 35 @interface WCSearch : WCWindowController <WCGetInfoValidation, WCTableView OptionsSelection> {36 @interface WCSearch : WCWindowController <WCGetInfoValidation, WCTableViewSelectOptions> { 36 37 IBOutlet WCTableView *_searchTableView; 37 38 WiredClient/trunk/WCTableView.h
r1356 r1413 1 /* $Id: WCTableView.h,v 1.1 1 2004/06/01 20:52:11morris Exp $ */1 /* $Id: WCTableView.h,v 1.12 2004/08/03 19:28:27 morris Exp $ */ 2 2 3 3 /* … … 30 30 31 31 32 @protocol WCTableView InfoCopying32 @protocol WCTableViewCopyInfo 33 33 34 34 - (void) tableViewShouldCopyInfo:(NSTableView *)sender; … … 37 37 38 38 39 @protocol WCTableViewTyp ingAhead39 @protocol WCTableViewTypeAhead 40 40 41 41 - (NSString *) tableView:(NSTableView *)tableView stringValueForRow:(int)row; … … 44 44 45 45 46 @protocol WCTableView ToolTipDisplaying46 @protocol WCTableViewDisplayToolTip 47 47 48 48 - (NSString *) tableView:(NSTableView *)tableView toolTipForRow:(int)row; … … 51 51 52 52 53 @protocol WCTableView OptionsSelection53 @protocol WCTableViewSelectOptions 54 54 55 55 - (NSPanel *) viewOptionsPanel; … … 63 63 NSMutableString *_typeAheadString; 64 64 NSCharacterSet *_typeAheadCharacterSet; 65 BOOL _typeAhead;66 65 67 66 NSMutableArray *_allTableColumns; 68 67 69 68 NSMutableDictionary *_regions; 69 70 SEL _escapeAction; 71 SEL _deleteAction; 70 72 } 71 73 … … 73 75 - (void) showViewOptions; 74 76 77 - (void) setEscapeAction:(SEL)action; 78 - (SEL) escapeAction; 79 80 - (void) setDeleteAction:(SEL)action; 81 - (SEL) deleteAction; 82 75 83 @end WiredClient/trunk/WCTableView.m
r1356 r1413 1 /* $Id: WCTableView.m,v 1.1 2 2004/06/01 20:52:11morris Exp $ */1 /* $Id: WCTableView.m,v 1.13 2004/08/03 19:28:27 morris Exp $ */ 2 2 3 3 /* … … 99 99 100 100 - (void)keyDown:(NSEvent *)event { 101 unichar key; 101 unichar key; 102 unsigned int flags; 102 103 103 104 // --- get key 104 key = [[event characters] characterAtIndex:0]; 105 key = [[event charactersIgnoringModifiers] characterAtIndex:0]; 106 flags = [event modifierFlags]; 105 107 106 108 // --- double-click on enter/return 107 if(key == NSEnterCharacter || key == NSCarriageReturnCharacter) 108 [super doCommandBySelector:[super doubleAction]]; 109 if(key == NSEnterCharacter || key == NSCarriageReturnCharacter) { 110 if([self doubleAction]) 111 [self doCommandBySelector:[self doubleAction]]; 112 } 113 // --- delete 114 else if(key == NSDeleteFunctionKey) { 115 if([self deleteAction]) 116 [self doCommandBySelector:[self deleteAction]]; 117 } 118 // --- enter type-ahead find 109 119 else if([[self dataSource] respondsToSelector:@selector(tableView:stringValueForRow:)] && 110 [_typeAheadCharacterSet characterIsMember:key]) 120 [_typeAheadCharacterSet characterIsMember:key]) { 111 121 [self interpretKeyEvents:[NSArray arrayWithObject:event]]; 112 else 122 } 123 // --- pass down 124 else { 113 125 [super keyDown:event]; 126 } 114 127 } 115 128 … … 172 185 173 186 187 - (void)cancelOperation:(id)sender { 188 if([self escapeAction]) 189 [self doCommandBySelector:[self escapeAction]]; 190 } 191 192 193 174 194 #pragma mark - 175 195 … … 180 200 NSTableColumn *tableColumn; 181 201 182 if([[self delegate] conformsToProtocol:@protocol(WCTableView OptionsSelection)]) {202 if([[self delegate] conformsToProtocol:@protocol(WCTableViewSelectOptions)]) { 183 203 key = [NSString stringWithFormat:@"WCTableViewOptions %@ Columns", [self autosaveName]]; 184 204 columns = [[NSUserDefaults standardUserDefaults] arrayForKey:key]; … … 205 225 id view; 206 226 207 if([[self delegate] conformsToProtocol:@protocol(WCTableView OptionsSelection)]) {227 if([[self delegate] conformsToProtocol:@protocol(WCTableViewSelectOptions)]) { 208 228 enumerator = [[[[[self delegate] viewOptionsPanel] contentView] subviews] objectEnumerator]; 209 229 … … 277 297 } 278 298 299 #pragma mark - 300 301 - (void)setEscapeAction:(SEL)action { 302 _escapeAction = action; 303 } 304 305 306 307 - (SEL)escapeAction { 308 return _escapeAction; 309 } 310 311 312 313 #pragma mark - 314 315 - (void)setDeleteAction:(SEL)action { 316 _deleteAction = action; 317 } 318 319 320 321 - (SEL)deleteAction { 322 return _deleteAction; 323 } 324 279 325 280 326 WiredClient/trunk/WCTrackers.h
r1383 r1413 1 /* $Id: WCTrackers.h,v 1.1 0 2004/07/28 08:00:26morris Exp $ */1 /* $Id: WCTrackers.h,v 1.11 2004/08/03 19:28:27 morris Exp $ */ 2 2 3 3 /* … … 28 28 29 29 #import "WCWindowController.h" 30 #import "WCTableView.h" 30 31 31 32 @class WCOutlineView, WCTracker; 32 33 33 @protocol WCTableViewOptionsSelection; 34 35 @interface WCTrackers : WCWindowController <WCTableViewOptionsSelection> { 34 @interface WCTrackers : WCWindowController <WCTableViewSelectOptions> { 36 35 IBOutlet NSTextField *_statusTextField; 37 36
