Add/Remove window associations works via gui. KeePassKit updated to bubble auto type sequence for associations if none is set.

This commit is contained in:
michael starke
2014-03-04 20:26:10 +01:00
parent 0af0d08082
commit 08c7dfa650
4 changed files with 12 additions and 3 deletions

View File

@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="4514" systemVersion="13B42" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="4514" systemVersion="13C64" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
<dependencies>
<deployment version="1070" defaultVersion="1080" identifier="macosx"/>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="4514"/>
@@ -857,6 +857,9 @@
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
<font key="font" metaFont="cellTitle"/>
</buttonCell>
<connections>
<action selector="addWindowAssociation:" target="-2" id="U5q-Gf-tsI"/>
</connections>
</button>
<button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="AAj-Ak-z46">
<rect key="frame" x="209" y="125" width="32" height="19"/>
@@ -868,6 +871,9 @@
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
<font key="font" metaFont="cellTitle"/>
</buttonCell>
<connections>
<action selector="removeWindowAssociation:" target="-2" id="hAz-SO-hJ0"/>
</connections>
</button>
</subviews>
<constraints>

View File

@@ -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]];
}
}