mirror of
https://github.com/kennethreitz-archive/gitx.git
synced 2026-06-05 23:40:18 +00:00
@@ -18,7 +18,8 @@
|
||||
NSPoint eventLocation = [self convertPoint: [theEvent locationInWindow] fromView: nil];
|
||||
NSInteger rowIndex = [self rowAtPoint:eventLocation];
|
||||
[self selectRowIndexes:[NSIndexSet indexSetWithIndex:rowIndex] byExtendingSelection:TRUE];
|
||||
return [[self delegate] menuForTable: self];
|
||||
// TODO: Fix the coupling so we don't need the cast (at least).
|
||||
return [(PBGitIndexController*)[self delegate] menuForTable: self];
|
||||
}
|
||||
|
||||
return nil;
|
||||
|
||||
@@ -170,7 +170,7 @@
|
||||
{
|
||||
[commitMessageView setEditable:YES];
|
||||
[commitMessageView setString:@""];
|
||||
[webController setStateMessage:[NSString stringWithFormat:[[notification userInfo] objectForKey:@"description"]]];
|
||||
[webController setStateMessage:[NSString stringWithString:[[notification userInfo] objectForKey:@"description"]]];
|
||||
[repository reloadRefs];
|
||||
}
|
||||
|
||||
|
||||
@@ -88,6 +88,7 @@ static NSString * PBStringFromBranchFilterType(PBGitXBranchFilterType type) {
|
||||
|
||||
- (NSFileHandle*) handleForCommand:(NSString*) cmd;
|
||||
- (NSFileHandle*) handleForArguments:(NSArray*) args;
|
||||
- (NSFileHandle*) handleInWorkDirForArguments:(NSArray *)args;
|
||||
- (NSFileHandle *) handleInWorkDirForArguments:(NSArray *)args;
|
||||
- (NSString*) outputForCommand:(NSString*) cmd;
|
||||
- (NSString *)outputForCommand:(NSString *)str retValue:(int *)ret;
|
||||
|
||||
+1
-1
@@ -33,7 +33,7 @@
|
||||
NSPoint point = [self.controlView convertPoint:[event locationInWindow] fromView:nil];
|
||||
NSInteger row = [view rowAtPoint:point];
|
||||
|
||||
PBGitSidebarController *controller = [view delegate];
|
||||
PBGitSidebarController *controller = (PBGitSidebarController*)[view delegate];
|
||||
|
||||
return [controller menuForRow:row];
|
||||
}
|
||||
|
||||
+4
-2
@@ -9,6 +9,8 @@
|
||||
#import <Cocoa/Cocoa.h>
|
||||
#import <WebKit/WebKit.h>
|
||||
|
||||
#import "PBGitRepository.h"
|
||||
|
||||
@interface PBWebController : NSObject {
|
||||
IBOutlet WebView* view;
|
||||
NSString *startFile;
|
||||
@@ -18,11 +20,11 @@
|
||||
NSMapTable *callbacks;
|
||||
|
||||
// For the repository access
|
||||
IBOutlet id repository;
|
||||
IBOutlet PBGitRepository *repository;
|
||||
}
|
||||
|
||||
@property (retain) NSString *startFile;
|
||||
@property (retain) id repository;
|
||||
@property (retain) PBGitRepository *repository;
|
||||
|
||||
- (WebScriptObject *) script;
|
||||
- (void) closeView;
|
||||
|
||||
@@ -122,7 +122,7 @@
|
||||
[[view windowScriptObject] callWebScriptMethod:@"showCommit" withArguments:[NSArray arrayWithObject:html]];
|
||||
|
||||
#ifdef DEBUG_BUILD
|
||||
NSString *dom=[[[[view mainFrame] DOMDocument] documentElement] outerHTML];
|
||||
NSString *dom=[(DOMHTMLElement*)[[[view mainFrame] DOMDocument] documentElement] outerHTML];
|
||||
NSString *tmpFile=@"~/tmp/test2.html";
|
||||
[dom writeToFile:[tmpFile stringByExpandingTildeInPath] atomically:true encoding:NSUTF8StringEncoding error:nil];
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user