mirror of https://github.com/ksherlock/ample.git
move first responder resignation code to a function.
This commit is contained in:
parent
afc3ac608a
commit
5af5e2e300
|
@ -594,11 +594,15 @@ static NSString *ShellQuote(NSString *s) {
|
||||||
//return [super validateMenuItem: menuItem]; // not implemented?
|
//return [super validateMenuItem: menuItem]; // not implemented?
|
||||||
}
|
}
|
||||||
|
|
||||||
|
-(void)defocus {
|
||||||
|
[[self window] makeFirstResponder: nil]; // in case text is being edited...
|
||||||
|
}
|
||||||
|
|
||||||
# pragma mark - IBActions
|
# pragma mark - IBActions
|
||||||
|
|
||||||
- (IBAction)launchAction:(id)sender {
|
- (IBAction)launchAction:(id)sender {
|
||||||
|
|
||||||
[[self window] makeFirstResponder: nil]; // in case text is being edited...
|
[self defocus];
|
||||||
if (![_args count]) return;
|
if (![_args count]) return;
|
||||||
|
|
||||||
[LogWindowController controllerForArgs: _args];
|
[LogWindowController controllerForArgs: _args];
|
||||||
|
@ -608,7 +612,7 @@ static NSString *ShellQuote(NSString *s) {
|
||||||
|
|
||||||
- (IBAction)listMedia:(id)sender {
|
- (IBAction)listMedia:(id)sender {
|
||||||
|
|
||||||
[[self window] makeFirstResponder: nil]; // in case text is being edited...
|
[self defocus];
|
||||||
if (!_machine) return;
|
if (!_machine) return;
|
||||||
|
|
||||||
NSMutableArray *argv = [NSMutableArray new];
|
NSMutableArray *argv = [NSMutableArray new];
|
||||||
|
@ -635,7 +639,7 @@ static NSString *ShellQuote(NSString *s) {
|
||||||
|
|
||||||
- (IBAction)listSlots:(id)sender {
|
- (IBAction)listSlots:(id)sender {
|
||||||
|
|
||||||
[[self window] makeFirstResponder: nil]; // in case text is being edited...
|
[self defocus];
|
||||||
if (!_machine) return;
|
if (!_machine) return;
|
||||||
|
|
||||||
NSMutableArray *argv = [NSMutableArray new];
|
NSMutableArray *argv = [NSMutableArray new];
|
||||||
|
@ -935,7 +939,7 @@ static NSString *ShellQuote(NSString *s) {
|
||||||
|
|
||||||
-(NSDictionary *)makeBookmark {
|
-(NSDictionary *)makeBookmark {
|
||||||
|
|
||||||
[[self window] makeFirstResponder: nil];
|
[self defocus];
|
||||||
|
|
||||||
NSMutableDictionary *dict = [NSMutableDictionary new];
|
NSMutableDictionary *dict = [NSMutableDictionary new];
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue