Added checkbox to enable search after unlock

This commit is contained in:
Michael Starke
2021-11-08 16:44:38 +01:00
parent 12406bf10f
commit dc4cbc6777
4 changed files with 46 additions and 17 deletions

View File

@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="17701" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="19455" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
<dependencies>
<deployment identifier="macosx"/>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="17701"/>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="19455"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
@@ -11,6 +11,7 @@
<outlet property="browserPopup" destination="ehI-gq-lsb" id="YMy-L1-pQw"/>
<outlet property="doubleClickTitlePopup" destination="40" id="aKJ-q9-xjb"/>
<outlet property="doubleClickURLPopup" destination="13" id="fGP-5I-0XK"/>
<outlet property="focusSearchAfterUnlockCheckButton" destination="VIS-db-Y8n" id="xVr-wf-eJg"/>
<outlet property="generatePasswordOnEntriesCheckButton" destination="yxq-YK-61i" id="0SK-CT-Wdn"/>
<outlet property="hideAfterCopyToClipboardCheckButton" destination="vT4-wF-ned" id="d7e-vc-cAQ"/>
<outlet property="updatePasswordOnTemplateEntriesCheckButton" destination="LPY-sM-hjS" id="wav-op-uck"/>
@@ -20,10 +21,10 @@
<customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
<customObject id="-3" userLabel="Application" customClass="NSObject"/>
<customView translatesAutoresizingMaskIntoConstraints="NO" id="1">
<rect key="frame" x="0.0" y="0.0" width="449" height="340"/>
<rect key="frame" x="0.0" y="0.0" width="449" height="415"/>
<subviews>
<box autoresizesSubviews="NO" horizontalHuggingPriority="249" verticalHuggingPriority="500" borderType="line" title="Entry Table" translatesAutoresizingMaskIntoConstraints="NO" id="2">
<rect key="frame" x="17" y="194" width="415" height="98"/>
<rect key="frame" x="17" y="269" width="415" height="98"/>
<view key="contentView" id="cfa-nq-Kzt">
<rect key="frame" x="3" y="3" width="409" height="80"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
@@ -90,7 +91,7 @@
</constraints>
</box>
<popUpButton verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="ehI-gq-lsb">
<rect key="frame" x="112" y="296" width="136" height="25"/>
<rect key="frame" x="112" y="371" width="136" height="25"/>
<popUpButtonCell key="cell" type="push" title="Default Browser" bezelStyle="rounded" alignment="left" lineBreakMode="truncatingTail" state="on" borderStyle="borderAndBezel" imageScaling="proportionallyDown" inset="2" selectedItem="7YX-EA-9KA" id="7Ip-sU-sAK">
<behavior key="behavior" lightByBackground="YES" lightByGray="YES"/>
<font key="font" metaFont="menu"/>
@@ -104,7 +105,7 @@
</popUpButtonCell>
</popUpButton>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="lOo-NI-b07">
<rect key="frame" x="18" y="303" width="91" height="16"/>
<rect key="frame" x="18" y="378" width="91" height="16"/>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" enabled="NO" sendsActionOnEndEditing="YES" title="Open URLs in:" id="soD-wI-YOH">
<font key="font" metaFont="system"/>
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
@@ -112,7 +113,7 @@
</textFieldCell>
</textField>
<box horizontalHuggingPriority="249" borderType="line" title="New Entries" translatesAutoresizingMaskIntoConstraints="NO" id="Xvt-tP-TbR">
<rect key="frame" x="17" y="94" width="415" height="96"/>
<rect key="frame" x="17" y="169" width="415" height="96"/>
<view key="contentView" id="g0i-00-sng">
<rect key="frame" x="3" y="3" width="409" height="78"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
@@ -144,7 +145,7 @@
</view>
</box>
<box horizontalHuggingPriority="249" title="Clipboard" translatesAutoresizingMaskIntoConstraints="NO" id="Kff-Xp-hAT">
<rect key="frame" x="17" y="16" width="415" height="74"/>
<rect key="frame" x="17" y="91" width="415" height="74"/>
<view key="contentView" id="Ntf-zj-VZL">
<rect key="frame" x="3" y="3" width="409" height="56"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
@@ -165,25 +166,50 @@
</constraints>
</view>
</box>
<box title="Search" translatesAutoresizingMaskIntoConstraints="NO" id="CLc-Vg-aWg">
<rect key="frame" x="17" y="16" width="415" height="71"/>
<view key="contentView" id="KWW-Ss-mhI">
<rect key="frame" x="3" y="3" width="409" height="53"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="VIS-db-Y8n">
<rect key="frame" x="18" y="16" width="261" height="18"/>
<buttonCell key="cell" type="check" title="Focus search after unlocking database" bezelStyle="regularSquare" imagePosition="left" state="on" inset="2" id="I0s-iS-0Sc">
<behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
<font key="font" metaFont="system"/>
</buttonCell>
</button>
</subviews>
<constraints>
<constraint firstItem="VIS-db-Y8n" firstAttribute="leading" secondItem="KWW-Ss-mhI" secondAttribute="leading" constant="20" symbolic="YES" id="GkT-nF-RKV"/>
<constraint firstAttribute="bottom" secondItem="VIS-db-Y8n" secondAttribute="bottom" constant="17" id="VbT-rK-ifi"/>
<constraint firstAttribute="trailing" relation="greaterThanOrEqual" secondItem="VIS-db-Y8n" secondAttribute="trailing" constant="20" symbolic="YES" id="XzO-KB-P5X"/>
<constraint firstItem="VIS-db-Y8n" firstAttribute="top" secondItem="KWW-Ss-mhI" secondAttribute="top" constant="20" symbolic="YES" id="ciI-U3-HDa"/>
</constraints>
</view>
</box>
</subviews>
<constraints>
<constraint firstItem="2" firstAttribute="leading" secondItem="1" secondAttribute="leading" constant="20" symbolic="YES" id="5"/>
<constraint firstAttribute="trailing" secondItem="2" secondAttribute="trailing" constant="20" symbolic="YES" id="8"/>
<constraint firstAttribute="bottom" secondItem="CLc-Vg-aWg" secondAttribute="bottom" constant="20" symbolic="YES" id="1VG-9p-VC6"/>
<constraint firstItem="Kff-Xp-hAT" firstAttribute="top" secondItem="Xvt-tP-TbR" secondAttribute="bottom" constant="8" symbolic="YES" id="3RL-tm-4wu"/>
<constraint firstAttribute="bottom" secondItem="Kff-Xp-hAT" secondAttribute="bottom" constant="20" symbolic="YES" id="8k6-1d-wPj"/>
<constraint firstItem="Xvt-tP-TbR" firstAttribute="leading" secondItem="1" secondAttribute="leading" constant="20" symbolic="YES" id="BH4-4y-uma"/>
<constraint firstItem="2" firstAttribute="top" secondItem="ehI-gq-lsb" secondAttribute="bottom" constant="8" symbolic="YES" id="CnN-aU-Qa1"/>
<constraint firstItem="Xvt-tP-TbR" firstAttribute="top" secondItem="2" secondAttribute="bottom" constant="8" symbolic="YES" id="FVK-Uf-kLv"/>
<constraint firstItem="ehI-gq-lsb" firstAttribute="leading" secondItem="lOo-NI-b07" secondAttribute="trailing" constant="8" symbolic="YES" id="KxB-TG-rH5"/>
<constraint firstAttribute="trailing" relation="greaterThanOrEqual" secondItem="ehI-gq-lsb" secondAttribute="trailing" constant="20" symbolic="YES" id="Ldw-aO-wuX"/>
<constraint firstItem="ehI-gq-lsb" firstAttribute="top" secondItem="1" secondAttribute="top" constant="20" symbolic="YES" id="MAe-l7-8k2"/>
<constraint firstItem="CLc-Vg-aWg" firstAttribute="top" secondItem="Kff-Xp-hAT" secondAttribute="bottom" constant="8" symbolic="YES" id="MZ9-vN-2za"/>
<constraint firstAttribute="trailing" secondItem="Kff-Xp-hAT" secondAttribute="trailing" constant="20" symbolic="YES" id="VLC-2A-Vdd"/>
<constraint firstItem="Kff-Xp-hAT" firstAttribute="leading" secondItem="1" secondAttribute="leading" constant="20" symbolic="YES" id="Vle-Z0-mh8"/>
<constraint firstAttribute="trailing" secondItem="Xvt-tP-TbR" secondAttribute="trailing" constant="20" id="anU-nC-YAw"/>
<constraint firstAttribute="trailing" secondItem="CLc-Vg-aWg" secondAttribute="trailing" constant="20" symbolic="YES" id="fXu-pq-O8Q"/>
<constraint firstItem="lOo-NI-b07" firstAttribute="firstBaseline" secondItem="ehI-gq-lsb" secondAttribute="firstBaseline" id="gFK-Ce-Q3b"/>
<constraint firstItem="lOo-NI-b07" firstAttribute="leading" secondItem="1" secondAttribute="leading" constant="20" symbolic="YES" id="kaP-lB-tDY"/>
<constraint firstItem="CLc-Vg-aWg" firstAttribute="leading" secondItem="1" secondAttribute="leading" constant="20" symbolic="YES" id="wyw-aC-Vkj"/>
</constraints>
<point key="canvasLocation" x="-752" y="-257"/>
<point key="canvasLocation" x="-906.5" y="-188.5"/>
</customView>
</objects>
</document>

View File

@@ -33,7 +33,6 @@
isValid &= [validateTarget validateToolbarItem:self];
}
self.enabled = isValid;
NSLog(@"Validating ToolbarItem:%@ valid:%@", self, isValid ? @"YES" : @"NO");
}
}
@end

View File

@@ -25,11 +25,6 @@
@interface MPWorkflowPreferencesController : MPViewController <MPPreferencesTab>
@property (strong) IBOutlet NSPopUpButton *browserPopup;
@property (strong) IBOutlet NSPopUpButton *doubleClickURLPopup;
@property (strong) IBOutlet NSPopUpButton *doubleClickTitlePopup;
@property (strong) IBOutlet NSButton *updatePasswordOnTemplateEntriesCheckButton;
@property (strong) IBOutlet NSButton *generatePasswordOnEntriesCheckButton;
@property (strong) IBOutlet NSButton *hideAfterCopyToClipboardCheckButton;
@end

View File

@@ -26,6 +26,14 @@
@interface MPWorkflowPreferencesController ()
@property (strong) IBOutlet NSPopUpButton *browserPopup;
@property (strong) IBOutlet NSPopUpButton *doubleClickURLPopup;
@property (strong) IBOutlet NSPopUpButton *doubleClickTitlePopup;
@property (strong) IBOutlet NSButton *updatePasswordOnTemplateEntriesCheckButton;
@property (strong) IBOutlet NSButton *generatePasswordOnEntriesCheckButton;
@property (strong) IBOutlet NSButton *hideAfterCopyToClipboardCheckButton;
@property (strong) IBOutlet NSButton *focusSearchAfterUnlockCheckButton;
- (IBAction)_showCustomBrowserSelection:(id)sender;
@end
@@ -44,6 +52,7 @@
[self.updatePasswordOnTemplateEntriesCheckButton bind:NSValueBinding toObject:defaultsController withKeyPath:[MPSettingsHelper defaultControllerPathForKey:kMPSettingsKeyUpdatePasswordOnTemplateEntries] options:nil];
[self.generatePasswordOnEntriesCheckButton bind:NSValueBinding toObject:defaultsController withKeyPath:[MPSettingsHelper defaultControllerPathForKey:kMPSettingsKeyGeneratePasswordForNewEntires] options:nil];
[self.hideAfterCopyToClipboardCheckButton bind:NSValueBinding toObject:defaultsController withKeyPath:[MPSettingsHelper defaultControllerPathForKey:kMPSettingsKeyHideAfterCopyToClipboard] options:nil];
[self.focusSearchAfterUnlockCheckButton bind:NSValueBinding toObject:defaultsController withKeyPath:[MPSettingsHelper defaultControllerPathForKey:kMPSettingsKeyFocusSearchAfterUnlock] options:nil];
[self _updateBrowserSelection];
}