File tree Expand file tree Collapse file tree 3 files changed +228
-67
lines changed Expand file tree Collapse file tree 3 files changed +228
-67
lines changed Original file line number Diff line number Diff line change 1515// Controls the view displaying a stash diff
1616@interface PBStashContentController : PBViewController {
1717 IBOutlet id webView;
18- IBOutlet PBWebStashController *webController;
18+ IBOutlet PBWebStashController *unstagedController;
19+ IBOutlet PBWebStashController *stagedController;
1920}
2021
2122- (void ) showStash : (PBGitStash*)stash ;
Original file line number Diff line number Diff line change 1111#import " PBGitDefaults.h"
1212#import " PBGitStash.h"
1313
14+ const CGFloat kMinPaneSize = 32.0 ;
15+
1416@implementation PBStashContentController
1517
1618- (void ) awakeFromNib
1719{
18- [webController setRepository: repository];
20+ [unstagedController setRepository: repository];
21+ [stagedController setRepository: repository];
1922}
2023
2124- (void ) showStash : (PBGitStash*)stash
@@ -24,7 +27,17 @@ - (void) showStash:(PBGitStash*)stash
2427 NSString *stashSha = [repository shaForRef: [PBGitRef refFromString: stashRef]];
2528 PBGitCommit *commit = [PBGitCommit commitWithRepository: repository andSha: stashSha];
2629
27- [webController changeContentTo: commit];
30+ [unstagedController changeContentTo: commit];
31+ }
32+
33+ - (CGFloat)splitView : (NSSplitView *)splitView constrainMinCoordinate : (CGFloat)proposedMin ofSubviewAt : (NSInteger )dividerIndex
34+ {
35+ return kMinPaneSize ;
36+ }
37+
38+ - (CGFloat)splitView : (NSSplitView *)splitView constrainMaxCoordinate : (CGFloat)proposedMax ofSubviewAt : (NSInteger )dividerIndex
39+ {
40+ return [splitView frame ].size .height - kMinPaneSize ;
2841}
2942
3043@end
You can’t perform that action at this time.
0 commit comments