From 7376a5c88782ee4ea4c7fa8b14bd38fd88b870f6 Mon Sep 17 00:00:00 2001 From: Michael Starke Date: Mon, 6 Dec 2021 11:04:14 +0100 Subject: [PATCH] Wired up tags in group inspector --- MacPass/Base.lproj/DatabaseSettingsWindow.xib | 6 +++--- MacPass/Base.lproj/GroupInspectorView.xib | 1 + MacPass/MPGroupInspectorViewController.h | 13 +++++++------ MacPass/MPGroupInspectorViewController.m | 4 ++++ 4 files changed, 15 insertions(+), 9 deletions(-) diff --git a/MacPass/Base.lproj/DatabaseSettingsWindow.xib b/MacPass/Base.lproj/DatabaseSettingsWindow.xib index 7249b438..11b02caa 100644 --- a/MacPass/Base.lproj/DatabaseSettingsWindow.xib +++ b/MacPass/Base.lproj/DatabaseSettingsWindow.xib @@ -58,7 +58,7 @@ - + diff --git a/MacPass/Base.lproj/GroupInspectorView.xib b/MacPass/Base.lproj/GroupInspectorView.xib index 11016187..010f75fe 100644 --- a/MacPass/Base.lproj/GroupInspectorView.xib +++ b/MacPass/Base.lproj/GroupInspectorView.xib @@ -14,6 +14,7 @@ + diff --git a/MacPass/MPGroupInspectorViewController.h b/MacPass/MPGroupInspectorViewController.h index 734ba595..6b41904c 100644 --- a/MacPass/MPGroupInspectorViewController.h +++ b/MacPass/MPGroupInspectorViewController.h @@ -27,14 +27,15 @@ @interface MPGroupInspectorViewController : MPViewController @property (strong) IBOutlet NSView *contentView; -@property (weak) IBOutlet HNHUITextField *titleTextField; +@property (strong) IBOutlet HNHUITextField *titleTextField; -@property (weak) IBOutlet NSButton *expiresCheckButton; -@property (weak) IBOutlet NSButton *expireDateSelectButton; +@property (strong) IBOutlet NSButton *expiresCheckButton; +@property (strong) IBOutlet NSButton *expireDateSelectButton; -@property (weak) IBOutlet NSPopUpButton *searchPopupButton; -@property (weak) IBOutlet NSPopUpButton *autotypePopupButton; -@property (weak) IBOutlet HNHUITextField *autotypeSequenceTextField; +@property (strong) IBOutlet NSPopUpButton *searchPopupButton; +@property (strong) IBOutlet NSPopUpButton *autotypePopupButton; +@property (strong) IBOutlet HNHUITextField *autotypeSequenceTextField; +@property (strong) IBOutlet NSTokenField *tagsTokenField; - (void)registerNotificationsForDocument:(MPDocument *)document; @end diff --git a/MacPass/MPGroupInspectorViewController.m b/MacPass/MPGroupInspectorViewController.m index ed13bccd..ed6c61d7 100644 --- a/MacPass/MPGroupInspectorViewController.m +++ b/MacPass/MPGroupInspectorViewController.m @@ -127,6 +127,10 @@ toObject:self withKeyPath:[NSString stringWithFormat:@"%@.%@", NSStringFromSelector(@selector(representedObject)), NSStringFromSelector(@selector(isSearchEnabled))] options:nil]; + [self.tagsTokenField bind:NSValueBinding + toObject:self + withKeyPath:[NSString stringWithFormat:@"%@.%@", NSStringFromSelector(@selector(representedObject)), NSStringFromSelector(@selector(tags))] + options:nullPlaceholderOptionsDict]; } - (IBAction)toggleExpire:(NSButton*)sender { KPKGroup *group = self.representedObject;