mirror of
https://github.com/kennethreitz-archive/gitx.git
synced 2026-06-05 23:40:18 +00:00
22ba33f575
If "All branches" or "Local branches" is selected, the buttons will be disabled. Actions from the context menu continue to work as they implicitly set the target branch through the identity of the clicked label patch. Any other branch will re-enable the buttons.
55 lines
1.5 KiB
Objective-C
55 lines
1.5 KiB
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"
|
|
|
|
@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;
|
|
|
|
- (IBAction)rebaseButton:(id)sender;
|
|
- (IBAction)pushButton:(id)sender;
|
|
- (IBAction)pullButton:(id)sender;
|
|
- (IBAction)fetchButton:(id)sender;
|
|
|
|
- (NSArray *) menuItemsForRef:(PBGitRef *)ref commit:(PBGitCommit *)commit;
|
|
|
|
- (void) changeBranch:(NSMenuItem *)sender;
|
|
- (void) selectCurrentBranch;
|
|
- (void) updateBranchMenu;
|
|
|
|
- (BOOL) pullImpl:(NSString *)refName;
|
|
- (BOOL) pushImpl:(NSString *)refName;
|
|
- (BOOL) rebaseImpl:(NSString *)refName;
|
|
- (BOOL) fetchImpl:(NSString *)refName;
|
|
|
|
- (void) showMessageSheet:(NSString *)title message:(NSString *)msg;
|
|
- (void) toggleToolbarItems:(NSToolbar *)tb matchingLabels:(NSArray *)labels enabledState:(BOOL)state;
|
|
|
|
@end
|
|
|
|
@interface NSString (PBRefSpecAdditions)
|
|
- (NSString *) refForSpec;
|
|
@end |