Add context menu to file table

This commit is contained in:
Mitchell Livingston
2006-06-16 00:04:29 +00:00
parent d7388093b6
commit efb73e8b5b
6 changed files with 33 additions and 9 deletions

View File

@@ -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