diff --git a/PBCLIProxy.mm b/PBCLIProxy.mm index 479b7ec..06ff01a 100644 --- a/PBCLIProxy.mm +++ b/PBCLIProxy.mm @@ -53,11 +53,11 @@ if ([arguments count] > 0 && ([[arguments objectAtIndex:0] isEqualToString:@"--commit"] || [[arguments objectAtIndex:0] isEqualToString:@"-c"])) - [((PBGitWindowController *)document.windowController) showCommitView:self]; + [document.windowController showCommitView:self]; else { PBGitRevSpecifier* rev = [[PBGitRevSpecifier alloc] initWithParameters:arguments]; document.currentBranch = [document addBranch: rev]; - [(PBGitWindowController *)document.windowController showHistoryView:self]; + [document.windowController showHistoryView:self]; } [NSApp activateIgnoringOtherApps:YES]; diff --git a/PBCommitList.h b/PBCommitList.h index 1e721b8..069aeae 100644 --- a/PBCommitList.h +++ b/PBCommitList.h @@ -10,9 +10,11 @@ #import #import "PBGitHistoryController.h" +@class PBWebHistoryController; + @interface PBCommitList : NSTableView { IBOutlet WebView* webView; - IBOutlet id webController; + IBOutlet PBWebHistoryController *webController; IBOutlet PBGitHistoryController *controller; NSPoint mouseDownPoint; diff --git a/PBCommitList.m b/PBCommitList.m index 06c5ec8..abd1e34 100644 --- a/PBCommitList.m +++ b/PBCommitList.m @@ -30,7 +30,7 @@ [webView scrollPageDown: self]; } else if ([character rangeOfCharacterFromSet:[NSCharacterSet characterSetWithCharactersInString:@"jkcv"]].location == 0) - [((PBWebHistoryController *)webController) sendKey: character]; + [webController sendKey: character]; else [super keyDown: event]; } diff --git a/PBFileChangesTableView.m b/PBFileChangesTableView.m index 3bded2e..629cd4a 100644 --- a/PBFileChangesTableView.m +++ b/PBFileChangesTableView.m @@ -15,7 +15,7 @@ - (NSMenu *)menuForEvent:(NSEvent *)theEvent { if ([self delegate]) - return [(PBGitIndexController *)[self delegate] menuForTable: self]; + return [[self delegate] menuForTable: self]; return nil; } diff --git a/PBGitCommitController.h b/PBGitCommitController.h index 31f3419..a099368 100644 --- a/PBGitCommitController.h +++ b/PBGitCommitController.h @@ -9,7 +9,9 @@ #import #import "PBViewController.h" +@class PBGitIndexController; @class PBIconAndTextCell; +@class PBWebChangesController; @interface PBGitCommitController : PBViewController { NSMutableArray *files; @@ -18,8 +20,8 @@ IBOutlet NSArrayController *unstagedFilesController; IBOutlet NSArrayController *cachedFilesController; - IBOutlet id indexController; - IBOutlet id webController; + IBOutlet PBGitIndexController *indexController; + IBOutlet PBWebChangesController *webController; NSString *status; diff --git a/PBGitCommitController.m b/PBGitCommitController.m index 10c5bf1..9297ca6 100644 --- a/PBGitCommitController.m +++ b/PBGitCommitController.m @@ -34,7 +34,7 @@ } - (void) removeView { - [(PBWebChangesController *)webController closeView]; + [webController closeView]; [super finalize]; } @@ -325,8 +325,8 @@ if (ret) return [self commitFailedBecause:@"Could not update HEAD"]; - [(PBWebChangesController *)webController setStateMessage:[NSString stringWithFormat:@"Successfully created commit %@", commit]]; - + [webController setStateMessage:[NSString stringWithFormat:@"Successfully created commit %@", commit]]; + repository.hasChanged = YES; self.busy--; [commitMessageView setString:@""]; diff --git a/PBGitRepository.h b/PBGitRepository.h index 6f109d2..7524705 100644 --- a/PBGitRepository.h +++ b/PBGitRepository.h @@ -13,6 +13,8 @@ extern NSString* PBGitRepositoryErrorDomain; +@class PBGitWindowController; + @interface PBGitRepository : NSDocument { PBGitRevList* revisionList; PBGitConfig *config; @@ -58,7 +60,7 @@ extern NSString* PBGitRepositoryErrorDomain; - (void) setup; @property (assign) BOOL hasChanged; -@property (readonly) NSWindowController *windowController; +@property (readonly) PBGitWindowController *windowController; @property (readonly) PBGitConfig *config; @property (retain) PBGitRevList* revisionList; @property (assign) NSMutableArray* branches; diff --git a/PBGitRepository.m b/PBGitRepository.m index e59b129..e5df5cf 100644 --- a/PBGitRepository.m +++ b/PBGitRepository.m @@ -174,7 +174,7 @@ NSString* PBGitRepositoryErrorDomain = @"GitXErrorDomain"; #endif } -- (NSWindowController *)windowController +- (PBGitWindowController *)windowController { if ([[self windowControllers] count] == 0) return NULL;