Skip to content
Open
4 changes: 2 additions & 2 deletions Classes/Controllers/OpenRecentController.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@


@interface OpenRecentController : NSWindowController<NSTableViewDataSource, NSTableViewDelegate> {
IBOutlet NSSearchField* searchField;
IBOutlet __weak NSSearchField* searchField;
NSURL* selectedResult;
IBOutlet NSTableView* resultViewer;
IBOutlet __weak NSTableView* resultViewer;
}

@property (strong) NSMutableArray* currentResults;
Expand Down
7 changes: 4 additions & 3 deletions Classes/Controllers/PBGitCommitController.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,15 @@
// object sometime
PBGitIndex *index;

IBOutlet NSTextView *commitMessageView;
IBOutlet __unsafe_unretained NSTextView *commitMessageView;
IBOutlet __weak NSButton *commitButton;
IBOutlet __weak PBNiceSplitView *commitSplitView;

IBOutlet NSArrayController *unstagedFilesController;
IBOutlet NSArrayController *cachedFilesController;
IBOutlet NSButton *commitButton;

IBOutlet PBGitIndexController *indexController;
IBOutlet PBWebChangesController *webController;
IBOutlet PBNiceSplitView *commitSplitView;
}

@property(readonly) PBGitIndex *index;
Expand Down
28 changes: 14 additions & 14 deletions Classes/Controllers/PBGitHistoryController.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,29 +25,29 @@

@interface PBGitHistoryController : PBViewController {
IBOutlet PBRefController *refController;
IBOutlet NSSearchField *searchField;
IBOutlet __weak NSSearchField *searchField;
IBOutlet NSArrayController* commitController;
IBOutlet NSTreeController* treeController;
IBOutlet NSOutlineView* fileBrowser;
IBOutlet __weak NSOutlineView* fileBrowser;
NSArray *currentFileBrowserSelectionPath;
IBOutlet PBCommitList* commitList;
IBOutlet PBCollapsibleSplitView *historySplitView;
IBOutlet __weak PBCommitList* commitList;
IBOutlet __weak PBCollapsibleSplitView *historySplitView;
IBOutlet PBWebHistoryController *webHistoryController;
QLPreviewPanel* previewPanel;
IBOutlet PBHistorySearchController *searchController;
IBOutlet GLFileView *fileView;

IBOutlet PBGitGradientBarView *upperToolbarView;
IBOutlet NSButton *mergeButton;
IBOutlet NSButton *cherryPickButton;
IBOutlet NSButton *rebaseButton;
IBOutlet __weak PBGitGradientBarView *upperToolbarView;
IBOutlet __weak NSButton *mergeButton;
IBOutlet __weak NSButton *cherryPickButton;
IBOutlet __weak NSButton *rebaseButton;

IBOutlet PBGitGradientBarView *scopeBarView;
IBOutlet NSButton *allBranchesFilterItem;
IBOutlet NSButton *localRemoteBranchesFilterItem;
IBOutlet NSButton *selectedBranchFilterItem;
IBOutlet __weak PBGitGradientBarView *scopeBarView;
IBOutlet __weak NSButton *allBranchesFilterItem;
IBOutlet __weak NSButton *localRemoteBranchesFilterItem;
IBOutlet __weak NSButton *selectedBranchFilterItem;

IBOutlet id webView;
IBOutlet __weak id webView;
int selectedCommitDetailsIndex;
BOOL forceSelectionUpdate;

Expand All @@ -63,7 +63,7 @@
@property (readonly) NSArrayController *commitController;
@property (readonly) PBRefController *refController;
@property (readonly) PBHistorySearchController *searchController;
@property (readonly) PBCommitList *commitList;
@property (weak, readonly) PBCommitList *commitList;

- (IBAction) setDetailedView:(id)sender;
- (IBAction) setTreeView:(id)sender;
Expand Down
7 changes: 3 additions & 4 deletions Classes/Controllers/PBGitSidebarController.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,10 @@
@class PBGitCommitController;

@interface PBGitSidebarController : PBViewController<NSOutlineViewDelegate> {
IBOutlet NSWindow *window;
IBOutlet NSOutlineView *sourceView;
IBOutlet __weak NSOutlineView *sourceView;
IBOutlet NSView *sourceListControlsView;
IBOutlet NSPopUpButton *actionButton;
IBOutlet NSSegmentedControl *remoteControls;
IBOutlet __weak NSPopUpButton *actionButton;
IBOutlet __weak NSSegmentedControl *remoteControls;

NSMutableArray *items;

Expand Down
2 changes: 0 additions & 2 deletions Classes/Controllers/PBGitSidebarController.m
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ @implementation PBGitSidebarController
- (id)initWithRepository:(PBGitRepository *)theRepository superController:(PBGitWindowController *)controller
{
self = [super initWithRepository:theRepository superController:controller];
[sourceView setDelegate:self];
items = [NSMutableArray array];

return self;
Expand All @@ -45,7 +44,6 @@ - (id)initWithRepository:(PBGitRepository *)theRepository superController:(PBGit
- (void)awakeFromNib
{
[super awakeFromNib];
window.contentView = self.view;
[self populateList];

historyViewController = [[PBGitHistoryController alloc] initWithRepository:repository superController:superController];
Expand Down
19 changes: 8 additions & 11 deletions Classes/Controllers/PBGitWindowController.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,15 @@
PBViewController *contentController;

PBGitSidebarController *sidebarController;
IBOutlet NSView *sourceListControlsView;
IBOutlet NSSplitView *splitView;
IBOutlet NSView *sourceSplitView;
IBOutlet NSView *contentSplitView;

IBOutlet NSTextField *statusField;
IBOutlet NSProgressIndicator *progressIndicator;

PBViewController* viewController;

IBOutlet NSToolbarItem *terminalItem;
IBOutlet NSToolbarItem *finderItem;
IBOutlet __weak NSView *sourceListControlsView;
IBOutlet __weak NSSplitView *splitView;
IBOutlet __weak NSView *sourceSplitView;
IBOutlet __weak NSView *contentSplitView;
IBOutlet __weak NSTextField *statusField;
IBOutlet __weak NSProgressIndicator *progressIndicator;
IBOutlet __weak NSToolbarItem *terminalItem;
IBOutlet __weak NSToolbarItem *finderItem;
}

@property (nonatomic, weak) PBGitRepository *repository;
Expand Down
10 changes: 9 additions & 1 deletion Classes/Controllers/PBGitWindowController.m
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,10 @@ - (void) changeContentController:(PBViewController *)controller
if (!controller || (contentController == controller))
return;

if (contentController)
if (contentController) {
[contentController removeObserver:self forKeyPath:@"status"];
[contentController didMoveFromSupercontroller];
}

[self removeAllContentSubViews];

Expand Down Expand Up @@ -300,4 +302,10 @@ - (void)splitView:(NSSplitView *)sender resizeSubviewsWithOldSize:(NSSize)oldSiz
[mainView setFrame:mainFrame];
}

- (void)dealloc;
{
NSLog( @"%@ dealloc", self.class );
[contentController didMoveFromSupercontroller];
}

@end
4 changes: 2 additions & 2 deletions Classes/Controllers/PBRefController.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
@class PBRefMenuItem;

@interface PBRefController : NSObject <PBRefContextDelegate> {
IBOutlet PBGitHistoryController *historyController;
IBOutlet __unsafe_unretained PBGitHistoryController *historyController;
IBOutlet NSArrayController *commitController;
IBOutlet PBCommitList *commitList;
IBOutlet __weak PBCommitList *commitList;

IBOutlet NSPopUpButton *branchPopUp;
}
Expand Down
4 changes: 3 additions & 1 deletion Classes/Controllers/PBViewController.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

@interface PBViewController : NSViewController {
__weak PBGitRepository *repository;
PBGitWindowController *superController;
__unsafe_unretained PBGitWindowController *superController;

NSString *status;
BOOL isBusy;
Expand All @@ -39,4 +39,6 @@
- (NSResponder *)firstResponder;
- (IBAction) refresh:(id)sender;

- (void)didMoveFromSupercontroller;

@end
5 changes: 5 additions & 0 deletions Classes/Controllers/PBViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -61,4 +61,9 @@ - (void)viewLoaded
{
}

- (void)didMoveFromSupercontroller;
{
superController = nil;
}

@end
4 changes: 2 additions & 2 deletions Classes/Controllers/PBWebHistoryController.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@


@interface PBWebHistoryController : PBWebController {
IBOutlet PBGitHistoryController* historyController;
IBOutlet id<PBRefContextDelegate> contextMenuDelegate;
IBOutlet __unsafe_unretained PBGitHistoryController* historyController;
IBOutlet __weak id<PBRefContextDelegate> contextMenuDelegate;

PBGitSHA* currentSha;
NSString* diff;
Expand Down
8 changes: 4 additions & 4 deletions Classes/PBCommitList.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@
typedef void(^PBFindPanelActionBlock)(id sender);

@interface PBCommitList : NSTableView {
IBOutlet WebView* webView;
IBOutlet PBWebHistoryController *webController;
IBOutlet PBGitHistoryController *controller;
IBOutlet PBHistorySearchController *searchController;
IBOutlet __weak WebView* webView;
IBOutlet __weak PBWebHistoryController *webController;
IBOutlet __unsafe_unretained PBGitHistoryController *controller;
IBOutlet __weak PBHistorySearchController *searchController;

BOOL useAdjustScroll;
NSPoint mouseDownPoint;
Expand Down
8 changes: 4 additions & 4 deletions Classes/Views/GLFileView.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@
@class PBGitHistoryController;

@interface GLFileView : PBWebController <MGScopeBarDelegate> {
IBOutlet PBGitHistoryController* historyController;
IBOutlet MGScopeBar *typeBar;
IBOutlet __unsafe_unretained PBGitHistoryController* historyController;
IBOutlet __weak MGScopeBar *typeBar;
NSMutableArray *groups;
NSString *logFormat;
IBOutlet NSView *accessoryView;
IBOutlet NSSplitView *fileListSplitView;
IBOutlet __weak NSView *accessoryView;
IBOutlet __weak NSSplitView *fileListSplitView;
}

- (void)showFile;
Expand Down
4 changes: 2 additions & 2 deletions Classes/Views/PBGitRevisionCell.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
PBGitCommit *objectValue;
PBGraphCellInfo *cellInfo;
NSTextFieldCell *textCell;
IBOutlet PBGitHistoryController *controller;
IBOutlet id<PBRefContextDelegate> contextMenuDelegate;
IBOutlet __unsafe_unretained PBGitHistoryController *controller;
IBOutlet __weak id<PBRefContextDelegate> contextMenuDelegate;
}

- (int) indexAtX:(float)x;
Expand Down
2 changes: 1 addition & 1 deletion Classes/Views/PBQLOutlineView.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#import "PBGitHistoryController.h"

@interface PBQLOutlineView : NSOutlineView {
IBOutlet PBGitHistoryController* controller;
IBOutlet __unsafe_unretained PBGitHistoryController* controller;
}

@end
2 changes: 1 addition & 1 deletion Classes/Views/PBQLTextView.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@


@interface PBQLTextView : NSTextView {
IBOutlet PBGitHistoryController *controller;
IBOutlet __unsafe_unretained PBGitHistoryController *controller;
}

@end
2 changes: 1 addition & 1 deletion Classes/git/PBGitHistoryGrapher.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@


@interface PBGitHistoryGrapher : NSObject {
id delegate;
__weak id delegate;
NSOperationQueue *currentQueue;

NSMutableSet *searchSHAs;
Expand Down
1 change: 1 addition & 0 deletions Classes/git/PBGitHistoryList.m
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ - (void)cleanup
if (currentRevList) {
[currentRevList removeObserver:self forKeyPath:@"commits"];
[currentRevList cancel];
currentRevList = nil;
}
[graphQueue cancelAllOperations];

Expand Down