Files
gitx/PBGitHistoryController.h
T
Nathan Kinsinger 4a8c524692 Add branch view filters to history scope bar
- filters for All, Local/Remote, and the selected branch
        - "Local" includes both branches and tags
        - "Remote" includes all branches from the same remote as the selected remote branch (i.e. not other remotes)

Changes to make the above work:
    - add a history list class between the repository and rev list
        - store a project rev list with all the commits from the project
        - use the project rev list to graph the history for individual branches when there have been no changes
        - use a different rev list to show non-simple revs (history of a file, revs from the gitx tool)
        - update the commits in chunks to a mutable array so the table view's array controller has less work to do
        - only update the project rev list from git when actually necessary
    - don't add the All Branches and Local Branches revs to the branches array
    - some changes related to forcing the project's rev list to update when changes are made
    - some changes related to not causing updates too often
    - store the selected filter in user defaults
    - when the graphing is done select the commit for the branch
2010-03-13 22:16:44 -07:00

90 lines
2.7 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"
@class PBGitSidebarController;
@class PBGitGradientBarView;
@class PBRefController;
@interface PBGitHistoryController : PBViewController {
IBOutlet PBRefController *refController;
IBOutlet NSSearchField *searchField;
IBOutlet NSArrayController* commitController;
IBOutlet NSTreeController* treeController;
IBOutlet NSOutlineView* fileBrowser;
IBOutlet NSTableView* commitList;
IBOutlet PBCollapsibleSplitView *historySplitView;
IBOutlet PBGitGradientBarView *upperToolbarView;
IBOutlet NSButton *mergeButton;
IBOutlet NSButton *cherryPickButton;
IBOutlet NSButton *rebaseButton;
IBOutlet PBGitGradientBarView *scopeBarView;
IBOutlet NSButton *allBranchesFilterItem;
IBOutlet NSButton *localRemoteBranchesFilterItem;
IBOutlet NSButton *selectedBranchFilterItem;
IBOutlet id webView;
int selectedCommitDetailsIndex;
BOOL forceSelectionUpdate;
PBGitTree *gitTree;
PBGitCommit *webCommit;
PBGitCommit *selectedCommit;
}
@property (assign) int selectedCommitDetailsIndex;
@property (retain) PBGitCommit *webCommit;
@property (retain) PBGitTree* gitTree;
@property (readonly) NSArrayController *commitController;
@property (readonly) PBRefController *refController;
- (IBAction) setDetailedView:(id)sender;
- (IBAction) setTreeView:(id)sender;
- (IBAction) setBranchFilter:(id)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;
- (IBAction) createTag:(id)sender;
- (IBAction) showAddRemoteSheet:(id)sender;
- (IBAction) merge:(id)sender;
- (IBAction) cherryPick:(id)sender;
- (IBAction) rebase:(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