Changeset 3777
- Timestamp:
- 02/06/08 09:04:24 (6 months ago)
- Files:
-
- trunk/Controllers/JVChatWindowController.m (modified) (2 diffs)
- trunk/Views/JVSideOutlineView.m (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/Controllers/JVChatWindowController.m
r3718 r3777 12 12 NSString *JVToolbarToggleChatDrawerItemIdentifier = @"JVToolbarToggleChatDrawerItem"; 13 13 NSString *JVChatViewPboardType = @"Colloquy Chat View v1.0 pasteboard type"; 14 15 #if !defined(MAC_OS_X_VERSION_10_5) || (MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_5) 16 enum { 17 NSTableViewSelectionHighlightStyleRegular = 0, 18 NSTableViewSelectionHighlightStyleSourceList = 1, 19 }; 20 21 typedef int NSTableViewSelectionHighlightStyle; 22 23 @interface NSTableView (NewLeopardMethods) 24 - (void) setSelectionHighlightStyle:(NSTableViewSelectionHighlightStyle) value; 25 - (NSTableViewSelectionHighlightStyle) selectionHighlightStyle; 26 @end 27 #endif 28 29 #pragma mark - 14 30 15 31 @interface NSToolbar (NSToolbarPrivate) … … 72 88 [chatViewsOutlineView registerForDraggedTypes:[NSArray arrayWithObjects:JVChatViewPboardType, NSFilenamesPboardType, nil]]; 73 89 [chatViewsOutlineView setMenu:[[[NSMenu allocWithZone:nil] initWithTitle:@""] autorelease]]; 90 91 if( floor( NSAppKitVersionNumber ) > NSAppKitVersionNumber10_4 ) 92 [chatViewsOutlineView setSelectionHighlightStyle:NSTableViewSelectionHighlightStyleSourceList]; 74 93 75 94 [favoritesButton setMenu:[MVConnectionsController favoritesMenu]]; trunk/Views/JVSideOutlineView.m
r3259 r3777 11 11 } 12 12 13 @interface NSOutlineView (NSOutlineViewPrivate) 14 - (NSColor *) _highlightColorForCell:(NSCell *) cell; 15 - (void) _highlightRow:(int) row clipRect:(NSRect) clip; 16 @end 17 13 18 @implementation JVSideOutlineView 14 19 - (NSColor *) _highlightColorForCell:(NSCell *) cell { 20 if( floor( NSAppKitVersionNumber ) > NSAppKitVersionNumber10_4 && [super respondsToSelector:_cmd] ) 21 return [super _highlightColorForCell:cell]; 22 15 23 // return nil to prevent normal selection drawing 16 24 return nil; … … 18 26 19 27 - (void) _highlightRow:(int) row clipRect:(NSRect) clip { 28 if( floor( NSAppKitVersionNumber ) > NSAppKitVersionNumber10_4 && [super respondsToSelector:_cmd] ) 29 return [super _highlightRow:row clipRect:clip]; 30 20 31 NSRect highlight = [self rectOfRow:row]; 21 32 … … 42 53 43 54 - (void) drawBackgroundInClipRect:(NSRect) clipRect { 55 if( floor( NSAppKitVersionNumber ) > NSAppKitVersionNumber10_4 && [super respondsToSelector:_cmd] ) 56 return [super drawBackgroundInClipRect:clipRect]; 57 44 58 static NSColor *backgroundColor = nil; 45 59 if( ! backgroundColor ) 46 60 backgroundColor = [[NSColor colorWithCalibratedRed:( 229. / 255. ) green:( 237. / 255. ) blue:( 247. / 255. ) alpha:1.] retain]; 61 47 62 [backgroundColor set]; 48 63 NSRectFill( clipRect );
