mirror of
https://github.com/kennethreitz-archive/gitx.git
synced 2026-06-05 15:30:18 +00:00
34 lines
870 B
Objective-C
34 lines
870 B
Objective-C
//
|
|
// 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
|