mirror of
https://github.com/MacPass/MacPass.git
synced 2025-12-14 07:02:39 +00:00
adopting new KeePassKit API for multiple matching window associations
This commit is contained in:
2
Cartfile
2
Cartfile
@@ -1,3 +1,3 @@
|
|||||||
github "sparkle-project/Sparkle" ~> 1.18.1
|
github "sparkle-project/Sparkle" ~> 1.18.1
|
||||||
github "mstarke/KeePassKit" "6f6a5c6b8d1a8fadb430a34f72785c67138ff58d"
|
github "mstarke/KeePassKit" "a0d459f52e0d4d3c0b0fba92de6dc54ddffba486"
|
||||||
github "mstarke/HNHUi" ~> 1.1
|
github "mstarke/HNHUi" ~> 1.1
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
github "mstarke/HNHUi" "1.2"
|
github "mstarke/HNHUi" "1.2"
|
||||||
github "mstarke/KeePassKit" "6f6a5c6b8d1a8fadb430a34f72785c67138ff58d"
|
github "mstarke/KeePassKit" "a0d459f52e0d4d3c0b0fba92de6dc54ddffba486"
|
||||||
github "sparkle-project/Sparkle" "1.18.1"
|
github "sparkle-project/Sparkle" "1.18.1"
|
||||||
|
|||||||
@@ -259,6 +259,8 @@
|
|||||||
- (void)_setupAdvancedTab:(KPKTree *)tree {
|
- (void)_setupAdvancedTab:(KPKTree *)tree {
|
||||||
HNHUISetStateFromBool(self.enableTrashCheckButton, tree.metaData.useTrash);
|
HNHUISetStateFromBool(self.enableTrashCheckButton, tree.metaData.useTrash);
|
||||||
self.selectTrashGoupPopUpButton.enabled = tree.metaData.useTrash;
|
self.selectTrashGoupPopUpButton.enabled = tree.metaData.useTrash;
|
||||||
|
self.historyMaximumItemsTextField.stringValue = [NSString stringWithFormat:@"%ld", tree.metaData.historyMaxItems];
|
||||||
|
self.historyMaxiumSizeTextField.stringValue = [NSString stringWithFormat:@"%ld", tree.metaData.historyMaxSize];
|
||||||
[self.enableTrashCheckButton bind:NSValueBinding toObject:self.selectTrashGoupPopUpButton withKeyPath:NSEnabledBinding options:nil];
|
[self.enableTrashCheckButton bind:NSValueBinding toObject:self.selectTrashGoupPopUpButton withKeyPath:NSEnabledBinding options:nil];
|
||||||
[self _updateTrashFolders:tree];
|
[self _updateTrashFolders:tree];
|
||||||
|
|
||||||
|
|||||||
@@ -65,13 +65,18 @@
|
|||||||
MPAutotypeContext *context;
|
MPAutotypeContext *context;
|
||||||
for(KPKEntry *entry in autotypeEntries) {
|
for(KPKEntry *entry in autotypeEntries) {
|
||||||
/* search in Autotype entries for match */
|
/* search in Autotype entries for match */
|
||||||
KPKWindowAssociation *association = [entry.autotype windowAssociationMatchingWindowTitle:windowTitle];
|
|
||||||
context = [[MPAutotypeContext alloc] initWithWindowAssociation:association];
|
|
||||||
if(context.valid) {
|
|
||||||
[contexts addObject:context];
|
|
||||||
continue; // association did match
|
|
||||||
}
|
|
||||||
BOOL foundMatch = NO;
|
BOOL foundMatch = NO;
|
||||||
|
for(KPKWindowAssociation *association in [entry.autotype windowAssociationsMatchingWindowTitle:windowTitle]) {
|
||||||
|
context = [[MPAutotypeContext alloc] initWithWindowAssociation:association];
|
||||||
|
if(context.valid) {
|
||||||
|
foundMatch = YES;
|
||||||
|
[contexts addObject:context];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/* association match found, no need to use the default sequence! */
|
||||||
|
if(foundMatch) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
/* Test for entry title in window title */
|
/* Test for entry title in window title */
|
||||||
if(matchTitle && !foundMatch) {
|
if(matchTitle && !foundMatch) {
|
||||||
foundMatch = [windowTitle rangeOfString:entry.title options:NSCaseInsensitiveSearch].length != 0 || [entry.title rangeOfString:windowTitle options:NSCaseInsensitiveSearch].length != 0;
|
foundMatch = [windowTitle rangeOfString:entry.title options:NSCaseInsensitiveSearch].length != 0 || [entry.title rangeOfString:windowTitle options:NSCaseInsensitiveSearch].length != 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user