Adium

Changeset 23987

Show
Ignore:
Timestamp:
06/14/2008 09:39:39 PM (6 months ago)
Author:
zacw
Message:

Revert part of [23278] to allow all outline views to expand or collapse based on where we think the disclosure arrow is. Fixes #10027. This exacerbates the problem of meta contacts expanding in the contact list with a single click on the left side, refs #9979.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/Frameworks/AIUtilities Framework/Source/AIVariableHeightOutlineView.m

    r23279 r23987  
    7373        [super dealloc]; 
    7474} 
     75 
     76//Handle mouseDown events to toggle expandable items when they are clicked  
     77- (void)mouseDown:(NSEvent *)theEvent  
     78{  
     79        NSPoint viewPoint = [self convertPoint:[theEvent locationInWindow] fromView:nil];  
     80        int             row = [self rowAtPoint:viewPoint];  
     81        id              item = [self itemAtRow:row];  
     82         
     83        //Expand/Collapse groups on mouse DOWN instead of mouse up (Makes it feel a ton faster)  
     84        if ((item) &&  
     85                ([self isExpandable:item]) &&  
     86                (viewPoint.x < [self frameOfCellAtColumn:0 row:row].size.height)) {  
     87                //XXX - This is kind of a hack.  We need to check < WidthOfDisclosureTriangle, and are using the fact that  
     88                //      the disclosure width is about the same as the height of the row to fudge it. -ai  
     89                 
     90                if ([self isItemExpanded:item]) {  
     91                        [self collapseItem:item];  
     92                } else {  
     93                        [self expandItem:item];  
     94                }  
     95        } else {  
     96                [super mouseDown:theEvent];  
     97        }  
     98}  
    7599 
    76100//Row height cache -----------------------------------------------------------------------------------------------------