Autotype for a selected entry. WIP

This commit is contained in:
michael starke
2014-12-16 20:37:55 +01:00
parent 1f92e5aeef
commit 3eb98a516c
9 changed files with 101 additions and 83 deletions

View File

@@ -7,25 +7,26 @@
//
#import "MPDocumentWindowController.h"
#import "MPDocument.h"
#import "MPPasswordInputController.h"
#import "MPEntryViewController.h"
#import "MPToolbarDelegate.h"
#import "MPOutlineViewController.h"
#import "MPInspectorViewController.h"
#import "MPAppDelegate.h"
#import "MPActionHelper.h"
#import "MPDatabaseSettingsWindowController.h"
#import "MPPasswordEditWindowController.h"
#import "MPAppDelegate.h"
#import "MPAutotypeDaemon.h"
#import "MPConstants.h"
#import "MPSettingsHelper.h"
#import "MPDocumentWindowDelegate.h"
#import "MPFixAutotypeWindowController.h"
#import "MPContextToolbarButton.h"
#import "KPKTree.h"
#import "KPKEntry.h"
#import "MPDatabaseSettingsWindowController.h"
#import "MPDocument.h"
#import "MPDocumentWindowDelegate.h"
#import "MPEntryViewController.h"
#import "MPFixAutotypeWindowController.h"
#import "MPInspectorViewController.h"
#import "MPOutlineViewController.h"
#import "MPPasswordEditWindowController.h"
#import "MPPasswordInputController.h"
#import "MPSettingsHelper.h"
#import "MPToolbarDelegate.h"
#import "KPKCompositeKey.h"
#import "KPKEntry.h"
#import "KPKTree.h"
typedef NS_ENUM(NSUInteger, MPAlertContext) {
MPAlertLossySaveWarning,
@@ -369,6 +370,13 @@ typedef void (^MPPasswordChangedBlock)(BOOL didChangePassword);
[[NSUserDefaults standardUserDefaults] setBool:!inspectorWasVisible forKey:kMPSettingsKeyShowInspector];
}
- (void)performAutotypeForEntry:(id)sender {
id<MPTargetNodeResolving> entryResolver = [NSApp targetForAction:@selector(currentTargetEntry)];
KPKEntry *targetEntry = [entryResolver currentTargetEntry];
MPAutotypeDaemon *autotyped = ((MPAppDelegate *)[NSApplication sharedApplication]).autotypeDaemon;
[autotyped performAutotypeForEntry:targetEntry];
}
- (void)showInspector:(id)sender {
if(![self _isInspectorVisible]) {
[self toggleInspector:sender];