Skip to content

Commit 009affe

Browse files
committed
Merge pull request brotherbard#68 from RomainMuller/small_fixes
Small fixes
2 parents 22e4f18 + c1b3658 commit 009affe

File tree

6 files changed

+10
-6
lines changed

6 files changed

+10
-6
lines changed

PBFileChangesTableView.m

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ - (NSMenu *)menuForEvent:(NSEvent *)theEvent
1818
NSPoint eventLocation = [self convertPoint: [theEvent locationInWindow] fromView: nil];
1919
NSInteger rowIndex = [self rowAtPoint:eventLocation];
2020
[self selectRowIndexes:[NSIndexSet indexSetWithIndex:rowIndex] byExtendingSelection:TRUE];
21-
return [[self delegate] menuForTable: self];
21+
// TODO: Fix the coupling so we don't need the cast (at least).
22+
return [(PBGitIndexController*)[self delegate] menuForTable: self];
2223
}
2324

2425
return nil;

PBGitCommitController.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ - (void)commitFinished:(NSNotification *)notification
170170
{
171171
[commitMessageView setEditable:YES];
172172
[commitMessageView setString:@""];
173-
[webController setStateMessage:[NSString stringWithFormat:[[notification userInfo] objectForKey:@"description"]]];
173+
[webController setStateMessage:[NSString stringWithString:[[notification userInfo] objectForKey:@"description"]]];
174174
[repository reloadRefs];
175175
}
176176

PBGitRepository.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ static NSString * PBStringFromBranchFilterType(PBGitXBranchFilterType type) {
8888

8989
- (NSFileHandle*) handleForCommand:(NSString*) cmd;
9090
- (NSFileHandle*) handleForArguments:(NSArray*) args;
91+
- (NSFileHandle*) handleInWorkDirForArguments:(NSArray *)args;
9192
- (NSFileHandle *) handleInWorkDirForArguments:(NSArray *)args;
9293
- (NSString*) outputForCommand:(NSString*) cmd;
9394
- (NSString *)outputForCommand:(NSString *)str retValue:(int *)ret;

PBSourceViewCell.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ - (NSMenu *) menuForEvent:(NSEvent *)event inRect:(NSRect)rect ofView:(NSOutline
3333
NSPoint point = [self.controlView convertPoint:[event locationInWindow] fromView:nil];
3434
NSInteger row = [view rowAtPoint:point];
3535

36-
PBGitSidebarController *controller = [view delegate];
36+
PBGitSidebarController *controller = (PBGitSidebarController*)[view delegate];
3737

3838
return [controller menuForRow:row];
3939
}

PBWebController.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
#import <Cocoa/Cocoa.h>
1010
#import <WebKit/WebKit.h>
1111

12+
#import "PBGitRepository.h"
13+
1214
@interface PBWebController : NSObject {
1315
IBOutlet WebView* view;
1416
NSString *startFile;
@@ -18,11 +20,11 @@
1820
NSMapTable *callbacks;
1921

2022
// For the repository access
21-
IBOutlet id repository;
23+
IBOutlet PBGitRepository *repository;
2224
}
2325

2426
@property (retain) NSString *startFile;
25-
@property (retain) id repository;
27+
@property (retain) PBGitRepository *repository;
2628

2729
- (WebScriptObject *) script;
2830
- (void) closeView;

PBWebHistoryController.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ - (void)commitDetailsLoaded:(NSNotification *)notification
122122
[[view windowScriptObject] callWebScriptMethod:@"showCommit" withArguments:[NSArray arrayWithObject:html]];
123123

124124
#ifdef DEBUG_BUILD
125-
NSString *dom=[[[[view mainFrame] DOMDocument] documentElement] outerHTML];
125+
NSString *dom=[(DOMHTMLElement*)[[[view mainFrame] DOMDocument] documentElement] outerHTML];
126126
NSString *tmpFile=@"~/tmp/test2.html";
127127
[dom writeToFile:[tmpFile stringByExpandingTildeInPath] atomically:true encoding:NSUTF8StringEncoding error:nil];
128128
#endif

0 commit comments

Comments
 (0)