mirror of
https://github.com/transmission/transmission.git
synced 2025-12-24 12:28:52 +00:00
Add context menu to file table
This commit is contained in:
@@ -32,4 +32,20 @@
|
||||
[super mouseDown: event];
|
||||
}
|
||||
|
||||
- (NSMenu *) menuForEvent: (NSEvent *) e
|
||||
{
|
||||
int row = [self rowAtPoint: [self convertPoint: [e locationInWindow] fromView: nil]];
|
||||
|
||||
if (row >= 0)
|
||||
{
|
||||
if (![self isRowSelected: row])
|
||||
[self selectRowIndexes: [NSIndexSet indexSetWithIndex: row]
|
||||
byExtendingSelection: NO];
|
||||
}
|
||||
else
|
||||
[self deselectAll: self];
|
||||
|
||||
return fContextMenu;
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
Reference in New Issue
Block a user