1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2024-12-26 09:37:56 +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]) if (NSMouseInRect(point, [self controlButtonRectForBounds: cellFrame], [controlView isFlipped])
|| NSMouseInRect(point, [self revealButtonRectForBounds: cellFrame], [controlView isFlipped]) || NSMouseInRect(point, [self revealButtonRectForBounds: cellFrame], [controlView isFlipped])
|| NSMouseInRect(point, [self progressRectForBounds: cellFrame], [controlView isFlipped]) || NSMouseInRect(point, [self progressRectForBounds: cellFrame], [controlView isFlipped])
|| NSMouseInRect(point, [self minimalStatusRectForBounds: cellFrame], [controlView isFlipped])) || NSMouseInRect(point, [self minimalStatusRectForBounds: cellFrame], [controlView isFlipped]))
return NSCellHitContentArea | NSCellHitTrackableArea; return NSCellHitContentArea | NSCellHitTrackableArea;
return NSCellHitContentArea; return NSCellHitContentArea;

View file

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