mirror of
https://github.com/kennethreitz-archive/gitx.git
synced 2026-06-05 23:40:18 +00:00
- stashes can be created with optional message
- added clearing all stashes - added possibility to ignore files with given extension - submodules are now showed - submodules can be opened
This commit is contained in:
+10
-4
@@ -7,22 +7,28 @@
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
#import "PBGitRepository.h"
|
||||
|
||||
@interface PBCommand : NSObject {
|
||||
PBGitRepository *repository;
|
||||
|
||||
// for the user to see what it triggers
|
||||
NSString *displayName;
|
||||
// shown during command execution
|
||||
NSString *commandTitle;
|
||||
NSString *commandDescription;
|
||||
|
||||
NSArray *parameters;
|
||||
NSMutableArray *parameters;
|
||||
}
|
||||
@property (nonatomic, retain, readonly) PBGitRepository *repository;
|
||||
@property (nonatomic, retain) NSString *commandTitle;
|
||||
@property (nonatomic, retain) NSString *commandDescription;
|
||||
@property (nonatomic, copy) NSString *displayName;
|
||||
@property (nonatomic, retain, readonly) NSArray *parameters;
|
||||
|
||||
- (id) initWithDisplayName:(NSString *) aDisplayName parameters:(NSArray *) params;
|
||||
- (id) initWithDisplayName:(NSString *) aDisplayName parameters:(NSArray *) params repository:(PBGitRepository *) repo;
|
||||
|
||||
- (void) invoke;
|
||||
|
||||
- (NSArray *) allParameters;
|
||||
- (void) appendParameters:(NSArray *) params;
|
||||
@end
|
||||
|
||||
+21
-3
@@ -7,29 +7,39 @@
|
||||
//
|
||||
|
||||
#import "PBCommand.h"
|
||||
#import "PBRemoteProgressSheet.h"
|
||||
|
||||
@interface PBCommand()
|
||||
@property (nonatomic, retain) PBGitRepository *repository;
|
||||
@end
|
||||
|
||||
@implementation PBCommand
|
||||
@synthesize displayName;
|
||||
@synthesize parameters;
|
||||
@synthesize commandDescription;
|
||||
@synthesize commandTitle;
|
||||
@synthesize repository;
|
||||
|
||||
- (id) initWithDisplayName:(NSString *) aDisplayName parameters:(NSArray *) params {
|
||||
return [self initWithDisplayName:aDisplayName parameters:params repository:nil];
|
||||
}
|
||||
|
||||
- (id) initWithDisplayName:(NSString *) aDisplayName parameters:(NSArray *) params repository:(PBGitRepository *) repo {
|
||||
self = [super init];
|
||||
if (self != nil) {
|
||||
self.displayName = aDisplayName;
|
||||
parameters = [params retain];
|
||||
parameters = [[NSMutableArray alloc] initWithArray:params];
|
||||
|
||||
// default values
|
||||
self.commandTitle = @"";
|
||||
self.commandDescription = @"";
|
||||
self.repository = repo;
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
|
||||
- (void) dealloc {
|
||||
[repository release];
|
||||
[commandDescription release];
|
||||
[commandTitle release];
|
||||
[parameters release];
|
||||
@@ -37,8 +47,16 @@
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
- (NSArray *) allParameters {
|
||||
return parameters;
|
||||
}
|
||||
|
||||
- (void) appendParameters:(NSArray *) params {
|
||||
[parameters addObjectsFromArray:params];
|
||||
}
|
||||
|
||||
- (void) invoke {
|
||||
NSLog(@"Warning: Empty/abstrac command has been fired!");
|
||||
[PBRemoteProgressSheet beginRemoteProgressSheetForArguments:[self allParameters] title:self.commandTitle description:self.commandDescription inRepository:self.repository];
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
//
|
||||
// PBCommandWithParameter.h
|
||||
// GitX
|
||||
//
|
||||
// Created by Tomasz Krasnyk on 10-11-06.
|
||||
// Copyright 2010 __MyCompanyName__. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Cocoa/Cocoa.h>
|
||||
#import "PBCommand.h"
|
||||
|
||||
|
||||
@interface PBCommandWithParameter : PBCommand {
|
||||
PBCommand *command;
|
||||
NSString *parameterName;
|
||||
NSString *parameterDisplayName;
|
||||
}
|
||||
@property (nonatomic, retain, readonly) PBCommand *command;
|
||||
@property (nonatomic, retain, readonly) NSString *parameterName;
|
||||
@property (nonatomic, retain, readonly) NSString *parameterDisplayName;
|
||||
|
||||
- initWithCommand:(PBCommand *) command parameterName:(NSString *) param parameterDisplayName:(NSString *) paramDisplayName;
|
||||
@end
|
||||
@@ -0,0 +1,40 @@
|
||||
//
|
||||
// PBCommandWithParameter.m
|
||||
// GitX
|
||||
//
|
||||
// Created by Tomasz Krasnyk on 10-11-06.
|
||||
// Copyright 2010 __MyCompanyName__. All rights reserved.
|
||||
//
|
||||
|
||||
#import "PBCommandWithParameter.h"
|
||||
#import "PBArgumentPickerController.h"
|
||||
|
||||
|
||||
@implementation PBCommandWithParameter
|
||||
@synthesize command;
|
||||
@synthesize parameterName;
|
||||
@synthesize parameterDisplayName;
|
||||
|
||||
- initWithCommand:(PBCommand *) aCommand parameterName:(NSString *) param parameterDisplayName:(NSString *) paramDisplayName {
|
||||
if (self = [super initWithDisplayName:[aCommand displayName] parameters:nil repository:[aCommand repository]]) {
|
||||
command = [aCommand retain];
|
||||
parameterName = [param retain];
|
||||
parameterDisplayName = [paramDisplayName retain];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void) dealloc {
|
||||
[command release];
|
||||
[parameterName release];
|
||||
[parameterDisplayName release];
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
|
||||
- (void) invoke {
|
||||
PBArgumentPickerController *controller = [[PBArgumentPickerController alloc] initWithCommandWithParameter:self];
|
||||
[NSApp beginSheet:[controller window] modalForWindow:[command.repository.windowController window] modalDelegate:controller didEndSelector:nil contextInfo:NULL];
|
||||
[controller release];
|
||||
}
|
||||
@end
|
||||
@@ -0,0 +1,17 @@
|
||||
//
|
||||
// PBOpenDocumentCommand.h
|
||||
// GitX
|
||||
//
|
||||
// Created by Tomasz Krasnyk on 10-11-07.
|
||||
// Copyright 2010 __MyCompanyName__. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Cocoa/Cocoa.h>
|
||||
#import "PBCommand.h"
|
||||
|
||||
@interface PBOpenDocumentCommand : PBCommand {
|
||||
NSURL *documentURL;
|
||||
}
|
||||
|
||||
- (id) initWithDocumentAbsolutePath:(NSString *) path;
|
||||
@end
|
||||
@@ -0,0 +1,26 @@
|
||||
//
|
||||
// PBOpenDocumentCommand.m
|
||||
// GitX
|
||||
//
|
||||
// Created by Tomasz Krasnyk on 10-11-07.
|
||||
// Copyright 2010 __MyCompanyName__. All rights reserved.
|
||||
//
|
||||
|
||||
#import "PBOpenDocumentCommand.h"
|
||||
#import "PBRepositoryDocumentController.h"
|
||||
#import "PBGitRepository.h"
|
||||
|
||||
@implementation PBOpenDocumentCommand
|
||||
|
||||
- (id) initWithDocumentAbsolutePath:(NSString *) path {
|
||||
if (self = [super initWithDisplayName:@"Open" parameters:nil repository:nil]) {
|
||||
documentURL = [[NSURL alloc] initWithString:path];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void) invoke {
|
||||
[[PBRepositoryDocumentController sharedDocumentController] documentForLocation:documentURL];
|
||||
}
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,17 @@
|
||||
//
|
||||
// PBRemoteCommandFactory.h
|
||||
// GitX
|
||||
//
|
||||
// Created by Tomasz Krasnyk on 10-11-07.
|
||||
// Copyright 2010 __MyCompanyName__. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Cocoa/Cocoa.h>
|
||||
#import "PBCommandFactory.h"
|
||||
|
||||
|
||||
@interface PBRemoteCommandFactory : NSObject<PBCommandFactory> {
|
||||
|
||||
}
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,38 @@
|
||||
//
|
||||
// PBRemoteCommandFactory.m
|
||||
// GitX
|
||||
//
|
||||
// Created by Tomasz Krasnyk on 10-11-07.
|
||||
// Copyright 2010 __MyCompanyName__. All rights reserved.
|
||||
//
|
||||
|
||||
#import "PBRemoteCommandFactory.h"
|
||||
#import "PBOpenDocumentCommand.h"
|
||||
#import "PBGitSubmodule.h"
|
||||
|
||||
|
||||
@implementation PBRemoteCommandFactory
|
||||
|
||||
+ (NSArray *) commandsForSubmodule:(PBGitSubmodule *) submodule inRepository:(PBGitRepository *) repository {
|
||||
NSMutableArray *commands = [[NSMutableArray alloc] init];
|
||||
|
||||
NSString *repoPath = [repository workingDirectory];
|
||||
|
||||
NSString *path = [repoPath stringByAppendingPathComponent:[submodule path]];
|
||||
|
||||
PBOpenDocumentCommand *command = [[PBOpenDocumentCommand alloc] initWithDocumentAbsolutePath:path];
|
||||
command.commandTitle = command.displayName;
|
||||
command.commandDescription = @"Opening document";
|
||||
[commands addObject:command];
|
||||
|
||||
return commands;
|
||||
}
|
||||
|
||||
+ (NSArray *) commandsForObject:(NSObject *) object repository:(PBGitRepository *) repository {
|
||||
if ([object isKindOfClass:[PBGitSubmodule class]]) {
|
||||
return [PBRemoteCommandFactory commandsForSubmodule:(id)object inRepository:repository];
|
||||
}
|
||||
return nil;
|
||||
}
|
||||
|
||||
@end
|
||||
@@ -1,19 +0,0 @@
|
||||
//
|
||||
// PBStashCommand.h
|
||||
// GitX
|
||||
//
|
||||
// Created by Tomasz Krasnyk on 10-11-06.
|
||||
// Copyright 2010 __MyCompanyName__. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import "PBCommand.h"
|
||||
#import "PBGitRepository.h"
|
||||
|
||||
@interface PBStashCommand : PBCommand {
|
||||
PBGitRepository *repository;
|
||||
NSArray *arguments;
|
||||
}
|
||||
|
||||
- initWithDisplayName:(NSString *) aDisplayName arguments:(NSArray *) args repository:(PBGitRepository *) repo;
|
||||
@end
|
||||
@@ -1,44 +0,0 @@
|
||||
//
|
||||
// PBStashCommand.m
|
||||
// GitX
|
||||
//
|
||||
// Created by Tomasz Krasnyk on 10-11-06.
|
||||
// Copyright 2010 __MyCompanyName__. All rights reserved.
|
||||
//
|
||||
|
||||
#import "PBStashCommand.h"
|
||||
#import "PBRemoteProgressSheet.h"
|
||||
|
||||
@interface PBStashCommand()
|
||||
@property (nonatomic, retain) PBGitRepository *repository;
|
||||
@property (nonatomic, retain) NSArray *arguments;
|
||||
@end
|
||||
|
||||
|
||||
@implementation PBStashCommand
|
||||
@synthesize repository;
|
||||
@synthesize arguments;
|
||||
|
||||
- initWithDisplayName:(NSString *) aDisplayName arguments:(NSArray *) args repository:(PBGitRepository *) repo {
|
||||
if (self = [super initWithDisplayName:aDisplayName parameters:[NSArray arrayWithObject:@"stash"]]) {
|
||||
self.arguments = args;
|
||||
self.repository = repo;
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void) dealloc {
|
||||
[parameters release];
|
||||
[repository release];
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
|
||||
- (void) invoke {
|
||||
NSMutableArray *args = [[NSMutableArray alloc] initWithArray:super.parameters];
|
||||
[args addObjectsFromArray:self.arguments];
|
||||
[PBRemoteProgressSheet beginRemoteProgressSheetForArguments:args title:self.commandTitle description:self.commandDescription inRepository:self.repository];
|
||||
[args release];
|
||||
}
|
||||
|
||||
@end
|
||||
@@ -9,6 +9,7 @@
|
||||
#import <Foundation/Foundation.h>
|
||||
#import "PBCommandFactory.h"
|
||||
|
||||
|
||||
@interface PBStashCommandFactory : NSObject<PBCommandFactory> {
|
||||
|
||||
}
|
||||
|
||||
@@ -7,39 +7,81 @@
|
||||
//
|
||||
|
||||
#import "PBStashCommandFactory.h"
|
||||
#import "PBStashCommand.h"
|
||||
#import "PBCommand.h"
|
||||
#import "PBCommandWithParameter.h"
|
||||
|
||||
// model
|
||||
#import "PBGitStash.h"
|
||||
#import "PBGitRef.h"
|
||||
|
||||
@interface PBStashCommandFactory()
|
||||
+ (NSArray *) commandsForStash:(PBGitStash *) stash repository:(PBGitRepository *) repository;
|
||||
+ (NSArray *) commandsForRef:(PBGitRef *) ref repository:(PBGitRepository *) repository;
|
||||
@end
|
||||
|
||||
|
||||
@implementation PBStashCommandFactory
|
||||
|
||||
+ (NSArray *) commandsForObject:(NSObject *) object repository:(PBGitRepository *) repository {
|
||||
if (![object isKindOfClass:[PBGitStash class]]) {
|
||||
return nil;
|
||||
NSArray *cmds = nil;
|
||||
if ([object isKindOfClass:[PBGitStash class]]) {
|
||||
cmds = [PBStashCommandFactory commandsForStash:(id)object repository:repository];
|
||||
} else if ([object isKindOfClass:[PBGitRef class]]) {
|
||||
cmds = [PBStashCommandFactory commandsForRef:(id)object repository:repository];
|
||||
}
|
||||
PBGitStash *stash = (PBGitStash *) object;
|
||||
|
||||
|
||||
return cmds;
|
||||
}
|
||||
|
||||
+ (NSArray *) commandsForRef:(PBGitRef *) ref repository:(PBGitRepository *) repository {
|
||||
NSMutableArray *commands = [[NSMutableArray alloc] init];
|
||||
|
||||
NSArray *args = [NSArray arrayWithObjects:@"apply", [stash name], nil];
|
||||
PBStashCommand *command = [[PBStashCommand alloc] initWithDisplayName:@"Apply" arguments:args repository:repository];
|
||||
PBGitRef *headRef = [[repository headRef] ref];
|
||||
BOOL isHead = [ref isEqualToRef:headRef];
|
||||
|
||||
if (isHead) {
|
||||
NSArray *args = [NSArray arrayWithObject:@"stash"];
|
||||
PBCommand *command = [[PBCommand alloc] initWithDisplayName:@"Stash local changes..." parameters:args repository:repository];
|
||||
command.commandTitle = command.displayName;
|
||||
command.commandDescription = @"Stashing local changes";
|
||||
|
||||
PBCommandWithParameter *cmd = [[PBCommandWithParameter alloc] initWithCommand:command parameterName:@"save" parameterDisplayName:@"Stash message (optional)"];
|
||||
[command release];
|
||||
[commands addObject:cmd];
|
||||
[cmd release];
|
||||
|
||||
command = [[PBCommand alloc] initWithDisplayName:@"Clear stashes" parameters:[NSArray arrayWithObjects:@"stash", @"clear", nil] repository:repository];
|
||||
command.commandTitle = command.displayName;
|
||||
command.commandDescription = @"Clearing stashes";
|
||||
[commands addObject:command];
|
||||
[command release];
|
||||
}
|
||||
|
||||
return [commands autorelease];
|
||||
}
|
||||
|
||||
+ (NSArray *) commandsForStash:(PBGitStash *) stash repository:(PBGitRepository *) repository {
|
||||
NSMutableArray *commands = [[NSMutableArray alloc] init];
|
||||
|
||||
NSArray *args = [NSArray arrayWithObjects:@"stash", @"apply", [stash name], nil];
|
||||
PBCommand *command = [[PBCommand alloc] initWithDisplayName:@"Apply" parameters:args repository:repository];
|
||||
command.commandTitle = command.displayName;
|
||||
command.commandDescription = [NSString stringWithFormat:@"Applying stash: '%@'", stash];
|
||||
[commands addObject:command];
|
||||
|
||||
args = [NSArray arrayWithObjects:@"pop", [stash name], nil];
|
||||
command = [[PBStashCommand alloc] initWithDisplayName:@"Pop" arguments:args repository:repository];
|
||||
args = [NSArray arrayWithObjects:@"stash", @"pop", [stash name], nil];
|
||||
command = [[PBCommand alloc] initWithDisplayName:@"Pop" parameters:args repository:repository];
|
||||
command.commandTitle = command.displayName;
|
||||
command.commandDescription = [NSString stringWithFormat:@"Poping stash: '%@'", stash];
|
||||
[commands addObject:command];
|
||||
|
||||
args = [NSArray arrayWithObjects:@"drop", [stash name], nil];
|
||||
command = [[PBStashCommand alloc] initWithDisplayName:@"Drop" arguments:args repository:repository];
|
||||
args = [NSArray arrayWithObjects:@"stash", @"drop", [stash name], nil];
|
||||
command = [[PBCommand alloc] initWithDisplayName:@"Drop" parameters:args repository:repository];
|
||||
command.commandTitle = command.displayName;
|
||||
command.commandDescription = [NSString stringWithFormat:@"Dropping stash: '%@'", stash];
|
||||
[commands addObject:command];
|
||||
|
||||
|
||||
return [commands autorelease];
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
//
|
||||
// PBArgumentPickerController.h
|
||||
// GitX
|
||||
//
|
||||
// Created by Tomasz Krasnyk on 10-11-06.
|
||||
// Copyright 2010 __MyCompanyName__. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Cocoa/Cocoa.h>
|
||||
#import "PBCommand.h"
|
||||
#import "PBArgumentPicker.h"
|
||||
|
||||
@class PBCommandWithParameter;
|
||||
|
||||
@interface PBArgumentPickerController : NSWindowController {
|
||||
IBOutlet PBArgumentPicker *view;
|
||||
|
||||
PBCommandWithParameter *cmdWithParameter;
|
||||
}
|
||||
|
||||
- initWithCommandWithParameter:(PBCommandWithParameter *) command;
|
||||
|
||||
- (IBAction) okClicked:sender;
|
||||
- (IBAction) cancelClicked:sender;
|
||||
@end
|
||||
@@ -0,0 +1,50 @@
|
||||
//
|
||||
// PBArgumentPickerController.m
|
||||
// GitX
|
||||
//
|
||||
// Created by Tomasz Krasnyk on 10-11-06.
|
||||
// Copyright 2010 __MyCompanyName__. All rights reserved.
|
||||
//
|
||||
|
||||
#import "PBArgumentPickerController.h"
|
||||
#import "PBCommandWithParameter.h"
|
||||
|
||||
|
||||
@implementation PBArgumentPickerController
|
||||
|
||||
- initWithCommandWithParameter:(PBCommandWithParameter *) aCommand {
|
||||
if (self = [super initWithWindowNibName:@"PBArgumentPicker" owner:self]) {
|
||||
cmdWithParameter = [aCommand retain];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void) dealloc {
|
||||
[cmdWithParameter release];
|
||||
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
- (void) awakeFromNib {
|
||||
NSString *stringToDisplay = [NSString stringWithFormat:@"%@:", [cmdWithParameter parameterDisplayName]];
|
||||
[view.label setTitleWithMnemonic:stringToDisplay];
|
||||
}
|
||||
|
||||
- (IBAction) okClicked:sender {
|
||||
NSString *userText = [view.textField stringValue];
|
||||
if ([userText length] > 0) {
|
||||
NSString *paramName = [cmdWithParameter parameterName];
|
||||
[cmdWithParameter.command appendParameters:[NSArray arrayWithObjects:paramName, userText, nil]];
|
||||
}
|
||||
[self cancelClicked:sender];
|
||||
|
||||
[cmdWithParameter.command invoke];
|
||||
}
|
||||
|
||||
- (IBAction) cancelClicked:sender {
|
||||
[NSApp endSheet:[self window]];
|
||||
[[self window] orderOut:self];
|
||||
}
|
||||
|
||||
|
||||
@end
|
||||
@@ -24,13 +24,22 @@
|
||||
02B41A5E123E307200DFC531 /* PBCommitHookFailedSheet.m in Sources */ = {isa = PBXBuildFile; fileRef = 02B41A5D123E307200DFC531 /* PBCommitHookFailedSheet.m */; };
|
||||
02B41A60123E307F00DFC531 /* PBCommitHookFailedSheet.xib in Resources */ = {isa = PBXBuildFile; fileRef = 02B41A5F123E307F00DFC531 /* PBCommitHookFailedSheet.xib */; };
|
||||
056438B70ED0C40B00985397 /* DetailViewTemplate.png in Resources */ = {isa = PBXBuildFile; fileRef = 056438B60ED0C40B00985397 /* DetailViewTemplate.png */; };
|
||||
21230CB11284B26A0046E5A1 /* PBGitSVStashItem.m in Sources */ = {isa = PBXBuildFile; fileRef = 21230CB01284B26A0046E5A1 /* PBGitSVStashItem.m */; };
|
||||
21230CB11284B26A0046E5A1 /* PBGitMenuItem.m in Sources */ = {isa = PBXBuildFile; fileRef = 21230CB01284B26A0046E5A1 /* PBGitMenuItem.m */; };
|
||||
21230D351284C5080046E5A1 /* PBGitStash.m in Sources */ = {isa = PBXBuildFile; fileRef = 21230D341284C5080046E5A1 /* PBGitStash.m */; };
|
||||
21230D821284D1CC0046E5A1 /* stash-icon.png in Resources */ = {isa = PBXBuildFile; fileRef = 21230D811284D1CC0046E5A1 /* stash-icon.png */; };
|
||||
21230D9C128552720046E5A1 /* PBCommand.m in Sources */ = {isa = PBXBuildFile; fileRef = 21230D9B128552720046E5A1 /* PBCommand.m */; };
|
||||
21230D9F128552FA0046E5A1 /* PBStashCommandFactory.m in Sources */ = {isa = PBXBuildFile; fileRef = 21230D9E128552FA0046E5A1 /* PBStashCommandFactory.m */; };
|
||||
21230DAA1285550B0046E5A1 /* PBCommandMenuItem.m in Sources */ = {isa = PBXBuildFile; fileRef = 21230DA91285550B0046E5A1 /* PBCommandMenuItem.m */; };
|
||||
21230DEE12855A990046E5A1 /* PBStashCommand.m in Sources */ = {isa = PBXBuildFile; fileRef = 21230DED12855A990046E5A1 /* PBStashCommand.m */; };
|
||||
21230ED21285EB5A0046E5A1 /* PBArgumentPicker.xib in Resources */ = {isa = PBXBuildFile; fileRef = 21230ED11285EB5A0046E5A1 /* PBArgumentPicker.xib */; };
|
||||
21230ED91285EDAF0046E5A1 /* PBArgumentPicker.m in Sources */ = {isa = PBXBuildFile; fileRef = 21230ED81285EDAF0046E5A1 /* PBArgumentPicker.m */; };
|
||||
21230EE21285EFB20046E5A1 /* PBArgumentPickerController.m in Sources */ = {isa = PBXBuildFile; fileRef = 21230EE11285EFB20046E5A1 /* PBArgumentPickerController.m */; };
|
||||
21230F7D1285FC6A0046E5A1 /* PBCommandWithParameter.m in Sources */ = {isa = PBXBuildFile; fileRef = 21230F7C1285FC6A0046E5A1 /* PBCommandWithParameter.m */; };
|
||||
212311DD12872BF20046E5A1 /* PBGitSubmodule.m in Sources */ = {isa = PBXBuildFile; fileRef = 212311DC12872BF20046E5A1 /* PBGitSubmodule.m */; };
|
||||
2123121E128735E90046E5A1 /* submodule-notmatching-index.png in Resources */ = {isa = PBXBuildFile; fileRef = 2123121B128735E90046E5A1 /* submodule-notmatching-index.png */; };
|
||||
2123121F128735E90046E5A1 /* submodule-matching-index.png in Resources */ = {isa = PBXBuildFile; fileRef = 2123121C128735E90046E5A1 /* submodule-matching-index.png */; };
|
||||
21231220128735E90046E5A1 /* submodule-empty.png in Resources */ = {isa = PBXBuildFile; fileRef = 2123121D128735E90046E5A1 /* submodule-empty.png */; };
|
||||
2123138A128756ED0046E5A1 /* PBRemoteCommandFactory.m in Sources */ = {isa = PBXBuildFile; fileRef = 21231389128756ED0046E5A1 /* PBRemoteCommandFactory.m */; };
|
||||
212313B5128759C00046E5A1 /* PBOpenDocumentCommand.m in Sources */ = {isa = PBXBuildFile; fileRef = 212313B4128759C00046E5A1 /* PBOpenDocumentCommand.m */; };
|
||||
3BC07F4C0ED5A5C5009A7768 /* HistoryViewTemplate.png in Resources */ = {isa = PBXBuildFile; fileRef = 3BC07F4A0ED5A5C5009A7768 /* HistoryViewTemplate.png */; };
|
||||
3BC07F4D0ED5A5C5009A7768 /* CommitViewTemplate.png in Resources */ = {isa = PBXBuildFile; fileRef = 3BC07F4B0ED5A5C5009A7768 /* CommitViewTemplate.png */; };
|
||||
47DBDB580E94EDE700671A1E /* DBPrefsWindowController.m in Sources */ = {isa = PBXBuildFile; fileRef = 47DBDB570E94EDE700671A1E /* DBPrefsWindowController.m */; };
|
||||
@@ -252,8 +261,8 @@
|
||||
056438B60ED0C40B00985397 /* DetailViewTemplate.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = DetailViewTemplate.png; path = Images/DetailViewTemplate.png; sourceTree = "<group>"; };
|
||||
089C165DFE840E0CC02AAC07 /* English */ = {isa = PBXFileReference; fileEncoding = 10; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/InfoPlist.strings; sourceTree = "<group>"; };
|
||||
1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = "<absolute>"; };
|
||||
21230CAF1284B26A0046E5A1 /* PBGitSVStashItem.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PBGitSVStashItem.h; sourceTree = "<group>"; };
|
||||
21230CB01284B26A0046E5A1 /* PBGitSVStashItem.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PBGitSVStashItem.m; sourceTree = "<group>"; };
|
||||
21230CAF1284B26A0046E5A1 /* PBGitMenuItem.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PBGitMenuItem.h; sourceTree = "<group>"; };
|
||||
21230CB01284B26A0046E5A1 /* PBGitMenuItem.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PBGitMenuItem.m; sourceTree = "<group>"; };
|
||||
21230D331284C5080046E5A1 /* PBGitStash.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PBGitStash.h; sourceTree = "<group>"; };
|
||||
21230D341284C5080046E5A1 /* PBGitStash.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PBGitStash.m; sourceTree = "<group>"; };
|
||||
21230D4D1284C92E0046E5A1 /* PBPresentable.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PBPresentable.h; sourceTree = "<group>"; };
|
||||
@@ -265,8 +274,22 @@
|
||||
21230DA0128553120046E5A1 /* PBCommandFactory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PBCommandFactory.h; sourceTree = "<group>"; };
|
||||
21230DA81285550B0046E5A1 /* PBCommandMenuItem.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PBCommandMenuItem.h; sourceTree = "<group>"; };
|
||||
21230DA91285550B0046E5A1 /* PBCommandMenuItem.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PBCommandMenuItem.m; sourceTree = "<group>"; };
|
||||
21230DEC12855A990046E5A1 /* PBStashCommand.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PBStashCommand.h; sourceTree = "<group>"; };
|
||||
21230DED12855A990046E5A1 /* PBStashCommand.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PBStashCommand.m; sourceTree = "<group>"; };
|
||||
21230ED11285EB5A0046E5A1 /* PBArgumentPicker.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = PBArgumentPicker.xib; sourceTree = "<group>"; };
|
||||
21230ED71285EDAF0046E5A1 /* PBArgumentPicker.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PBArgumentPicker.h; sourceTree = "<group>"; };
|
||||
21230ED81285EDAF0046E5A1 /* PBArgumentPicker.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PBArgumentPicker.m; sourceTree = "<group>"; };
|
||||
21230EE01285EFB20046E5A1 /* PBArgumentPickerController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PBArgumentPickerController.h; sourceTree = "<group>"; };
|
||||
21230EE11285EFB20046E5A1 /* PBArgumentPickerController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PBArgumentPickerController.m; sourceTree = "<group>"; };
|
||||
21230F7B1285FC6A0046E5A1 /* PBCommandWithParameter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PBCommandWithParameter.h; sourceTree = "<group>"; };
|
||||
21230F7C1285FC6A0046E5A1 /* PBCommandWithParameter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PBCommandWithParameter.m; sourceTree = "<group>"; };
|
||||
212311DB12872BF20046E5A1 /* PBGitSubmodule.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PBGitSubmodule.h; sourceTree = "<group>"; };
|
||||
212311DC12872BF20046E5A1 /* PBGitSubmodule.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PBGitSubmodule.m; sourceTree = "<group>"; };
|
||||
2123121B128735E90046E5A1 /* submodule-notmatching-index.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "submodule-notmatching-index.png"; sourceTree = "<group>"; };
|
||||
2123121C128735E90046E5A1 /* submodule-matching-index.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "submodule-matching-index.png"; sourceTree = "<group>"; };
|
||||
2123121D128735E90046E5A1 /* submodule-empty.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "submodule-empty.png"; sourceTree = "<group>"; };
|
||||
21231388128756ED0046E5A1 /* PBRemoteCommandFactory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PBRemoteCommandFactory.h; sourceTree = "<group>"; };
|
||||
21231389128756ED0046E5A1 /* PBRemoteCommandFactory.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PBRemoteCommandFactory.m; sourceTree = "<group>"; };
|
||||
212313B3128759C00046E5A1 /* PBOpenDocumentCommand.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PBOpenDocumentCommand.h; sourceTree = "<group>"; };
|
||||
212313B4128759C00046E5A1 /* PBOpenDocumentCommand.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PBOpenDocumentCommand.m; sourceTree = "<group>"; };
|
||||
29B97316FDCFA39411CA2CEA /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
|
||||
29B97324FDCFA39411CA2CEA /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = /System/Library/Frameworks/AppKit.framework; sourceTree = "<absolute>"; };
|
||||
29B97325FDCFA39411CA2CEA /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = /System/Library/Frameworks/Foundation.framework; sourceTree = "<absolute>"; };
|
||||
@@ -549,6 +572,8 @@
|
||||
080E96DDFE201D6D7F000001 /* Classes */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
21230EDF1285EF880046E5A1 /* Controller */,
|
||||
21230ED41285ED760046E5A1 /* View */,
|
||||
21230D991285524C0046E5A1 /* Commands */,
|
||||
21230D321284C4F10046E5A1 /* Model */,
|
||||
);
|
||||
@@ -597,6 +622,8 @@
|
||||
21230D331284C5080046E5A1 /* PBGitStash.h */,
|
||||
21230D341284C5080046E5A1 /* PBGitStash.m */,
|
||||
21230D4D1284C92E0046E5A1 /* PBPresentable.h */,
|
||||
212311DB12872BF20046E5A1 /* PBGitSubmodule.h */,
|
||||
212311DC12872BF20046E5A1 /* PBGitSubmodule.m */,
|
||||
);
|
||||
path = Model;
|
||||
sourceTree = "<group>";
|
||||
@@ -606,15 +633,37 @@
|
||||
children = (
|
||||
21230D9A128552720046E5A1 /* PBCommand.h */,
|
||||
21230D9B128552720046E5A1 /* PBCommand.m */,
|
||||
21230DEC12855A990046E5A1 /* PBStashCommand.h */,
|
||||
21230DED12855A990046E5A1 /* PBStashCommand.m */,
|
||||
21230D9D128552FA0046E5A1 /* PBStashCommandFactory.h */,
|
||||
21230D9E128552FA0046E5A1 /* PBStashCommandFactory.m */,
|
||||
21230DA0128553120046E5A1 /* PBCommandFactory.h */,
|
||||
21230F7B1285FC6A0046E5A1 /* PBCommandWithParameter.h */,
|
||||
21230F7C1285FC6A0046E5A1 /* PBCommandWithParameter.m */,
|
||||
21231388128756ED0046E5A1 /* PBRemoteCommandFactory.h */,
|
||||
21231389128756ED0046E5A1 /* PBRemoteCommandFactory.m */,
|
||||
212313B3128759C00046E5A1 /* PBOpenDocumentCommand.h */,
|
||||
212313B4128759C00046E5A1 /* PBOpenDocumentCommand.m */,
|
||||
);
|
||||
path = Commands;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
21230ED41285ED760046E5A1 /* View */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
21230ED71285EDAF0046E5A1 /* PBArgumentPicker.h */,
|
||||
21230ED81285EDAF0046E5A1 /* PBArgumentPicker.m */,
|
||||
);
|
||||
path = View;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
21230EDF1285EF880046E5A1 /* Controller */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
21230EE01285EFB20046E5A1 /* PBArgumentPickerController.h */,
|
||||
21230EE11285EFB20046E5A1 /* PBArgumentPickerController.m */,
|
||||
);
|
||||
path = Controller;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
29B97314FDCFA39411CA2CEA /* GitTest */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
@@ -642,6 +691,9 @@
|
||||
29B97315FDCFA39411CA2CEA /* Other Sources */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
2123121B128735E90046E5A1 /* submodule-notmatching-index.png */,
|
||||
2123121C128735E90046E5A1 /* submodule-matching-index.png */,
|
||||
2123121D128735E90046E5A1 /* submodule-empty.png */,
|
||||
D858108011274D28007F254B /* Branch.png */,
|
||||
D858108111274D28007F254B /* RemoteBranch.png */,
|
||||
D858108211274D28007F254B /* Tag.png */,
|
||||
@@ -695,6 +747,7 @@
|
||||
D8FDD9F511432A12005647F6 /* PBCloneRepositoryPanel.xib */,
|
||||
47DBDB680E94EF6500671A1E /* Preferences.xib */,
|
||||
F569AE920F2CBD7C00C2FFA7 /* Credits.html */,
|
||||
21230ED11285EB5A0046E5A1 /* PBArgumentPicker.xib */,
|
||||
F58DB55F10566E3900CFDF4A /* PBGitSidebarView.xib */,
|
||||
D8022FE711E124A0003C21F6 /* PBGitXMessageSheet.xib */,
|
||||
);
|
||||
@@ -793,8 +846,8 @@
|
||||
D8FDDA63114335E8005647F6 /* PBGitSVRemoteBranchItem.m */,
|
||||
D8FDDA68114335E8005647F6 /* PBGitSVTagItem.h */,
|
||||
D8FDDA69114335E8005647F6 /* PBGitSVTagItem.m */,
|
||||
21230CAF1284B26A0046E5A1 /* PBGitSVStashItem.h */,
|
||||
21230CB01284B26A0046E5A1 /* PBGitSVStashItem.m */,
|
||||
21230CAF1284B26A0046E5A1 /* PBGitMenuItem.h */,
|
||||
21230CB01284B26A0046E5A1 /* PBGitMenuItem.m */,
|
||||
D8FDDA60114335E8005647F6 /* PBGitSVOtherRevItem.h */,
|
||||
D8FDDA61114335E8005647F6 /* PBGitSVOtherRevItem.m */,
|
||||
D8FDDA5E114335E8005647F6 /* PBGitSVFolderItem.h */,
|
||||
@@ -1242,6 +1295,10 @@
|
||||
D8F4AB7912298CE200D6D53C /* rewindImage.pdf in Resources */,
|
||||
02B41A60123E307F00DFC531 /* PBCommitHookFailedSheet.xib in Resources */,
|
||||
21230D821284D1CC0046E5A1 /* stash-icon.png in Resources */,
|
||||
21230ED21285EB5A0046E5A1 /* PBArgumentPicker.xib in Resources */,
|
||||
2123121E128735E90046E5A1 /* submodule-notmatching-index.png in Resources */,
|
||||
2123121F128735E90046E5A1 /* submodule-matching-index.png in Resources */,
|
||||
21231220128735E90046E5A1 /* submodule-empty.png in Resources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
@@ -1392,12 +1449,17 @@
|
||||
D8B4DC571220D1E4004166D6 /* PBHistorySearchController.m in Sources */,
|
||||
D8712A00122B14EC00012334 /* GitXTextFieldCell.m in Sources */,
|
||||
02B41A5E123E307200DFC531 /* PBCommitHookFailedSheet.m in Sources */,
|
||||
21230CB11284B26A0046E5A1 /* PBGitSVStashItem.m in Sources */,
|
||||
21230CB11284B26A0046E5A1 /* PBGitMenuItem.m in Sources */,
|
||||
21230D351284C5080046E5A1 /* PBGitStash.m in Sources */,
|
||||
21230D9C128552720046E5A1 /* PBCommand.m in Sources */,
|
||||
21230D9F128552FA0046E5A1 /* PBStashCommandFactory.m in Sources */,
|
||||
21230DAA1285550B0046E5A1 /* PBCommandMenuItem.m in Sources */,
|
||||
21230DEE12855A990046E5A1 /* PBStashCommand.m in Sources */,
|
||||
21230ED91285EDAF0046E5A1 /* PBArgumentPicker.m in Sources */,
|
||||
21230EE21285EFB20046E5A1 /* PBArgumentPickerController.m in Sources */,
|
||||
21230F7D1285FC6A0046E5A1 /* PBCommandWithParameter.m in Sources */,
|
||||
212311DD12872BF20046E5A1 /* PBGitSubmodule.m in Sources */,
|
||||
2123138A128756ED0046E5A1 /* PBRemoteCommandFactory.m in Sources */,
|
||||
212313B5128759C00046E5A1 /* PBOpenDocumentCommand.m in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
|
||||
+5
-1
@@ -41,11 +41,15 @@
|
||||
#pragma mark Presentable
|
||||
|
||||
- (NSString *) displayDescription {
|
||||
return self.name;
|
||||
return [NSString stringWithFormat:@"%@ (%@)", self.message, self.name];
|
||||
}
|
||||
|
||||
- (NSString *) popupDescription {
|
||||
return [self description];
|
||||
}
|
||||
|
||||
- (NSImage *) icon {
|
||||
return [NSImage imageNamed:@"stash-icon.png"];
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
//
|
||||
// PBGitSubmodule.h
|
||||
// GitX
|
||||
//
|
||||
// Created by Tomasz Krasnyk on 10-11-07.
|
||||
// Copyright 2010 __MyCompanyName__. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Cocoa/Cocoa.h>
|
||||
#import "PBPresentable.h"
|
||||
|
||||
typedef enum {
|
||||
PBGitSubmoduleStateNotInitialized,
|
||||
PBGitSubmoduleStateMatchingIndex,
|
||||
PBGitSubmoduleStateDoesNotMatchIndex,
|
||||
} PBGitSubmoduleState;
|
||||
|
||||
@interface PBGitSubmodule : NSObject<PBPresentable> {
|
||||
NSString *name;
|
||||
NSString *path;
|
||||
NSString *checkedOutCommit;
|
||||
|
||||
PBGitSubmoduleState submoduleState;
|
||||
}
|
||||
@property (nonatomic, assign, readonly) PBGitSubmoduleState submoduleState;
|
||||
@property (nonatomic, retain, readonly) NSString *name;
|
||||
@property (nonatomic, retain, readonly) NSString *path;
|
||||
@property (nonatomic, retain, readonly) NSString *checkedOutCommit;
|
||||
|
||||
- (id) initWithRawSubmoduleStatusString:(NSString *) submoduleStatusString;
|
||||
|
||||
+ (NSImage *) imageForSubmoduleState:(PBGitSubmoduleState) state;
|
||||
+ (PBGitSubmoduleState) submoduleStateFromCharacter:(unichar) character;
|
||||
@end
|
||||
@@ -0,0 +1,113 @@
|
||||
//
|
||||
// PBGitSubmodule.m
|
||||
// GitX
|
||||
//
|
||||
// Created by Tomasz Krasnyk on 10-11-07.
|
||||
// Copyright 2010 __MyCompanyName__. All rights reserved.
|
||||
//
|
||||
|
||||
#import "PBGitSubmodule.h"
|
||||
|
||||
@interface PBGitSubmodule()
|
||||
@property (nonatomic, retain) NSString *name;
|
||||
@property (nonatomic, retain) NSString *path;
|
||||
@property (nonatomic, retain) NSString *checkedOutCommit;
|
||||
@end
|
||||
|
||||
|
||||
@implementation PBGitSubmodule
|
||||
@synthesize name;
|
||||
@synthesize path;
|
||||
@synthesize checkedOutCommit;
|
||||
@synthesize submoduleState;
|
||||
|
||||
- (id) initWithRawSubmoduleStatusString:(NSString *) submoduleStatusString {
|
||||
NSParameterAssert([submoduleStatusString length] > 0);
|
||||
|
||||
if (self = [super init]) {
|
||||
unichar status = [submoduleStatusString characterAtIndex:0];
|
||||
submoduleState = [PBGitSubmodule submoduleStateFromCharacter:status];
|
||||
NSScanner *scanner = [NSScanner scannerWithString:[submoduleStatusString substringFromIndex:1]];
|
||||
NSString *sha1 = nil;
|
||||
NSString *fullPath = nil;
|
||||
NSString *coName = nil;
|
||||
BOOL shouldContinue = [scanner scanUpToString:@" " intoString:&sha1];
|
||||
if (shouldContinue) {
|
||||
shouldContinue = [scanner scanUpToString:@"(" intoString:&fullPath];
|
||||
}
|
||||
if (shouldContinue) {
|
||||
shouldContinue = [scanner scanString:@"(" intoString:NULL];
|
||||
}
|
||||
if (shouldContinue) {
|
||||
shouldContinue = [scanner scanUpToString:@")" intoString:&coName];
|
||||
}
|
||||
self.path = [fullPath stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]];
|
||||
coName = [coName stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]];
|
||||
self.checkedOutCommit = [coName length] > 0 ? coName : nil;
|
||||
self.name = [self.path lastPathComponent];
|
||||
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void) dealloc {
|
||||
[name release];
|
||||
[path release];
|
||||
[checkedOutCommit release];
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
#pragma mark -
|
||||
#pragma mark Presentable
|
||||
|
||||
- (NSImage *) icon {
|
||||
return [PBGitSubmodule imageForSubmoduleState:self.submoduleState];
|
||||
}
|
||||
|
||||
- (NSString *) displayDescription {
|
||||
NSMutableString *result = [[NSMutableString alloc] initWithString:self.name];
|
||||
if (self.checkedOutCommit) {
|
||||
[result appendFormat:@" (%@)", self.checkedOutCommit];
|
||||
}
|
||||
return [result autorelease];
|
||||
}
|
||||
|
||||
- (NSString *) popupDescription {
|
||||
return [self description];
|
||||
}
|
||||
|
||||
|
||||
#pragma mark -
|
||||
#pragma mark Private
|
||||
|
||||
+ (NSImage *) imageForSubmoduleState:(PBGitSubmoduleState) state {
|
||||
NSString *imageName = nil;
|
||||
|
||||
if (state == PBGitSubmoduleStateMatchingIndex) {
|
||||
imageName = @"submodule-matching-index.png";
|
||||
} else if (state == PBGitSubmoduleStateNotInitialized) {
|
||||
imageName = @"submodule-empty.png";
|
||||
} else if (state == PBGitSubmoduleStateDoesNotMatchIndex) {
|
||||
imageName = @"submodule-notmatching-index.png";
|
||||
}
|
||||
|
||||
return [NSImage imageNamed:imageName];
|
||||
}
|
||||
|
||||
+ (PBGitSubmoduleState) submoduleStateFromCharacter:(unichar) character {
|
||||
PBGitSubmoduleState state = PBGitSubmoduleStateMatchingIndex;
|
||||
if (character == '-') {
|
||||
state = PBGitSubmoduleStateNotInitialized;
|
||||
} else if (character == '+') {
|
||||
state = PBGitSubmoduleStateDoesNotMatchIndex;
|
||||
} else if (character != ' ') {
|
||||
NSAssert1(NO, @"Ooops unsupported submodule status character: %c", character);
|
||||
}
|
||||
|
||||
return state;
|
||||
}
|
||||
|
||||
- (NSString *) description {
|
||||
return [NSString stringWithFormat:@"[SUBMODULE] %@(%@) %@", self.name, self.path, self.checkedOutCommit];
|
||||
}
|
||||
@end
|
||||
@@ -7,7 +7,8 @@
|
||||
//
|
||||
|
||||
|
||||
@protocol PBPresentable
|
||||
@protocol PBPresentable<NSObject>
|
||||
- (NSImage *) icon;
|
||||
- (NSString *) displayDescription;
|
||||
- (NSString *) popupDescription;
|
||||
@end
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
+9
-1
@@ -18,9 +18,17 @@
|
||||
|
||||
+ (NSTask *) taskForCommand:(NSString *)cmd withArgs:(NSArray *)args inDir:(NSString *)dir
|
||||
{
|
||||
NSMutableArray *filteredArguments = [[NSMutableArray alloc] init];
|
||||
for (NSString *param in args) {
|
||||
if ([param length] > 0) {
|
||||
[filteredArguments addObject:param];
|
||||
}
|
||||
}
|
||||
|
||||
NSTask* task = [[NSTask alloc] init];
|
||||
[task setLaunchPath:cmd];
|
||||
[task setArguments:args];
|
||||
[task setArguments:filteredArguments];
|
||||
[filteredArguments release];
|
||||
if (dir)
|
||||
[task setCurrentDirectoryPath:dir];
|
||||
|
||||
|
||||
@@ -113,6 +113,19 @@
|
||||
[ignoreItem setTarget:self];
|
||||
[ignoreItem setRepresentedObject:selectedFiles];
|
||||
[menu addItem:ignoreItem];
|
||||
|
||||
if ([selectedFiles count] == 1) {
|
||||
NSString *path = [[selectedFiles objectAtIndex:0] path];
|
||||
NSString *extension = [path pathExtension];
|
||||
if ([extension length] > 0) {
|
||||
ignoreText = [NSString stringWithFormat:@"Ignore Files with extension (.%@)", extension];
|
||||
ignoreItem = [[NSMenuItem alloc] initWithTitle:ignoreText action:@selector(ignoreFilesWithExtensionAction:) keyEquivalent:@""];
|
||||
[ignoreItem setTarget:self];
|
||||
[ignoreItem setRepresentedObject:extension];
|
||||
[menu addItem:ignoreItem];
|
||||
[ignoreItem release];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ([selectedFiles count] == 1) {
|
||||
@@ -171,6 +184,18 @@
|
||||
[commitController.index refresh];
|
||||
}
|
||||
|
||||
- (void) ignoreFilesWithExtensionAction:(id) sender {
|
||||
NSString *extension = [sender representedObject];
|
||||
if ([extension length] == 0)
|
||||
return;
|
||||
PBChangedFile *file = [[PBChangedFile alloc] initWithPath:[NSString stringWithFormat:@"*.%@", extension]];
|
||||
|
||||
|
||||
[self ignoreFiles:[NSArray arrayWithObject:file]];
|
||||
[file release];
|
||||
[commitController.index refresh];
|
||||
}
|
||||
|
||||
- (void)discardFilesAction:(id) sender
|
||||
{
|
||||
NSArray *selectedFiles = [sender representedObject];
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
//
|
||||
// PBGitSVStashItem.h
|
||||
// GitX
|
||||
//
|
||||
// Created by Tomasz Krasnyk on 10-11-05.
|
||||
// Copyright 2010 __MyCompanyName__. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import "PBSourceViewItem.h"
|
||||
#import "PBPresentable.h"
|
||||
|
||||
|
||||
@interface PBGitMenuItem : PBSourceViewItem {
|
||||
id<PBPresentable> sourceObject;
|
||||
}
|
||||
@property (nonatomic, retain, readonly) id<PBPresentable> sourceObject;
|
||||
|
||||
- initWithSourceObject:(id<PBPresentable>) anObject;
|
||||
@end
|
||||
@@ -0,0 +1,62 @@
|
||||
//
|
||||
// PBGitSVStashItem.m
|
||||
// GitX
|
||||
//
|
||||
// Created by Tomasz Krasnyk on 10-11-05.
|
||||
// Copyright 2010 __MyCompanyName__. All rights reserved.
|
||||
//
|
||||
|
||||
#import "PBGitMenuItem.h"
|
||||
|
||||
|
||||
@implementation PBGitMenuItem
|
||||
@synthesize sourceObject;
|
||||
|
||||
#pragma mark -
|
||||
#pragma mark Inits/dealloc
|
||||
//---------------------------------------------------------------------------------------------
|
||||
|
||||
- initWithSourceObject:(id<PBPresentable>) anObject {
|
||||
if (self = [super init]) {
|
||||
super.title = [anObject displayDescription];
|
||||
sourceObject = [anObject retain];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void) dealloc {
|
||||
[sourceObject release];
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------
|
||||
#pragma mark -
|
||||
|
||||
|
||||
- (NSImage *) icon {
|
||||
return [self.sourceObject icon];
|
||||
}
|
||||
|
||||
|
||||
- (void) addChild:(PBGitMenuItem *)child {
|
||||
BOOL added = NO;
|
||||
for (PBGitMenuItem *item in self.children) {
|
||||
if ([[(id)child.sourceObject path] hasPrefix:[(id)[item sourceObject] path]]) {
|
||||
[item addChild:child];
|
||||
added = YES;
|
||||
}
|
||||
}
|
||||
if (!added) {
|
||||
[super addChild:child];
|
||||
}
|
||||
}
|
||||
|
||||
- (void) expand {
|
||||
NSObject *item = self.parent;
|
||||
while (item && [item isKindOfClass:[PBGitMenuItem class]]) {
|
||||
[(id)item expand];
|
||||
item = [(id)item parent];
|
||||
}
|
||||
}
|
||||
|
||||
@end
|
||||
@@ -54,6 +54,7 @@ static NSString * PBStringFromBranchFilterType(PBGitXBranchFilterType type) {
|
||||
PBGitSHA* _headSha;
|
||||
|
||||
NSArray *stashes;
|
||||
NSArray *submodules;
|
||||
}
|
||||
|
||||
- (void) cloneRepositoryToPath:(NSString *)path bare:(BOOL)isBare;
|
||||
@@ -140,4 +141,6 @@ static NSString * PBStringFromBranchFilterType(PBGitXBranchFilterType type) {
|
||||
@property (assign) PBGitRevSpecifier *currentBranch;
|
||||
@property (assign) NSInteger currentBranchFilter;
|
||||
@property (retain) NSMutableDictionary* refs;
|
||||
@property (readonly) NSArray *stashes;
|
||||
@property (readonly) NSArray *submodules;
|
||||
@end
|
||||
|
||||
+24
-6
@@ -22,17 +22,20 @@
|
||||
#import "PBHistorySearchController.h"
|
||||
|
||||
#import "PBGitStash.h"
|
||||
#import "PBGitSubmodule.h"
|
||||
|
||||
NSString* PBGitRepositoryErrorDomain = @"GitXErrorDomain";
|
||||
|
||||
@interface PBGitRepository()
|
||||
@property (nonatomic, retain) NSArray *stashes;
|
||||
@property (nonatomic, retain) NSArray *submodules;
|
||||
@end
|
||||
|
||||
|
||||
|
||||
@implementation PBGitRepository
|
||||
@synthesize stashes;
|
||||
@synthesize submodules;
|
||||
@synthesize revisionList, branches, currentBranch, refs, hasChanged, config;
|
||||
@synthesize currentBranchFilter;
|
||||
|
||||
@@ -260,9 +263,11 @@ NSString* PBGitRepositoryErrorDomain = @"GitXErrorDomain";
|
||||
NSString *output = [self outputInWorkdirForArguments:arguments];
|
||||
NSArray *lines = [output componentsSeparatedByString:@"\n"];
|
||||
|
||||
NSMutableArray *loadedStashes = [[NSMutableArray alloc] init];
|
||||
NSMutableArray *loadedStashes = [[NSMutableArray alloc] initWithCapacity:[lines count]];
|
||||
|
||||
for (NSString *stashLine in lines) {
|
||||
if ([stashLine length] == 0)
|
||||
continue;
|
||||
PBGitStash *stash = [[PBGitStash alloc] initWithRawStashLine:stashLine];
|
||||
[loadedStashes addObject:stash];
|
||||
[stash release];
|
||||
@@ -272,6 +277,23 @@ NSString* PBGitRepositoryErrorDomain = @"GitXErrorDomain";
|
||||
[loadedStashes release];
|
||||
}
|
||||
|
||||
- (void) reloadSubmodules {
|
||||
|
||||
NSArray *arguments = [NSArray arrayWithObjects:@"submodule", @"status", @"--recursive", nil];
|
||||
NSString *output = [self outputInWorkdirForArguments:arguments];
|
||||
NSArray *lines = [output componentsSeparatedByString:@"\n"];
|
||||
|
||||
NSMutableArray *loadedSubmodules = [[NSMutableArray alloc] initWithCapacity:[lines count]];
|
||||
|
||||
for (NSString *submoduleLine in lines) {
|
||||
if ([submoduleLine length] == 0)
|
||||
continue;
|
||||
PBGitSubmodule *submodule = [[PBGitSubmodule alloc] initWithRawSubmoduleStatusString:submoduleLine];
|
||||
[loadedSubmodules addObject:submodule];
|
||||
}
|
||||
self.submodules = loadedSubmodules;
|
||||
}
|
||||
|
||||
- (void) reloadRefs
|
||||
{
|
||||
_headRef = nil;
|
||||
@@ -307,6 +329,7 @@ NSString* PBGitRepositoryErrorDomain = @"GitXErrorDomain";
|
||||
[self didChangeValueForKey:@"refs"];
|
||||
|
||||
[self reloadStashes];
|
||||
[self reloadSubmodules];
|
||||
|
||||
[[[self windowController] window] setTitle:[self displayName]];
|
||||
}
|
||||
@@ -1166,11 +1189,6 @@ NSString* PBGitRepositoryErrorDomain = @"GitXErrorDomain";
|
||||
return nil;
|
||||
}
|
||||
|
||||
- (void) dealloc {
|
||||
[stashes release];
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
- (void) finalize
|
||||
{
|
||||
NSLog(@"Dealloc of repository");
|
||||
|
||||
@@ -1,20 +0,0 @@
|
||||
//
|
||||
// PBGitSVStashItem.h
|
||||
// GitX
|
||||
//
|
||||
// Created by Tomasz Krasnyk on 10-11-05.
|
||||
// Copyright 2010 __MyCompanyName__. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import "PBSourceViewItem.h"
|
||||
#import "PBGitStash.h"
|
||||
|
||||
|
||||
@interface PBGitSVStashItem : PBSourceViewItem {
|
||||
PBGitStash *stash;
|
||||
}
|
||||
@property (nonatomic, retain, readonly) PBGitStash *stash;
|
||||
|
||||
- initWithStash:(PBGitStash *) aStash;
|
||||
@end
|
||||
@@ -1,45 +0,0 @@
|
||||
//
|
||||
// PBGitSVStashItem.m
|
||||
// GitX
|
||||
//
|
||||
// Created by Tomasz Krasnyk on 10-11-05.
|
||||
// Copyright 2010 __MyCompanyName__. All rights reserved.
|
||||
//
|
||||
|
||||
#import "PBGitSVStashItem.h"
|
||||
|
||||
|
||||
@implementation PBGitSVStashItem
|
||||
@synthesize stash;
|
||||
|
||||
#pragma mark -
|
||||
#pragma mark Inits/dealloc
|
||||
//---------------------------------------------------------------------------------------------
|
||||
|
||||
- initWithStash:(PBGitStash *) aStash {
|
||||
if (self = [super init]) {
|
||||
NSString *displayTitle = [NSString stringWithFormat:@"%@ (%@)", [aStash message], [aStash stashSourceMessage]];
|
||||
super.title = displayTitle;
|
||||
stash = [aStash retain];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void) dealloc {
|
||||
[stash release];
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------
|
||||
#pragma mark -
|
||||
|
||||
|
||||
- (NSImage *) icon {
|
||||
static NSImage *tagImage = nil;
|
||||
if (!tagImage)
|
||||
tagImage = [NSImage imageNamed:@"stash-icon.png"];
|
||||
|
||||
return tagImage;
|
||||
}
|
||||
|
||||
@end
|
||||
@@ -25,7 +25,7 @@
|
||||
/* Specific things */
|
||||
PBSourceViewItem *stage;
|
||||
|
||||
PBSourceViewItem *branches, *remotes, *tags, *others, *stashes;
|
||||
PBSourceViewItem *branches, *remotes, *tags, *others, *stashes, *submodules;
|
||||
|
||||
PBGitHistoryController *historyViewController;
|
||||
PBGitCommitController *commitViewController;
|
||||
|
||||
@@ -16,12 +16,16 @@
|
||||
#import "PBAddRemoteSheet.h"
|
||||
#import "PBGitDefaults.h"
|
||||
#import "PBHistorySearchController.h"
|
||||
#import "PBGitSVStashItem.h"
|
||||
#import "PBGitMenuItem.h"
|
||||
|
||||
#import "PBStashCommandFactory.h"
|
||||
#import "PBRemoteCommandFactory.h"
|
||||
#import "PBCommandMenuItem.h"
|
||||
#import "PBGitStash.h"
|
||||
#import "PBGitSubmodule.h"
|
||||
|
||||
static NSString * const kObservingContextStashes = @"stashesChanged";
|
||||
static NSString * const kObservingContextSubmodules = @"submodulesChanged";
|
||||
|
||||
@interface PBGitSidebarController ()
|
||||
|
||||
@@ -57,7 +61,9 @@ static NSString * const kObservingContextStashes = @"stashesChanged";
|
||||
|
||||
[repository addObserver:self forKeyPath:@"currentBranch" options:0 context:@"currentBranchChange"];
|
||||
[repository addObserver:self forKeyPath:@"branches" options:(NSKeyValueObservingOptionOld | NSKeyValueObservingOptionNew) context:@"branchesModified"];
|
||||
[repository addObserver:self forKeyPath:@"stashes" options:NSKeyValueObservingOptionNew context:@"stashesChanged"];
|
||||
[repository addObserver:self forKeyPath:@"stashes" options:NSKeyValueObservingOptionNew context:kObservingContextStashes];
|
||||
[repository addObserver:self forKeyPath:@"submodules" options:NSKeyValueObservingOptionNew context:kObservingContextSubmodules];
|
||||
|
||||
|
||||
[self menuNeedsUpdate:[actionButton menu]];
|
||||
|
||||
@@ -75,6 +81,7 @@ static NSString * const kObservingContextStashes = @"stashesChanged";
|
||||
[repository removeObserver:self forKeyPath:@"currentBranch"];
|
||||
[repository removeObserver:self forKeyPath:@"branches"];
|
||||
[repository removeObserver:self forKeyPath:@"stashes"];
|
||||
[repository removeObserver:self forKeyPath:@"submodules"];
|
||||
|
||||
[super closeView];
|
||||
}
|
||||
@@ -100,14 +107,39 @@ static NSString * const kObservingContextStashes = @"stashesChanged";
|
||||
for (PBGitRevSpecifier *rev in removedRevSpecs)
|
||||
[self removeRevSpec:rev];
|
||||
}
|
||||
} else if ([@"stashesChanged" isEqualToString:context]) { // isEqualToString: is not needed here
|
||||
} else if ([kObservingContextStashes isEqualToString:context]) { // isEqualToString: is not needed here
|
||||
[stashes.children removeAllObjects];
|
||||
NSArray *newStashes = [change objectForKey:NSKeyValueChangeNewKey];
|
||||
|
||||
PBGitMenuItem *lastItem = nil;
|
||||
for (PBGitStash *stash in newStashes) {
|
||||
PBGitSVStashItem *item = [[PBGitSVStashItem alloc] initWithStash:stash];
|
||||
PBGitMenuItem *item = [[PBGitMenuItem alloc] initWithSourceObject:stash];
|
||||
[stashes addChild:item];
|
||||
[item release];
|
||||
lastItem = item;
|
||||
}
|
||||
if (lastItem) {
|
||||
[sourceView PBExpandItem:lastItem expandParents:YES];
|
||||
}
|
||||
[sourceView reloadData];
|
||||
} else if ([kObservingContextSubmodules isEqualToString:context]) {
|
||||
[submodules.children removeAllObjects];
|
||||
NSArray *newSubmodules = [change objectForKey:NSKeyValueChangeNewKey];
|
||||
|
||||
for (PBGitSubmodule *submodule in newSubmodules) {
|
||||
PBGitMenuItem *item = [[PBGitMenuItem alloc] initWithSourceObject:submodule];
|
||||
|
||||
BOOL added = NO;
|
||||
for (PBGitMenuItem *addedItems in [submodules children]) {
|
||||
if ([[submodule path] hasPrefix:[(id)[addedItems sourceObject] path]]) {
|
||||
[addedItems addChild:item];
|
||||
added = YES;
|
||||
}
|
||||
}
|
||||
if (!added) {
|
||||
[submodules addChild:item];
|
||||
}
|
||||
[sourceView PBExpandItem:item expandParents:YES];
|
||||
}
|
||||
[sourceView reloadData];
|
||||
} else {
|
||||
@@ -268,6 +300,7 @@ static NSString * const kObservingContextStashes = @"stashesChanged";
|
||||
tags = [PBSourceViewItem groupItemWithTitle:@"Tags"];
|
||||
others = [PBSourceViewItem groupItemWithTitle:@"Other"];
|
||||
stashes = [PBSourceViewItem groupItemWithTitle:@"Stashes"];
|
||||
submodules = [PBSourceViewItem groupItemWithTitle:@"Submodules"];
|
||||
|
||||
for (PBGitRevSpecifier *rev in repository.branches)
|
||||
[self addRevSpec:rev];
|
||||
@@ -278,12 +311,14 @@ static NSString * const kObservingContextStashes = @"stashesChanged";
|
||||
[items addObject:tags];
|
||||
[items addObject:others];
|
||||
[items addObject:stashes];
|
||||
[items addObject:submodules];
|
||||
|
||||
[sourceView reloadData];
|
||||
[sourceView expandItem:project];
|
||||
[sourceView expandItem:branches expandChildren:YES];
|
||||
[sourceView expandItem:remotes];
|
||||
|
||||
//[sourceView expandItem:submodules expandChildren:YES];
|
||||
|
||||
[sourceView reloadItem:nil reloadChildren:YES];
|
||||
}
|
||||
|
||||
@@ -345,9 +380,11 @@ static NSString * const kObservingContextStashes = @"stashesChanged";
|
||||
- (NSMenu *) menuForRow:(NSInteger)row
|
||||
{
|
||||
PBSourceViewItem *viewItem = [sourceView itemAtRow:row];
|
||||
if ([viewItem isKindOfClass:[PBGitSVStashItem class]]) {
|
||||
PBGitSVStashItem *stashItem = (PBGitSVStashItem *) viewItem;
|
||||
NSArray *commands = [PBStashCommandFactory commandsForObject:[stashItem stash] repository:historyViewController.repository];
|
||||
if ([viewItem isKindOfClass:[PBGitMenuItem class]]) {
|
||||
PBGitMenuItem *stashItem = (PBGitMenuItem *) viewItem;
|
||||
NSMutableArray *commands = [[NSMutableArray alloc] init];
|
||||
[commands addObjectsFromArray:[PBStashCommandFactory commandsForObject:[stashItem sourceObject] repository:historyViewController.repository]];
|
||||
[commands addObjectsFromArray:[PBRemoteCommandFactory commandsForObject:[stashItem sourceObject] repository:historyViewController.repository]];
|
||||
if (!commands) {
|
||||
return nil;
|
||||
}
|
||||
|
||||
+3
-1
@@ -14,6 +14,8 @@
|
||||
#import "PBGitDefaults.h"
|
||||
#import "PBDiffWindowController.h"
|
||||
|
||||
#import "PBArgumentPickerController.h"
|
||||
|
||||
@implementation PBRefController
|
||||
|
||||
- (void)awakeFromNib
|
||||
@@ -212,7 +214,7 @@
|
||||
}
|
||||
|
||||
- (void) showTagInfoSheet:(PBRefMenuItem *)sender
|
||||
{
|
||||
{
|
||||
if ([[sender refish] refishType] != kGitXTagType)
|
||||
return;
|
||||
|
||||
|
||||
+14
-1
@@ -8,6 +8,9 @@
|
||||
|
||||
#import "PBRefMenuItem.h"
|
||||
|
||||
#import "PBStashCommandFactory.h"
|
||||
#import "PBCommandMenuItem.h"
|
||||
|
||||
|
||||
@implementation PBRefMenuItem
|
||||
@synthesize refish;
|
||||
@@ -133,11 +136,21 @@
|
||||
[items addObject:[PBRefMenuItem separatorItem]];
|
||||
NSString *deleteTitle = [NSString stringWithFormat:@"Delete %@…", targetRefName];
|
||||
[items addObject:[PBRefMenuItem itemWithTitle:deleteTitle action:@selector(showDeleteRefSheet:) enabled:!isDetachedHead]];
|
||||
|
||||
|
||||
for (PBRefMenuItem *item in items) {
|
||||
[item setTarget:target];
|
||||
[item setRefish:ref];
|
||||
}
|
||||
|
||||
NSArray *cmds = [PBStashCommandFactory commandsForObject:ref repository:repo];
|
||||
if ([cmds count] > 0) {
|
||||
for (PBCommand *cmd in cmds) {
|
||||
PBCommandMenuItem *item = [[PBCommandMenuItem alloc] initWithCommand:cmd];
|
||||
[item setEnabled:YES];
|
||||
[items addObject:item];
|
||||
[item release];
|
||||
}
|
||||
}
|
||||
|
||||
return items;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
//
|
||||
// PBArgumentPicker.h
|
||||
// GitX
|
||||
//
|
||||
// Created by Tomasz Krasnyk on 10-11-06.
|
||||
// Copyright 2010 __MyCompanyName__. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Cocoa/Cocoa.h>
|
||||
|
||||
|
||||
@interface PBArgumentPicker : NSView {
|
||||
IBOutlet NSTextField *textField;
|
||||
IBOutlet NSTextField *label;
|
||||
IBOutlet NSButton *okButton;
|
||||
IBOutlet NSButton *cancelButton;
|
||||
}
|
||||
@property (nonatomic, retain, readonly) NSTextField *textField;
|
||||
@property (nonatomic, retain, readonly) NSTextField *label;
|
||||
@property (nonatomic, retain, readonly) NSButton *okButton;
|
||||
@property (nonatomic, retain, readonly) NSButton *cancelButton;
|
||||
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,27 @@
|
||||
//
|
||||
// PBArgumentPicker.m
|
||||
// GitX
|
||||
//
|
||||
// Created by Tomasz Krasnyk on 10-11-06.
|
||||
// Copyright 2010 __MyCompanyName__. All rights reserved.
|
||||
//
|
||||
|
||||
#import "PBArgumentPicker.h"
|
||||
|
||||
|
||||
@implementation PBArgumentPicker
|
||||
@synthesize okButton;
|
||||
@synthesize cancelButton;
|
||||
@synthesize textField;
|
||||
@synthesize label;
|
||||
|
||||
- (id)initWithFrame:(NSRect)frame {
|
||||
self = [super initWithFrame:frame];
|
||||
if (self) {
|
||||
// Initialization code here.
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
|
||||
@end
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 3.3 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 3.4 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 425 B |
Reference in New Issue
Block a user