5 // Created by Pieter de Bie on 19-09-08.
6 // Copyright 2008 __MyCompanyName__. All rights reserved.
9 #import <Cocoa/Cocoa.h>
10 #import "PBGitCommit.h"
12 #import "PBViewController.h"
13 #import "PBCollapsibleSplitView.h"
15 @interface PBGitHistoryController
: PBViewController
{
16 IBOutlet NSSearchField
*searchField
;
17 IBOutlet NSArrayController
* commitController
;
18 IBOutlet NSTreeController
* treeController
;
19 IBOutlet NSOutlineView
* fileBrowser
;
20 IBOutlet NSTableView
* commitList
;
21 IBOutlet PBCollapsibleSplitView
*historySplitView
;
27 PBGitCommit
* webCommit
;
28 PBGitCommit
* rawCommit
;
29 PBGitCommit
* realCommit
;
32 @
property (assign
) int selectedTab
;
33 @
property (retain
) PBGitCommit
*webCommit
, *rawCommit
;
34 @
property (retain
) PBGitTree
* gitTree
;
35 @
property (readonly
) NSArrayController
*commitController
;
37 - (IBAction
) setDetailedView
: sender
;
38 - (IBAction
) setRawView
: sender
;
39 - (IBAction
) setTreeView
: sender
;
41 - (void) selectCommit
: (NSString
*) commit
;
42 - (IBAction
) refresh
: sender
;
43 - (IBAction
) toggleQuickView
: sender
;
44 - (IBAction
) openSelectedFile
: sender
;
45 - (void) updateQuicklookForce
: (BOOL
) force
;
47 // Context menu methods
48 - (NSMenu
*)contextMenuForTreeView
;
49 - (NSArray
*)menuItemsForPaths
:(NSArray
*)paths
;
50 - (void)showCommitsFromTree
:(id
)sender
;
51 - (void)showInFinderAction
:(id
)sender
;
52 - (void)openFilesAction
:(id
)sender
;
54 - (void) copyCommitInfo
;
56 - (BOOL
) hasNonlinearPath
;
58 - (NSMenu
*)tableColumnMenu
;
60 - (BOOL
)splitView
:(NSSplitView
*)sender canCollapseSubview
:(NSView
*)subview
;
61 - (BOOL
)splitView
:(NSSplitView
*)splitView shouldCollapseSubview
:(NSView
*)subview forDoubleClickOnDividerAtIndex
:(NSInteger
)dividerIndex
;
62 - (CGFloat
)splitView
:(NSSplitView
*)sender constrainMinCoordinate
:(CGFloat
)proposedMin ofSubviewAt
:(NSInteger
)offset
;
63 - (CGFloat
)splitView
:(NSSplitView
*)sender constrainMaxCoordinate
:(CGFloat
)proposedMax ofSubviewAt
:(NSInteger
)offset
;