From 4832f3b59f45f4bc04814b33c68e5fe7b6c9d10a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Berg?= Date: Wed, 24 Mar 2010 09:02:45 +0100 Subject: [PATCH] Code cleanup: Remove unneeded #imports, empty methods, declare id return type when left out, commit irrelevant whitespace flagged as change. --- PBCommitList.m | 4 ++-- PBGitConfig.h | 4 ++-- PBGitConfig.m | 4 ++-- PBGitRepository.m | 2 -- PBGitSidebarController.m | 2 +- PBRefController.m | 1 - PBViewController.h | 1 - PBViewController.m | 4 ---- 8 files changed, 7 insertions(+), 15 deletions(-) diff --git a/PBCommitList.m b/PBCommitList.m index e2f6f23..17c01c9 100644 --- a/PBCommitList.m +++ b/PBCommitList.m @@ -21,13 +21,13 @@ - (void)keyDown:(NSEvent *)event { NSString* character = [event charactersIgnoringModifiers]; - + // Pass on command-shift up/down to the responder. We want the splitview to capture this. if ([event modifierFlags] & NSShiftKeyMask && [event modifierFlags] & NSCommandKeyMask && ([event keyCode] == 0x7E || [event keyCode] == 0x7D)) { [self.nextResponder keyDown:event]; return; } - + if ([character isEqualToString:@" "]) { if (controller.selectedCommitDetailsIndex == 0) { if ([event modifierFlags] & NSShiftKeyMask) diff --git a/PBGitConfig.h b/PBGitConfig.h index 7ceedee..24b1197 100644 --- a/PBGitConfig.h +++ b/PBGitConfig.h @@ -14,6 +14,6 @@ NSString *repositoryPath; } @property (copy) NSString *repositoryPath; -- init; -- initWithRepositoryPath:(NSString *)path; +- (id) init; +- (id) initWithRepositoryPath:(NSString *)path; @end diff --git a/PBGitConfig.m b/PBGitConfig.m index ef1d88e..41ead58 100644 --- a/PBGitConfig.m +++ b/PBGitConfig.m @@ -12,13 +12,13 @@ @implementation PBGitConfig @synthesize repositoryPath; -- init +- (id) init { repositoryPath = nil; return self; } -- initWithRepositoryPath:(NSString *)path +- (id) initWithRepositoryPath:(NSString *)path { repositoryPath = path; return self; diff --git a/PBGitRepository.m b/PBGitRepository.m index b296cea..046e4e5 100644 --- a/PBGitRepository.m +++ b/PBGitRepository.m @@ -250,8 +250,6 @@ static NSString * repositoryBasePath = nil; - (void) reloadRefs { _headRef = nil; - BOOL ret = NO; - refs = [NSMutableDictionary dictionary]; NSMutableArray *oldBranches = [branches mutableCopy]; diff --git a/PBGitSidebarController.m b/PBGitSidebarController.m index 4da2d8c..ad2e872 100644 --- a/PBGitSidebarController.m +++ b/PBGitSidebarController.m @@ -42,7 +42,7 @@ - (void)awakeFromNib { [super awakeFromNib]; - window.contentView = self.view; + window.contentView = [self view]; [self populateList]; historyViewController = [[PBGitHistoryController alloc] initWithRepository:repository superController:superController]; diff --git a/PBRefController.m b/PBRefController.m index 7ff03ad..62ae714 100644 --- a/PBRefController.m +++ b/PBRefController.m @@ -9,7 +9,6 @@ #import "PBRefController.h" #import "PBGitRevisionCell.h" #import "PBRefMenuItem.h" -#import "KBPopUpToolbarItem.h" #import "PBCreateBranchSheet.h" #import "PBCreateTagSheet.h" #import "PBGitDefaults.h" diff --git a/PBViewController.h b/PBViewController.h index 95bf239..5992196 100644 --- a/PBViewController.h +++ b/PBViewController.h @@ -28,5 +28,4 @@ - (NSResponder *)firstResponder; - (IBAction) refresh:(id)sender; -- (IBAction) refresh:(id)sender; @end diff --git a/PBViewController.m b/PBViewController.m index a540e64..a8b71bc 100644 --- a/PBViewController.m +++ b/PBViewController.m @@ -43,10 +43,6 @@ { } -- (IBAction) refresh: sender -{ -} - - (NSResponder *)firstResponder; { return nil;