From 08c7dfa650eeb7b13cec9dc5e4c784ec2e3134da Mon Sep 17 00:00:00 2001 From: michael starke Date: Tue, 4 Mar 2014 20:26:10 +0100 Subject: [PATCH] Add/Remove window associations works via gui. KeePassKit updated to bubble auto type sequence for associations if none is set. --- KeePassKit | 2 +- MacPass/EntryInspectorView.xib | 8 +++++++- MacPass/MPAutotypePaste.h | 2 +- MacPass/MPEntryInspectorViewController.m | 3 +++ 4 files changed, 12 insertions(+), 3 deletions(-) diff --git a/KeePassKit b/KeePassKit index 65f7098e..3ec29b38 160000 --- a/KeePassKit +++ b/KeePassKit @@ -1 +1 @@ -Subproject commit 65f7098eaf220c64fc728b2212bb7119e807e97a +Subproject commit 3ec29b3868ea1454f39e6686ee4f23fa3d1ac8c4 diff --git a/MacPass/EntryInspectorView.xib b/MacPass/EntryInspectorView.xib index 81ad35e1..c7a1ab4e 100644 --- a/MacPass/EntryInspectorView.xib +++ b/MacPass/EntryInspectorView.xib @@ -1,5 +1,5 @@ - + @@ -857,6 +857,9 @@ + + + diff --git a/MacPass/MPAutotypePaste.h b/MacPass/MPAutotypePaste.h index 81491d93..bc85f50d 100644 --- a/MacPass/MPAutotypePaste.h +++ b/MacPass/MPAutotypePaste.h @@ -15,4 +15,4 @@ - (instancetype)initWithString:(NSString *)aString; -@end +@end \ No newline at end of file diff --git a/MacPass/MPEntryInspectorViewController.m b/MacPass/MPEntryInspectorViewController.m index dd06d5aa..6d26f209 100644 --- a/MacPass/MPEntryInspectorViewController.m +++ b/MacPass/MPEntryInspectorViewController.m @@ -159,11 +159,14 @@ typedef NS_ENUM(NSUInteger, MPEntryTab) { } - (void)addWindowAssociation:(id)sender { + KPKWindowAssociation *associtation = [[KPKWindowAssociation alloc] initWithWindow:NSLocalizedString(@"DEFAULT_WINDOW_TITLE", "") keystrokeSequence:nil]; + [self.entry.autotype addAssociation:associtation]; } - (void)removeWindowAssociation:(id)sender { NSInteger row = [self.windowAssociationsTableView selectedRow]; if(row > - 1 && row < [self.entry.autotype.associations count]) { + [self.entry.autotype removeAssociation:self.entry.autotype.associations[row]]; } }