1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2024-12-25 09:13:06 +00:00

if pushing a button, don't allow a double-click to toggle the inspector

This commit is contained in:
Mitchell Livingston 2008-01-22 05:33:02 +00:00
parent 055d067d7e
commit 264bf866a5
2 changed files with 7 additions and 6 deletions

View file

@ -258,8 +258,8 @@
if (NSMouseInRect(point, [self controlButtonRectForBounds: cellFrame], [controlView isFlipped])
|| NSMouseInRect(point, [self revealButtonRectForBounds: cellFrame], [controlView isFlipped])
|| NSMouseInRect(point, [self progressRectForBounds: cellFrame], [controlView isFlipped])
|| NSMouseInRect(point, [self minimalStatusRectForBounds: cellFrame], [controlView isFlipped]))
|| NSMouseInRect(point, [self progressRectForBounds: cellFrame], [controlView isFlipped])
|| NSMouseInRect(point, [self minimalStatusRectForBounds: cellFrame], [controlView isFlipped]))
return NSCellHitContentArea | NSCellHitTrackableArea;
return NSCellHitContentArea;

View file

@ -215,9 +215,11 @@
{
NSPoint point = [self convertPoint: [event locationInWindow] fromView: nil];
BOOL pushed = [self pointInControlRect: point] || [self pointInRevealRect: point] || [self pointInActionRect: point]
|| [self pointInProgressRect: point] || [self pointInMinimalStatusRect: point];
//if pushing a button, don't change the selected rows
if ([self pointInControlRect: point] || [self pointInRevealRect: point] || [self pointInActionRect: point]
|| [self pointInProgressRect: point] || [self pointInMinimalStatusRect: point])
if (pushed)
fSelectedTorrents = [[fTorrents objectsAtIndexes: [self selectedRowIndexes]] retain];
[super mouseDown: event];
@ -238,7 +240,7 @@
fActionPushedRow = -1;
[self setNeedsDisplayInRect: [self rectOfRow: row]];
}
else if ([event clickCount] == 2) //double click
else if (!pushed && [event clickCount] == 2) //double click
[fController showInfo: nil];
else;
}
@ -613,7 +615,6 @@
return NSPointInRect(point, [cell progressRectForBounds: [self frameOfCellAtColumn: 0 row: row]]);
}
#warning remove
- (BOOL) pointInMinimalStatusRect: (NSPoint) point
{
int row = [self rowAtPoint: point];