Adium

Changeset 24089

Show
Ignore:
Timestamp:
06/29/2008 02:48:06 PM (6 months ago)
Author:
evands
Message:

Don't select a group when its disclosure triangle is clicked to expand/contract it. Fixes #10139

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/Frameworks/Adium Framework/Source/AIListOutlineView.m

    r24007 r24089  
    527527        switch ([nextEvent type]) { 
    528528                case NSLeftMouseUp: 
    529                                 if ([self isItemExpanded:item]) { 
    530                                         [self collapseItem:item];  
    531                                 } else { 
    532                                         [self expandItem:item];  
    533                                 } 
    534                                  
    535                                 [self selectRowIndexes:[NSIndexSet indexSetWithIndex:row] byExtendingSelection:NO];  
    536                         break; 
     529                        if ([self isItemExpanded:item]) { 
     530                                [self collapseItem:item];  
     531                        } else { 
     532                                [self expandItem:item];  
     533                        } 
     534                         
     535                        /* If the disclosure triangle was not the click-point, select the row. 
     536                         * 
     537                         * We use the approximation that the height of the row is about the same widht 
     538                         * as the disclosure triangle. 
     539                         */ 
     540                         if (viewPoint.x >= NSHeight([self frameOfCellAtColumn:0 row:row])) 
     541                                 [self selectRowIndexes:[NSIndexSet indexSetWithIndex:row] byExtendingSelection:NO];  
     542                         break; 
    537543                case NSLeftMouseDragged: 
    538544                        [super mouseDown:theEvent]; 
     
    761767} 
    762768 
     769#pragma mark Accessibility 
     770- (NSArray *)accessibilityAttributeNames 
     771{ 
     772        AILogWithSignature(@"names: %@", [super accessibilityAttributeNames]); 
     773        return [super accessibilityAttributeNames]; 
     774} 
     775 
     776- (id)accessibilityAttributeValue:(NSString *)attribute 
     777{ 
     778        AILogWithSignature(@"%@ -> %@", attribute, [super accessibilityAttributeValue:attribute]); 
     779        return [super accessibilityAttributeValue:attribute]; 
     780         
     781} 
     782 
    763783@end 
    764784