forked from laullon/gitx
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPBFileChangesTableView.m
More file actions
33 lines (27 loc) · 870 Bytes
/
PBFileChangesTableView.m
File metadata and controls
33 lines (27 loc) · 870 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
//
// PBFileChangesTableView.m
// GitX
//
// Created by Pieter de Bie on 09-10-08.
// Copyright 2008 Pieter de Bie. All rights reserved.
//
#import "PBFileChangesTableView.h"
#import "PBGitIndexController.h"
@implementation PBFileChangesTableView
#pragma mark NSTableView overrides
- (NSMenu *)menuForEvent:(NSEvent *)theEvent
{
if ([self delegate]) {
NSPoint eventLocation = [self convertPoint: [theEvent locationInWindow] fromView: nil];
NSInteger rowIndex = [self rowAtPoint:eventLocation];
[self selectRowIndexes:[NSIndexSet indexSetWithIndex:rowIndex] byExtendingSelection:TRUE];
// TODO: Fix the coupling so we don't need the cast (at least).
return [(PBGitIndexController*)[self delegate] menuForTable: self];
}
return nil;
}
- (NSDragOperation) draggingSourceOperationMaskForLocal:(BOOL) local
{
return NSDragOperationEvery;
}
@end