mirror of
https://github.com/MacPass/MacPass.git
synced 2025-12-13 21:42:32 +00:00
Switchted to NSStackView for search options. This raises the deployment target to 10.11.
This commit is contained in:
@@ -26,115 +26,132 @@
|
||||
<customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
|
||||
<customObject id="-3" userLabel="Application" customClass="NSObject"/>
|
||||
<tabView type="noTabsNoBorder" translatesAutoresizingMaskIntoConstraints="NO" id="8MB-fC-M2Q">
|
||||
<rect key="frame" x="0.0" y="0.0" width="576" height="30"/>
|
||||
<rect key="frame" x="0.0" y="0.0" width="838" height="30"/>
|
||||
<font key="font" metaFont="system"/>
|
||||
<tabViewItems>
|
||||
<tabViewItem label="Filter" identifier="1" id="Ud6-Nz-6PS">
|
||||
<view key="view" id="caQ-XO-RkM">
|
||||
<rect key="frame" x="0.0" y="0.0" width="576" height="30"/>
|
||||
<rect key="frame" x="0.0" y="0.0" width="838" height="30"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<customView translatesAutoresizingMaskIntoConstraints="NO" id="1" customClass="HNHUIGradientView">
|
||||
<rect key="frame" x="0.0" y="0.0" width="576" height="30"/>
|
||||
<rect key="frame" x="0.0" y="0.0" width="838" height="30"/>
|
||||
<subviews>
|
||||
<textField verticalHuggingPriority="750" allowsCharacterPickerTouchBarItem="YES" translatesAutoresizingMaskIntoConstraints="NO" id="6">
|
||||
<rect key="frame" x="6" y="8" width="47" height="14"/>
|
||||
<textFieldCell key="cell" controlSize="small" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="Search:" id="7">
|
||||
<font key="font" metaFont="smallSystemBold"/>
|
||||
<color key="textColor" name="disabledControlTextColor" catalog="System" colorSpace="catalog"/>
|
||||
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
|
||||
</textFieldCell>
|
||||
</textField>
|
||||
<button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="O7W-cn-eUP">
|
||||
<rect key="frame" x="59" y="6" width="41" height="17"/>
|
||||
<buttonCell key="cell" type="recessed" title="Title" bezelStyle="recessed" alignment="center" controlSize="small" state="on" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="53D-ne-nv6">
|
||||
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES" changeBackground="YES" changeGray="YES"/>
|
||||
<font key="font" metaFont="systemBold" size="12"/>
|
||||
</buttonCell>
|
||||
<stackView orientation="horizontal" alignment="centerY" horizontalStackHuggingPriority="249.99998474121094" verticalStackHuggingPriority="249.99998474121094" horizontalClippingResistancePriority="250" detachesHiddenViews="YES" translatesAutoresizingMaskIntoConstraints="NO" id="AEr-b4-tMm">
|
||||
<rect key="frame" x="0.0" y="0.0" width="838" height="30"/>
|
||||
<beginningViews>
|
||||
<textField verticalHuggingPriority="750" allowsCharacterPickerTouchBarItem="YES" translatesAutoresizingMaskIntoConstraints="NO" id="6">
|
||||
<rect key="frame" x="-2" y="8" width="47" height="14"/>
|
||||
<textFieldCell key="cell" controlSize="small" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="Search:" id="7">
|
||||
<font key="font" metaFont="smallSystemBold"/>
|
||||
<color key="textColor" name="disabledControlTextColor" catalog="System" colorSpace="catalog"/>
|
||||
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
|
||||
</textFieldCell>
|
||||
</textField>
|
||||
<button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="O7W-cn-eUP">
|
||||
<rect key="frame" x="51" y="6" width="41" height="17"/>
|
||||
<buttonCell key="cell" type="recessed" title="Title" bezelStyle="recessed" alignment="center" controlSize="small" state="on" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="53D-ne-nv6">
|
||||
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES" changeBackground="YES" changeGray="YES"/>
|
||||
<font key="font" metaFont="systemBold" size="12"/>
|
||||
</buttonCell>
|
||||
<connections>
|
||||
<action selector="toggleSearchFlags:" target="-1" id="gUm-y4-CDb"/>
|
||||
</connections>
|
||||
</button>
|
||||
<button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="0R1-PX-dgn">
|
||||
<rect key="frame" x="100" y="6" width="76" height="17"/>
|
||||
<buttonCell key="cell" type="recessed" title="Username" bezelStyle="recessed" alignment="center" controlSize="small" state="on" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="jfQ-Jh-2gl">
|
||||
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES" changeBackground="YES" changeGray="YES"/>
|
||||
<font key="font" metaFont="systemBold" size="12"/>
|
||||
</buttonCell>
|
||||
<connections>
|
||||
<action selector="toggleSearchFlags:" target="-1" id="DEi-hq-N39"/>
|
||||
</connections>
|
||||
</button>
|
||||
<button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="Uhl-ck-vVQ">
|
||||
<rect key="frame" x="184" y="6" width="73" height="17"/>
|
||||
<buttonCell key="cell" type="recessed" title="Password" bezelStyle="recessed" alignment="center" controlSize="small" state="on" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="rvQ-4V-SsS">
|
||||
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES" changeBackground="YES" changeGray="YES"/>
|
||||
<font key="font" metaFont="systemBold" size="12"/>
|
||||
</buttonCell>
|
||||
<connections>
|
||||
<action selector="toggleSearchFlags:" target="-1" id="xYd-Fp-jxn"/>
|
||||
</connections>
|
||||
</button>
|
||||
<button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="Bn2-iY-mQ3">
|
||||
<rect key="frame" x="265" y="6" width="39" height="17"/>
|
||||
<buttonCell key="cell" type="recessed" title="URL" bezelStyle="recessed" alignment="center" controlSize="small" state="on" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="92o-gN-Psj">
|
||||
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES" changeBackground="YES" changeGray="YES"/>
|
||||
<font key="font" metaFont="systemBold" size="12"/>
|
||||
</buttonCell>
|
||||
<connections>
|
||||
<action selector="toggleSearchFlags:" target="-1" id="Ykb-ye-FqF"/>
|
||||
</connections>
|
||||
</button>
|
||||
<button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="SaV-5p-jIX">
|
||||
<rect key="frame" x="312" y="6" width="50" height="17"/>
|
||||
<buttonCell key="cell" type="recessed" title="Notes" bezelStyle="recessed" alignment="center" controlSize="small" state="on" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="iDN-2E-hwt">
|
||||
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES" changeBackground="YES" changeGray="YES"/>
|
||||
<font key="font" metaFont="systemBold" size="12"/>
|
||||
</buttonCell>
|
||||
<connections>
|
||||
<action selector="toggleSearchFlags:" target="-1" id="cuN-5p-vZD"/>
|
||||
</connections>
|
||||
</button>
|
||||
<button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="RGg-wK-hz4">
|
||||
<rect key="frame" x="370" y="6" width="86" height="17"/>
|
||||
<buttonCell key="cell" type="recessed" title="Everywhere" bezelStyle="recessed" alignment="center" controlSize="small" state="on" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="WMK-bb-ESj">
|
||||
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES" changeBackground="YES" changeGray="YES"/>
|
||||
<font key="font" metaFont="systemBold" size="12"/>
|
||||
</buttonCell>
|
||||
</button>
|
||||
</beginningViews>
|
||||
<endViews>
|
||||
<popUpButton verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="aPQ-t2-bgz">
|
||||
<rect key="frame" x="774" y="5" width="64" height="19"/>
|
||||
<popUpButtonCell key="cell" type="recessed" title="Item 1" bezelStyle="recessed" alignment="center" lineBreakMode="truncatingTail" state="on" borderStyle="border" imageScaling="proportionallyDown" inset="2" autoenablesItems="NO" selectedItem="LRm-iZ-XrA" id="faz-pC-uGX">
|
||||
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES" changeBackground="YES" changeGray="YES"/>
|
||||
<font key="font" metaFont="systemBold" size="12"/>
|
||||
<menu key="menu" title="OtherViews" autoenablesItems="NO" id="wC4-fF-dLW">
|
||||
<items>
|
||||
<menuItem title="Item 1" state="on" id="LRm-iZ-XrA"/>
|
||||
<menuItem title="Item 2" id="cpr-p6-YAY"/>
|
||||
<menuItem title="Item 3" id="CFk-71-NYQ"/>
|
||||
</items>
|
||||
</menu>
|
||||
</popUpButtonCell>
|
||||
</popUpButton>
|
||||
</endViews>
|
||||
<visibilityPriorities>
|
||||
<integer value="1000"/>
|
||||
<real value="999"/>
|
||||
<real value="998"/>
|
||||
<real value="997"/>
|
||||
<real value="996"/>
|
||||
<real value="995"/>
|
||||
<integer value="1000"/>
|
||||
<integer value="1000"/>
|
||||
</visibilityPriorities>
|
||||
<customSpacing>
|
||||
<real value="3.4028234663852886e+38"/>
|
||||
<real value="3.4028234663852886e+38"/>
|
||||
<real value="3.4028234663852886e+38"/>
|
||||
<real value="3.4028234663852886e+38"/>
|
||||
<real value="3.4028234663852886e+38"/>
|
||||
<real value="3.4028234663852886e+38"/>
|
||||
<real value="3.4028234663852886e+38"/>
|
||||
<real value="3.4028234663852886e+38"/>
|
||||
</customSpacing>
|
||||
<connections>
|
||||
<action selector="toggleSearchFlags:" target="-1" id="gUm-y4-CDb"/>
|
||||
<outlet property="delegate" destination="-2" id="5a7-1L-C6J"/>
|
||||
</connections>
|
||||
</button>
|
||||
<button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="0R1-PX-dgn">
|
||||
<rect key="frame" x="108" y="6" width="76" height="17"/>
|
||||
<buttonCell key="cell" type="recessed" title="Username" bezelStyle="recessed" alignment="center" controlSize="small" state="on" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="jfQ-Jh-2gl">
|
||||
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES" changeBackground="YES" changeGray="YES"/>
|
||||
<font key="font" metaFont="systemBold" size="12"/>
|
||||
</buttonCell>
|
||||
<connections>
|
||||
<action selector="toggleSearchFlags:" target="-1" id="DEi-hq-N39"/>
|
||||
</connections>
|
||||
</button>
|
||||
<button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="Uhl-ck-vVQ">
|
||||
<rect key="frame" x="192" y="6" width="73" height="17"/>
|
||||
<buttonCell key="cell" type="recessed" title="Password" bezelStyle="recessed" alignment="center" controlSize="small" state="on" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="rvQ-4V-SsS">
|
||||
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES" changeBackground="YES" changeGray="YES"/>
|
||||
<font key="font" metaFont="systemBold" size="12"/>
|
||||
</buttonCell>
|
||||
<connections>
|
||||
<action selector="toggleSearchFlags:" target="-1" id="xYd-Fp-jxn"/>
|
||||
</connections>
|
||||
</button>
|
||||
<button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="Bn2-iY-mQ3">
|
||||
<rect key="frame" x="273" y="6" width="39" height="17"/>
|
||||
<buttonCell key="cell" type="recessed" title="URL" bezelStyle="recessed" alignment="center" controlSize="small" state="on" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="92o-gN-Psj">
|
||||
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES" changeBackground="YES" changeGray="YES"/>
|
||||
<font key="font" metaFont="systemBold" size="12"/>
|
||||
</buttonCell>
|
||||
<connections>
|
||||
<action selector="toggleSearchFlags:" target="-1" id="Ykb-ye-FqF"/>
|
||||
</connections>
|
||||
</button>
|
||||
<button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="SaV-5p-jIX">
|
||||
<rect key="frame" x="320" y="6" width="50" height="17"/>
|
||||
<buttonCell key="cell" type="recessed" title="Notes" bezelStyle="recessed" alignment="center" controlSize="small" state="on" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="iDN-2E-hwt">
|
||||
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES" changeBackground="YES" changeGray="YES"/>
|
||||
<font key="font" metaFont="systemBold" size="12"/>
|
||||
</buttonCell>
|
||||
<connections>
|
||||
<action selector="toggleSearchFlags:" target="-1" id="cuN-5p-vZD"/>
|
||||
</connections>
|
||||
</button>
|
||||
<popUpButton verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="aPQ-t2-bgz">
|
||||
<rect key="frame" x="492" y="5" width="64" height="19"/>
|
||||
<popUpButtonCell key="cell" type="recessed" title="Item 1" bezelStyle="recessed" alignment="center" lineBreakMode="truncatingTail" state="on" borderStyle="border" imageScaling="proportionallyDown" inset="2" autoenablesItems="NO" selectedItem="LRm-iZ-XrA" id="faz-pC-uGX">
|
||||
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES" changeBackground="YES" changeGray="YES"/>
|
||||
<font key="font" metaFont="systemBold" size="12"/>
|
||||
<menu key="menu" title="OtherViews" autoenablesItems="NO" id="wC4-fF-dLW">
|
||||
<items>
|
||||
<menuItem title="Item 1" state="on" id="LRm-iZ-XrA"/>
|
||||
<menuItem title="Item 2" id="cpr-p6-YAY"/>
|
||||
<menuItem title="Item 3" id="CFk-71-NYQ"/>
|
||||
</items>
|
||||
</menu>
|
||||
</popUpButtonCell>
|
||||
</popUpButton>
|
||||
<button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="RGg-wK-hz4">
|
||||
<rect key="frame" x="378" y="6" width="86" height="17"/>
|
||||
<buttonCell key="cell" type="recessed" title="Everywhere" bezelStyle="recessed" alignment="center" controlSize="small" state="on" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="WMK-bb-ESj">
|
||||
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES" changeBackground="YES" changeGray="YES"/>
|
||||
<font key="font" metaFont="systemBold" size="12"/>
|
||||
</buttonCell>
|
||||
</button>
|
||||
</stackView>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstAttribute="centerY" secondItem="O7W-cn-eUP" secondAttribute="centerY" id="2uC-wS-HDi"/>
|
||||
<constraint firstItem="O7W-cn-eUP" firstAttribute="leading" secondItem="6" secondAttribute="trailing" constant="8" symbolic="YES" id="5hN-x3-XlX"/>
|
||||
<constraint firstItem="0R1-PX-dgn" firstAttribute="leading" secondItem="O7W-cn-eUP" secondAttribute="trailing" constant="8" symbolic="YES" id="67f-i6-eOb"/>
|
||||
<constraint firstAttribute="centerY" secondItem="SaV-5p-jIX" secondAttribute="centerY" id="7ch-eZ-Hzh"/>
|
||||
<constraint firstItem="RGg-wK-hz4" firstAttribute="leading" secondItem="SaV-5p-jIX" secondAttribute="trailing" constant="8" symbolic="YES" id="Bbh-au-wHa"/>
|
||||
<constraint firstItem="aPQ-t2-bgz" firstAttribute="centerY" secondItem="SaV-5p-jIX" secondAttribute="centerY" id="EUG-hL-jbn"/>
|
||||
<constraint firstAttribute="centerY" secondItem="0R1-PX-dgn" secondAttribute="centerY" id="Huh-PB-cbs"/>
|
||||
<constraint firstItem="aPQ-t2-bgz" firstAttribute="leading" relation="greaterThanOrEqual" secondItem="RGg-wK-hz4" secondAttribute="trailing" constant="8" symbolic="YES" id="QoK-F3-goX"/>
|
||||
<constraint firstItem="6" firstAttribute="leading" secondItem="1" secondAttribute="leading" constant="8" id="Seo-dI-FzX"/>
|
||||
<constraint firstItem="Bn2-iY-mQ3" firstAttribute="leading" secondItem="Uhl-ck-vVQ" secondAttribute="trailing" constant="8" id="TCJ-vg-IIt"/>
|
||||
<constraint firstAttribute="trailing" secondItem="aPQ-t2-bgz" secondAttribute="trailing" constant="20" symbolic="YES" id="XFv-Pv-Bzq"/>
|
||||
<constraint firstItem="RGg-wK-hz4" firstAttribute="centerY" secondItem="1" secondAttribute="centerY" id="hsT-uo-6H8"/>
|
||||
<constraint firstItem="SaV-5p-jIX" firstAttribute="leading" secondItem="Bn2-iY-mQ3" secondAttribute="trailing" constant="8" symbolic="YES" id="pAA-uU-moF"/>
|
||||
<constraint firstAttribute="centerY" secondItem="6" secondAttribute="centerY" id="qak-8F-xbj"/>
|
||||
<constraint firstItem="Uhl-ck-vVQ" firstAttribute="leading" secondItem="0R1-PX-dgn" secondAttribute="trailing" constant="8" id="u8d-C2-O9h"/>
|
||||
<constraint firstAttribute="centerY" secondItem="Uhl-ck-vVQ" secondAttribute="centerY" id="uvE-ch-ysK"/>
|
||||
<constraint firstAttribute="centerY" secondItem="Bn2-iY-mQ3" secondAttribute="centerY" id="xZJ-EZ-Nic"/>
|
||||
<constraint firstItem="AEr-b4-tMm" firstAttribute="leading" secondItem="1" secondAttribute="leading" id="4Ca-JQ-6SM"/>
|
||||
<constraint firstAttribute="trailing" secondItem="AEr-b4-tMm" secondAttribute="trailing" id="8JE-jl-Ko3"/>
|
||||
<constraint firstItem="AEr-b4-tMm" firstAttribute="top" secondItem="1" secondAttribute="top" id="EHZ-ac-GsP"/>
|
||||
<constraint firstAttribute="bottom" secondItem="AEr-b4-tMm" secondAttribute="bottom" id="Ztr-3u-eI0"/>
|
||||
</constraints>
|
||||
</customView>
|
||||
</subviews>
|
||||
@@ -150,14 +167,14 @@
|
||||
</tabViewItem>
|
||||
<tabViewItem label="Trash" identifier="2" id="na6-h9-r9q">
|
||||
<view key="view" id="F6S-GS-AwI">
|
||||
<rect key="frame" x="0.0" y="0.0" width="576" height="30"/>
|
||||
<rect key="frame" x="0.0" y="0.0" width="838" height="30"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<customView translatesAutoresizingMaskIntoConstraints="NO" id="DXf-SC-gVG" customClass="HNHUIGradientView">
|
||||
<rect key="frame" x="0.0" y="0.0" width="576" height="30"/>
|
||||
<rect key="frame" x="0.0" y="0.0" width="838" height="30"/>
|
||||
<subviews>
|
||||
<button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="szx-Hx-OrV">
|
||||
<rect key="frame" x="469" y="0.0" width="92" height="28"/>
|
||||
<rect key="frame" x="731" y="0.0" width="92" height="28"/>
|
||||
<buttonCell key="cell" type="push" title="Empty Trash" bezelStyle="rounded" alignment="center" controlSize="small" state="on" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="8Ok-oe-6AB">
|
||||
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
|
||||
<font key="font" metaFont="smallSystem"/>
|
||||
@@ -198,14 +215,14 @@
|
||||
</tabViewItem>
|
||||
<tabViewItem label="History" identifier="3" id="z4I-cp-nhf">
|
||||
<view key="view" id="iPb-SZ-Lfm">
|
||||
<rect key="frame" x="0.0" y="0.0" width="576" height="30"/>
|
||||
<rect key="frame" x="0.0" y="0.0" width="838" height="30"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<customView translatesAutoresizingMaskIntoConstraints="NO" id="S8L-rB-h0h" customClass="HNHUIGradientView">
|
||||
<rect key="frame" x="0.0" y="0.0" width="576" height="30"/>
|
||||
<rect key="frame" x="0.0" y="0.0" width="838" height="30"/>
|
||||
<subviews>
|
||||
<button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="pqx-su-vAh">
|
||||
<rect key="frame" x="474" y="0.0" width="87" height="28"/>
|
||||
<rect key="frame" x="736" y="0.0" width="87" height="28"/>
|
||||
<buttonCell key="cell" type="push" title="Exit History" bezelStyle="rounded" alignment="center" controlSize="small" state="on" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="ewQ-8F-e1E">
|
||||
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
|
||||
<font key="font" metaFont="smallSystem"/>
|
||||
@@ -215,7 +232,7 @@
|
||||
</buttonCell>
|
||||
</button>
|
||||
<button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="JNP-Sd-Zh1">
|
||||
<rect key="frame" x="379" y="0.0" width="97" height="28"/>
|
||||
<rect key="frame" x="641" y="0.0" width="97" height="28"/>
|
||||
<buttonCell key="cell" type="push" title="Restore Entry" bezelStyle="rounded" alignment="center" controlSize="small" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="UTg-y9-4DN">
|
||||
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
|
||||
<font key="font" metaFont="smallSystem"/>
|
||||
@@ -256,7 +273,7 @@
|
||||
</connections>
|
||||
</tabViewItem>
|
||||
</tabViewItems>
|
||||
<point key="canvasLocation" x="-1" y="79"/>
|
||||
<point key="canvasLocation" x="130" y="79"/>
|
||||
</tabView>
|
||||
</objects>
|
||||
</document>
|
||||
|
||||
@@ -26,14 +26,13 @@
|
||||
@class HNHUIGradientView;
|
||||
@class MPDocument;
|
||||
|
||||
@interface MPContextBarViewController : MPViewController
|
||||
@interface MPContextBarViewController : MPViewController <NSStackViewDelegate>
|
||||
|
||||
@property (weak) IBOutlet NSButton *titleButton;
|
||||
@property (weak) IBOutlet NSButton *usernameButton;
|
||||
@property (weak) IBOutlet NSButton *passwordButton;
|
||||
@property (weak) IBOutlet NSButton *urlButton;
|
||||
@property (weak) IBOutlet NSButton *notesButton;
|
||||
@property (weak) IBOutlet NSButton *duplicatePasswordsButton;
|
||||
@property (weak) IBOutlet NSPopUpButton *specialFilterPopUpButton;
|
||||
@property (weak) IBOutlet NSButton *everywhereButton;
|
||||
|
||||
|
||||
@@ -134,21 +134,40 @@ typedef NS_ENUM(NSUInteger, MPContextTab) {
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
- (BOOL)control:(NSControl*)control textView:(NSTextView*)textView doCommandBySelector:(SEL)commandSelector {
|
||||
if(commandSelector == @selector(insertNewline:)) {
|
||||
[self _didChangeFilter];
|
||||
}
|
||||
return NO;
|
||||
}
|
||||
*/
|
||||
- (void)stackView:(NSStackView *)stackView willDetachViews:(NSArray<NSView *> *)views {
|
||||
for(NSView *view in views) {
|
||||
if([view isKindOfClass:NSButton.class]) {
|
||||
NSButton *button = (NSButton *)view;
|
||||
NSMenuItem *item = [self.specialFilterPopUpButton.menu itemWithTag:button.tag];
|
||||
if(item) {
|
||||
return; // no duplicates
|
||||
}
|
||||
item = [self _menuItemForButton:button];
|
||||
if(item) {
|
||||
[self.specialFilterPopUpButton.menu addItem:item];
|
||||
}
|
||||
}
|
||||
}
|
||||
[self _updateFilterButtons];
|
||||
}
|
||||
|
||||
- (void)stackView:(NSStackView *)stackView didReattachViews:(NSArray<NSView *> *)views {
|
||||
for(NSView *view in views) {
|
||||
if([view isKindOfClass:NSButton.class]) {
|
||||
NSButton *button = (NSButton *)view;
|
||||
NSMenuItem *item = [self.specialFilterPopUpButton.menu itemWithTag:button.tag];
|
||||
if(item) {
|
||||
[self.specialFilterPopUpButton.menu removeItem:item];
|
||||
}
|
||||
}
|
||||
}
|
||||
[self _updateFilterButtons];
|
||||
}
|
||||
|
||||
#pragma mark UI Helper
|
||||
- (void)_updateFilterButtons {
|
||||
MPDocument *document = self.windowController.document;
|
||||
MPEntrySearchFlags currentFlags = document.searchContext.searchFlags;
|
||||
self.duplicatePasswordsButton.state = HNHUIStateForBool(MPIsFlagSetInOptions(MPEntrySearchDoublePasswords, currentFlags));
|
||||
self.notesButton.state = HNHUIStateForBool(MPIsFlagSetInOptions(MPEntrySearchNotes, currentFlags));
|
||||
self.passwordButton.state = HNHUIStateForBool(MPIsFlagSetInOptions(MPEntrySearchPasswords, currentFlags));
|
||||
self.titleButton.state = HNHUIStateForBool(MPIsFlagSetInOptions(MPEntrySearchTitles, currentFlags));
|
||||
@@ -173,4 +192,10 @@ typedef NS_ENUM(NSUInteger, MPContextTab) {
|
||||
[self.specialFilterPopUpButton selectItemWithTag:selectedTag];
|
||||
}
|
||||
|
||||
- (NSMenuItem *)_menuItemForButton:(NSButton *)button {
|
||||
NSMenuItem *item = [[NSMenuItem alloc] initWithTitle:button.title action:@selector(toggleSearchFlags:) keyEquivalent:@""];
|
||||
item.tag = button.tag;
|
||||
return item;
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
Reference in New Issue
Block a user