Merge pull request #68 from RomainMuller/small_fixes

Small fixes
This commit is contained in:
German Laullon
2011-05-19 11:56:24 -07:00
6 changed files with 10 additions and 6 deletions
+2 -1
View File
@@ -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;
+1 -1
View File
@@ -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];
}
+1
View File
@@ -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
View File
@@ -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
View File
@@ -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;
+1 -1
View File
@@ -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