Files
MacPass/MacPass/MPAutotypePaste.m
michael starke 0160b9055a Cleaned up logging
Added bagde icon to show timeout for clipboard clearing
Badge display not optimal if clipboard clearing is disabled
Autotype incovation on locked documents now activates MacPass to unlock.
If multipel entries match, the seleciton dialog will pop up as well
2014-03-27 22:06:00 +01:00

44 lines
805 B
Objective-C

//
// MPAutotypePaste.m
// MacPass
//
// Created by Michael Starke on 24/11/13.
// Copyright (c) 2013 HicknHack Software GmbH. All rights reserved.
//
#import "MPAutotypePaste.h"
#import "MPPasteBoardController.h"
#import "NSString+Commands.h"
@interface MPAutotypePaste ()
@property (strong) NSString *pasteData;
@end
@implementation MPAutotypePaste
- (instancetype)initWithString:(NSString *)aString {
self = [super init];
if(self) {
self.pasteData = aString;
}
return self;
}
- (void)execute {
if([self.pasteData length] > 0) {
MPPasteBoardController *controller = [MPPasteBoardController defaultController];
[controller copyObjects:@[self.pasteData]];
[self sendPasteKeyCode];
}
}
- (BOOL)isValid {
/* Pasting shoudl always be valid */
return YES;
}
@end