mirror of
https://github.com/kennethreitz-archive/gitx.git
synced 2026-06-05 23:40:18 +00:00
ff5f3f7979
Switch from storing both the ref and the commit to storing just one or the other as a refish. Change action methods that receive PBRefMenuItem to support the change in functionality. In particular the removeRefSheetDidEnd:returnCode:contextInfo: method in PBRefController now looks up the commit for the ref (this was the only place that needed both the ref and the commit).
42 lines
1000 B
Objective-C
42 lines
1000 B
Objective-C
//
|
|
// PBLabelController.h
|
|
// GitX
|
|
//
|
|
// Created by Pieter de Bie on 21-10-08.
|
|
// Copyright 2008 Pieter de Bie. All rights reserved.
|
|
//
|
|
|
|
#import <Cocoa/Cocoa.h>
|
|
#import "PBGitHistoryController.h"
|
|
#import "PBCommitList.h"
|
|
#import "PBGitRef.h"
|
|
#import "PBGitCommit.h"
|
|
#import "PBRefContextDelegate.h"
|
|
|
|
@class PBRefMenuItem;
|
|
|
|
@interface PBRefController : NSObject <PBRefContextDelegate> {
|
|
IBOutlet __weak PBGitHistoryController *historyController;
|
|
IBOutlet NSArrayController *commitController;
|
|
IBOutlet PBCommitList *commitList;
|
|
|
|
IBOutlet NSWindow *newBranchSheet;
|
|
IBOutlet NSTextField *newBranchName;
|
|
IBOutlet NSTextField *errorMessage;
|
|
|
|
IBOutlet NSPopUpButton *branchPopUp;
|
|
}
|
|
|
|
- (IBAction)addRef:(id)sender;
|
|
- (IBAction)closeSheet:(id) sender;
|
|
- (IBAction)saveSheet:(id) sender;
|
|
|
|
- (NSArray *) menuItemsForRef:(PBGitRef *)ref;
|
|
- (NSArray *) menuItemsForCommit:(PBGitCommit *)commit;
|
|
|
|
- (void) changeBranch:(NSMenuItem *)sender;
|
|
- (void) selectCurrentBranch;
|
|
- (void) updateBranchMenu;
|
|
|
|
@end
|