mirror of
https://github.com/MacPass/MacPass.git
synced 2025-12-14 00:02:28 +00:00
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
44 lines
805 B
Objective-C
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
|