mirror of
https://github.com/kennethreitz-archive/gitx.git
synced 2026-06-05 23:40:18 +00:00
969ff24ac7
If the current branch filter is switched to "All" or "Local" the index that's calculated as being the targeted index to scroll to visible, is off by the amount in Y that the bottom split view separator is off from a multiple of rows. -adjustScroll: on PBCommitList is called automatically whenever the list needs laying out. An ivar keeps track if we come from the -scrollSelectionToTopOfViewFrom: method of PBGitHistoryController. I'll leave the commented out NSLogs in there in case they're needed for debugging again later.
94 lines
2.9 KiB
Objective-C
94 lines
2.9 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;
|
|
@class QLPreviewPanel;
|
|
@class PBCommitList;
|
|
|
|
@interface PBGitHistoryController : PBViewController {
|
|
IBOutlet PBRefController *refController;
|
|
IBOutlet NSSearchField *searchField;
|
|
IBOutlet NSArrayController* commitController;
|
|
IBOutlet NSTreeController* treeController;
|
|
IBOutlet NSOutlineView* fileBrowser;
|
|
NSArray *currentFileBrowserSelectionPath;
|
|
IBOutlet PBCommitList* commitList;
|
|
IBOutlet PBCollapsibleSplitView *historySplitView;
|
|
QLPreviewPanel* previewPanel;
|
|
|
|
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:(id)sender;
|
|
- (IBAction) toggleQLPreviewPanel:(id)sender;
|
|
- (IBAction) openSelectedFile:(id)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
|