mirror of
https://github.com/kennethreitz-archive/gitx.git
synced 2026-06-05 23:40:18 +00:00
41 lines
1.1 KiB
Objective-C
41 lines
1.1 KiB
Objective-C
//
|
|
// 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
|