From: Nathan Kinsinger <[email protected]>
- add missing return types
- add public method declarations to headers
- remove private method declarations from headers
- create class extensions to declare private methods
---
ApplicationController.m | 2 +-
PBGitCommit.h | 2 +-
PBGitCommit.m | 2 +-
PBGitConfig.h | 4 ++--
PBGitConfig.m | 13 ++++++++++---
PBGitHistoryController.m | 8 ++++++++
PBGitIndexController.m | 5 +++++
PBGitRepository.h | 1 -
PBGitRepository.m | 10 ++++++++++
PBGitRevList.h | 2 +-
PBGitRevList.mm | 8 ++++++++
PBGitRevisionCell.m | 15 +++++++++++++++
PBGitTree.m | 15 ++++++++++++++-
PBRefController.h | 6 ++++++
PBRefController.m | 8 ++++++++
PBWebChangesController.m | 11 +++++++++++
PBWebHistoryController.m | 14 +++++++++++++-
17 files changed, 114 insertions(+), 12 deletions(-)
diff --git a/ApplicationController.m b/ApplicationController.m
index 3bc6724..3649c3c 100644
--- a/ApplicationController.m
+++ b/ApplicationController.m
@@ -20,7 +20,7 @@
@implementation ApplicationController
@synthesize cliProxy;
-- (ApplicationController*)init
+- (id) init
{
#ifdef DEBUG_BUILD
[NSApp activateIgnoringOtherApps:YES];
diff --git a/PBGitCommit.h b/PBGitCommit.h
index 9a7832e..b517411 100644
--- a/PBGitCommit.h
+++ b/PBGitCommit.h
@@ -28,7 +28,7 @@
PBGitRepository* repository;
}
-- initWithRepository:(PBGitRepository *)repo andSha:(git_oid)sha;
+- (id) initWithRepository:(PBGitRepository *)repo andSha:(git_oid)sha;
- (void)addRef:(PBGitRef *)ref;
- (void)removeRef:(id)ref;
diff --git a/PBGitCommit.m b/PBGitCommit.m
index 9ebe3b5..fabc588 100644
--- a/PBGitCommit.m
+++ b/PBGitCommit.m
@@ -50,7 +50,7 @@ - (git_oid *)sha
return &sha;
}
-- initWithRepository:(PBGitRepository*) repo andSha:(git_oid)newSha
+- (id) initWithRepository:(PBGitRepository*) repo andSha:(git_oid)newSha
{
details = nil;
repository = repo;
diff --git a/PBGitConfig.h b/PBGitConfig.h
index 9875a3c..902f285 100644
--- a/PBGitConfig.h
+++ b/PBGitConfig.h
@@ -14,6 +14,6 @@
NSString *repositoryPath;
}
-- init;
-- initWithRepository:(NSString *)path;
+- (id) init;
+- (id) initWithRepository:(NSString *)path;
@end
diff --git a/PBGitConfig.m b/PBGitConfig.m
index 9166cc4..0ec363c 100644
--- a/PBGitConfig.m
+++ b/PBGitConfig.m
@@ -9,15 +9,22 @@
#import "PBGitConfig.h"
+...@interface PBGitConfig ()
+
+- (void) writeValue:(NSString *)value forKey:(NSString *)key
global:(BOOL)global;
+
+...@end
+
+
@implementation PBGitConfig
-- init
+- (id) init
{
repositoryPath = nil;
return self;
}
-- initWithRepository:(NSString *)path
+- (id) initWithRepository:(NSString *)path
{
repositoryPath = path;
return self;
@@ -45,7 +52,7 @@ - (void) writeValue:(NSString *)value forKey:(NSString *)key
global:(BOOL)global
[self didChangeValueForKey:[key substringToIndex:[key
rangeOfString:@"."].location]];
}
-- valueForKeyPath:(NSString *)path
+- (NSString *) valueForKeyPath:(NSString *)path
{
NSMutableArray *arguments = [NSMutableArray array];
if (repositoryPath)
diff --git a/PBGitHistoryController.m b/PBGitHistoryController.m
index a9fde36..2e967e5 100644
--- a/PBGitHistoryController.m
+++ b/PBGitHistoryController.m
@@ -14,6 +14,14 @@
#define QLPreviewPanel NSClassFromString(@"QLPreviewPanel")
+...@interface PBGitHistoryController ()
+
+- (void) updateKeys;
+- (BOOL) hasNonlinearPath;
+
+...@end
+
+
@implementation PBGitHistoryController
@synthesize selectedTab, webCommit, rawCommit, gitTree, commitController;
diff --git a/PBGitIndexController.m b/PBGitIndexController.m
index d72e8bc..88fc893 100644
--- a/PBGitIndexController.m
+++ b/PBGitIndexController.m
@@ -13,10 +13,15 @@
#define FileChangesTableViewType @"GitFileChangedType"
+
@interface PBGitIndexController ()
+
- (void)discardChangesForFiles:(NSArray *)files force:(BOOL)force;
+- (void) discardChangesForFilesAlertDidEnd:(NSAlert *)alert
returnCode:(NSInteger)returnCode contextInfo:(void *)contextInfo;
+
@end
+
@implementation PBGitIndexController
- (void)awakeFromNib
diff --git a/PBGitRepository.h b/PBGitRepository.h
index 93c38c9..f6218df 100644
--- a/PBGitRepository.h
+++ b/PBGitRepository.h
@@ -63,7 +63,6 @@ extern NSString* PBGitRepositoryErrorDomain;
+ (NSURL*)baseDirForURL:(NSURL*)repositoryURL;
- (id) initWithURL: (NSURL*) path;
-- (void) setup;
@property (assign) BOOL hasChanged;
@property (readonly) PBGitWindowController *windowController;
diff --git a/PBGitRepository.m b/PBGitRepository.m
index 821cd2a..f6c4075 100644
--- a/PBGitRepository.m
+++ b/PBGitRepository.m
@@ -18,6 +18,16 @@
NSString* PBGitRepositoryErrorDomain = @"GitXErrorDomain";
+
+...@interface PBGitRepository ()
+
++ (BOOL) isBareRepository:(NSString *)path;
+
+- (void) setup;
+
+...@end
+
+
@implementation PBGitRepository
@synthesize revisionList, branches, currentBranch, refs, hasChanged, config;
diff --git a/PBGitRevList.h b/PBGitRevList.h
index 42bc82a..833fac5 100644
--- a/PBGitRevList.h
+++ b/PBGitRevList.h
@@ -16,7 +16,7 @@
NSString* lastSha;
}
-- initWithRepository:(PBGitRepository *)repo;
+- (id) initWithRepository:(PBGitRepository *)repo;
- (void) readCommitsForce: (BOOL) force;
- (void) reload;
diff --git a/PBGitRevList.mm b/PBGitRevList.mm
index ca3704f..44c58bd 100644
--- a/PBGitRevList.mm
+++ b/PBGitRevList.mm
@@ -20,6 +20,14 @@
using namespace std;
+
+...@interface PBGitRevList ()
+
+- (void) walkRevisionListWithSpecifier:(PBGitRevSpecifier *)rev;
+
+...@end
+
+
@implementation PBGitRevList
@synthesize commits;
diff --git a/PBGitRevisionCell.m b/PBGitRevisionCell.m
index 98f978b..0079d51 100644
--- a/PBGitRevisionCell.m
+++ b/PBGitRevisionCell.m
@@ -10,6 +10,21 @@
#import "PBGitRef.h"
#import "RoundedRectangle.h"
+
+...@interface PBGitRevisionCell ()
+
+- (NSArray *) colors;
+- (void) drawLineFromColumn:(int)from toColumn:(int)to inRect:(NSRect)r
offset:(int)offset color:(int)c;
+- (void) drawCircleInRect:(NSRect)r;
+- (void) drawTriangleInRect:(NSRect)r sign:(char)sign;
+- (NSMutableDictionary *) attributesForRefLabelSelected:(BOOL)selected;
+- (NSColor *) colorForRef:(PBGitRef *)ref;
+- (NSArray *) rectsForRefsinRect:(NSRect)rect;
+- (void) drawRefsInRect:(NSRect *)refRect;
+
+...@end
+
+
@implementation PBGitRevisionCell
diff --git a/PBGitTree.m b/PBGitTree.m
index c8003d1..24ceaf6 100644
--- a/PBGitTree.m
+++ b/PBGitTree.m
@@ -12,6 +12,19 @@
#import "PBEasyPipe.h"
#import "PBEasyFS.h"
+
+...@interface PBGitTree ()
+
+- (NSString *) refSpec;
+- (BOOL) isLocallyCached;
+- (BOOL) hasBinaryHeader:(NSString *)contents;
+- (BOOL) hasBinaryAttributes;
+- (NSString *) textContents;
+- (NSString *) tmpDirWithContents;
+
+...@end
+
+
@implementation PBGitTree
@synthesize sha, path, repository, leaf, parent;
@@ -38,7 +51,7 @@ + (PBGitTree*) treeForTree: (PBGitTree*) prev andPath:
(NSString*) path;
return tree;
}
-- init
+- (id) init
{
children = nil;
localFileName = nil;
diff --git a/PBRefController.h b/PBRefController.h
index 0706fc5..ec967d6 100644
--- a/PBRefController.h
+++ b/PBRefController.h
@@ -13,6 +13,8 @@
#import "PBGitCommit.h"
#import "PBRefContextDelegate.h"
+...@class PBRefMenuItem;
+
@interface PBRefController : NSObject <PBRefContextDelegate> {
IBOutlet __weak PBGitHistoryController *historyController;
IBOutlet NSArrayController *commitController;
@@ -25,6 +27,10 @@
IBOutlet NSPopUpButton *branchPopUp;
}
+- (void) removeRef:(PBRefMenuItem *)sender;
+- (void) checkoutRef:(PBRefMenuItem *)sender;
+- (void) tagInfo:(PBRefMenuItem *)sender;
+
- (IBAction)addRef:(id)sender;
- (IBAction)closeSheet:(id) sender;
- (IBAction)saveSheet:(id) sender;
diff --git a/PBRefController.m b/PBRefController.m
index 7c1ac62..8a0095e 100644
--- a/PBRefController.m
+++ b/PBRefController.m
@@ -10,6 +10,14 @@
#import "PBGitRevisionCell.h"
#import "PBRefMenuItem.h"
+
+...@interface PBRefController ()
+
+- (void) removeRefSheetDidEnd:(NSWindow *)sheet returnCode:(int)returnCode
contextInfo:(void *)contextInfo;
+
+...@end
+
+
@implementation PBRefController
- (void)awakeFromNib
diff --git a/PBWebChangesController.m b/PBWebChangesController.m
index 3216725..ffdab87 100644
--- a/PBWebChangesController.m
+++ b/PBWebChangesController.m
@@ -10,6 +10,17 @@
#import "PBGitIndexController.h"
#import "PBGitIndex.h"
+
+...@interface PBWebChangesController ()
+
+- (void) stageHunk:(NSString *)hunk reverse:(BOOL)reverse;
+- (void) discardHunk:(NSString *)hunk;
+- (void) discardHunkAlertDidEnd:(NSAlert *)alert
returnCode:(NSInteger)returnCode contextInfo:(void *)contextInfo;
+- (void) discardHunk:(NSString *)hunk altKey:(BOOL)altKey;
+
+...@end
+
+
@implementation PBWebChangesController
- (void) awakeFromNib
diff --git a/PBWebHistoryController.m b/PBWebHistoryController.m
index 1934b73..397dda5 100644
--- a/PBWebHistoryController.m
+++ b/PBWebHistoryController.m
@@ -9,6 +9,18 @@
#import "PBWebHistoryController.h"
#import "PBGitDefaults.h"
+
+...@interface PBWebHistoryController ()
+
+- (void) commitDetailsLoaded:(NSNotification *)notification;
+- (void) selectCommit:(NSString *)sha;
+- (void) copySource;
+- (NSString *) getConfig:(NSString *)config;
+- (void) preferencesChanged;
+
+...@end
+
+
@implementation PBWebHistoryController
@synthesize diff;
@@ -139,7 +151,7 @@ - (void)webView:(WebView *)sender
decidePolicyForNewWindowAction:(NSDictionary
[[NSWorkspace sharedWorkspace] openURL:[request URL]];
}
-- getConfig:(NSString *)config
+- (NSString *) getConfig:(NSString *)config
{
return [historyController valueForKeyPath:[@"repository.config."
stringByAppendingString:config]];
}
--
1.7.0
To unsubscribe from this group, send email to gitx+unsubscribegooglegroups.com
or reply to this email with the words "REMOVE ME" as the subject.