mirror of
https://github.com/kennethreitz-archive/gitx.git
synced 2026-06-05 23:40:18 +00:00
9f048f6363
Update the methods for creating a branch.
- create new class and xib PBCreateBranchSheet
- remove old addRef: methods and iVars from PBRefController
- remove old sheet from PBHistoryView.xib
- put the implementation method in PBGitRepository
- add a contextual menu item for commits
- shows an error sheet
- ask the commitController to rearrangeObjects to make sure the new branch is shown
- switch from using "update-ref" to "branch" so that branches starting at a remote branch will track automatically (or not depending on the repo's settings)
69 lines
2.0 KiB
Objective-C
69 lines
2.0 KiB
Objective-C
//
|
|
// PBGitHistoryView.h
|
|
// GitX
|
|
//
|
|
// Created by Pieter de Bie on 19-09-08.
|
|
// Copyright 2008 __MyCompanyName__. All rights reserved.
|
|
//
|
|
|
|
#import <Cocoa/Cocoa.h>
|
|
#import "PBGitCommit.h"
|
|
#import "PBGitTree.h"
|
|
#import "PBViewController.h"
|
|
#import "PBCollapsibleSplitView.h"
|
|
|
|
@interface PBGitHistoryController : PBViewController {
|
|
IBOutlet NSSearchField *searchField;
|
|
IBOutlet NSArrayController* commitController;
|
|
IBOutlet NSTreeController* treeController;
|
|
IBOutlet NSOutlineView* fileBrowser;
|
|
IBOutlet NSTableView* commitList;
|
|
IBOutlet PBCollapsibleSplitView *historySplitView;
|
|
|
|
IBOutlet id webView;
|
|
int selectedTab;
|
|
|
|
PBGitTree* gitTree;
|
|
PBGitCommit* webCommit;
|
|
PBGitCommit* rawCommit;
|
|
PBGitCommit* realCommit;
|
|
}
|
|
|
|
@property (assign) int selectedTab;
|
|
@property (retain) PBGitCommit *webCommit, *rawCommit;
|
|
@property (retain) PBGitTree* gitTree;
|
|
@property (readonly) NSArrayController *commitController;
|
|
|
|
- (IBAction) setDetailedView: sender;
|
|
- (IBAction) setRawView: sender;
|
|
- (IBAction) setTreeView: sender;
|
|
|
|
- (void) selectCommit: (NSString*) commit;
|
|
- (IBAction) refresh: sender;
|
|
- (IBAction) toggleQuickView: sender;
|
|
- (IBAction) openSelectedFile: sender;
|
|
- (void) updateQuicklookForce: (BOOL) force;
|
|
|
|
// Context menu methods
|
|
- (NSMenu *)contextMenuForTreeView;
|
|
- (NSArray *)menuItemsForPaths:(NSArray *)paths;
|
|
- (void)showCommitsFromTree:(id)sender;
|
|
- (void)showInFinderAction:(id)sender;
|
|
- (void)openFilesAction:(id)sender;
|
|
|
|
// Repository Methods
|
|
- (IBAction) createBranch:(id)sender;
|
|
|
|
- (void) copyCommitInfo;
|
|
|
|
- (BOOL) hasNonlinearPath;
|
|
|
|
- (NSMenu *)tableColumnMenu;
|
|
|
|
- (BOOL)splitView:(NSSplitView *)sender canCollapseSubview:(NSView *)subview;
|
|
- (BOOL)splitView:(NSSplitView *)splitView shouldCollapseSubview:(NSView *)subview forDoubleClickOnDividerAtIndex:(NSInteger)dividerIndex;
|
|
- (CGFloat)splitView:(NSSplitView *)sender constrainMinCoordinate:(CGFloat)proposedMin ofSubviewAt:(NSInteger)offset;
|
|
- (CGFloat)splitView:(NSSplitView *)sender constrainMaxCoordinate:(CGFloat)proposedMax ofSubviewAt:(NSInteger)offset;
|
|
|
|
@end
|