Moved defaults cleanup for key file from document to app delegate.

Added clear button to settings to remove any keys stored
This commit is contained in:
michael starke
2014-02-12 20:51:36 +01:00
parent b82bc8c9e9
commit 422d74ee5c
6 changed files with 115 additions and 63 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="13A603" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="4514" systemVersion="13B42" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
<dependencies>
<deployment defaultVersion="1080" identifier="macosx"/>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="4514"/>
@@ -22,11 +22,11 @@
<customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
<customObject id="-3" userLabel="Application"/>
<customView translatesAutoresizingMaskIntoConstraints="NO" id="1">
<rect key="frame" x="0.0" y="0.0" width="400" height="401"/>
<rect key="frame" x="0.0" y="0.0" width="400" height="418"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<subviews>
<box autoresizesSubviews="NO" title="General" borderType="line" translatesAutoresizingMaskIntoConstraints="NO" id="928">
<rect key="frame" x="17" y="249" width="366" height="54"/>
<rect key="frame" x="17" y="266" width="366" height="54"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<view key="contentView">
<rect key="frame" x="1" y="1" width="364" height="38"/>
@@ -50,14 +50,14 @@
<color key="fillColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
</box>
<box autoresizesSubviews="NO" verticalHuggingPriority="251" title="Security" borderType="line" translatesAutoresizingMaskIntoConstraints="NO" id="465">
<rect key="frame" x="17" y="16" width="366" height="229"/>
<rect key="frame" x="17" y="16" width="366" height="246"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<view key="contentView">
<rect key="frame" x="1" y="1" width="364" height="213"/>
<rect key="frame" x="1" y="1" width="364" height="230"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<textField verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="431">
<rect key="frame" x="16" y="185" width="124" height="17"/>
<rect key="frame" x="16" y="202" width="124" height="17"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<constraints>
<constraint firstAttribute="height" constant="17" id="803"/>
@@ -69,7 +69,7 @@
</textFieldCell>
</textField>
<popUpButton verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="419">
<rect key="frame" x="179" y="182" width="170" height="22"/>
<rect key="frame" x="179" y="199" width="170" height="22"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<constraints>
<constraint firstAttribute="width" constant="165" id="877"/>
@@ -90,7 +90,7 @@
</popUpButtonCell>
</popUpButton>
<button verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="447">
<rect key="frame" x="31" y="161" width="172" height="18"/>
<rect key="frame" x="31" y="178" width="172" height="18"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<constraints>
<constraint firstAttribute="height" constant="14" id="773"/>
@@ -101,7 +101,7 @@
</buttonCell>
</button>
<popUpButton verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="584">
<rect key="frame" x="179" y="133" width="170" height="26"/>
<rect key="frame" x="179" y="150" width="170" height="26"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<popUpButtonCell key="cell" type="push" bezelStyle="rounded" alignment="left" lineBreakMode="truncatingTail" borderStyle="borderAndBezel" imageScaling="proportionallyDown" inset="2" id="585">
<behavior key="behavior" lightByBackground="YES" lightByGray="YES"/>
@@ -119,7 +119,7 @@
</popUpButtonCell>
</popUpButton>
<button translatesAutoresizingMaskIntoConstraints="NO" id="630">
<rect key="frame" x="31" y="114" width="121" height="18"/>
<rect key="frame" x="31" y="131" width="121" height="18"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<buttonCell key="cell" type="check" title="Lock after sleep" bezelStyle="regularSquare" imagePosition="left" enabled="NO" state="on" inset="2" id="631">
<behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
@@ -127,7 +127,7 @@
</buttonCell>
</button>
<textField verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="805">
<rect key="frame" x="16" y="138" width="97" height="17"/>
<rect key="frame" x="16" y="155" width="97" height="17"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="Lock while idle" id="806">
<font key="font" metaFont="system"/>
@@ -136,7 +136,7 @@
</textFieldCell>
</textField>
<button verticalHuggingPriority="249" translatesAutoresizingMaskIntoConstraints="NO" id="bSt-Wf-FNZ">
<rect key="frame" x="16" y="89" width="226" height="18"/>
<rect key="frame" x="16" y="106" width="226" height="18"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<buttonCell key="cell" type="check" title="Remember Keyfile for Databases" bezelStyle="regularSquare" imagePosition="left" state="on" inset="2" id="r6q-He-nYU">
<behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
@@ -144,15 +144,26 @@
</buttonCell>
</button>
<textField verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" fixedFrame="YES" setsMaxLayoutWidthAtFirstLayout="YES" translatesAutoresizingMaskIntoConstraints="NO" id="5cV-xX-SUU">
<rect key="frame" x="16" y="12" width="332" height="70"/>
<rect key="frame" x="16" y="43" width="332" height="56"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<textFieldCell key="cell" sendsActionOnEndEditing="YES" id="ACh-7H-42N">
<font key="font" metaFont="smallSystem"/>
<string key="title">Enabling this compromises security. If enabled, your preferences will contain mappings from database to keyfile. Once disabled, all values will be removed from the preferences. Key locations for databases without a password will not be saved.</string>
<string key="title">Enabling this compromises security. If enabled, your preferences will contain mappings from database to keyfile. Key locations for databases without a password will not be saved.</string>
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
<button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="oQr-FC-HkN">
<rect key="frame" x="156" y="7" width="196" height="32"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<buttonCell key="cell" type="push" title="Clear all stored locations" bezelStyle="rounded" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="8Ri-2s-c39">
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
<font key="font" metaFont="system"/>
</buttonCell>
<connections>
<action selector="clearRememberdKeyFiles:" target="-1" id="Vlr-aK-ikW"/>
</connections>
</button>
</subviews>
</view>
<constraints>
@@ -169,16 +180,19 @@
<constraint firstItem="419" firstAttribute="leading" secondItem="584" secondAttribute="leading" id="876"/>
<constraint firstItem="419" firstAttribute="bottom" secondItem="431" secondAttribute="bottom" id="916"/>
<constraint firstItem="630" firstAttribute="top" secondItem="805" secondAttribute="bottom" constant="8" id="952"/>
<constraint firstItem="oQr-FC-HkN" firstAttribute="leading" relation="greaterThanOrEqual" secondItem="465" secondAttribute="leading" constant="16" id="XAl-D7-I6k"/>
<constraint firstItem="bSt-Wf-FNZ" firstAttribute="top" secondItem="630" secondAttribute="bottom" constant="11" id="XUI-7v-CA4"/>
<constraint firstItem="805" firstAttribute="top" secondItem="447" secondAttribute="bottom" constant="8" symbolic="YES" id="XhN-Ce-ut7"/>
<constraint firstItem="bSt-Wf-FNZ" firstAttribute="leading" secondItem="805" secondAttribute="leading" id="hcg-pe-Vtb"/>
<constraint firstAttribute="bottom" secondItem="oQr-FC-HkN" secondAttribute="bottom" constant="11" id="tDO-89-9Iu"/>
<constraint firstItem="447" firstAttribute="top" secondItem="419" secondAttribute="bottom" constant="8" symbolic="YES" id="xZh-T3-USE"/>
<constraint firstAttribute="trailing" secondItem="oQr-FC-HkN" secondAttribute="trailing" constant="16" id="xjj-cL-rTz"/>
</constraints>
<color key="borderColor" white="0.0" alpha="0.41999999999999998" colorSpace="calibratedWhite"/>
<color key="fillColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
</box>
<box autoresizesSubviews="NO" title="Startup" borderType="line" translatesAutoresizingMaskIntoConstraints="NO" id="888">
<rect key="frame" x="17" y="307" width="366" height="74"/>
<rect key="frame" x="17" y="324" width="366" height="74"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<view key="contentView">
<rect key="frame" x="1" y="1" width="364" height="58"/>
@@ -225,7 +239,7 @@
<constraint firstAttribute="trailing" secondItem="928" secondAttribute="trailing" constant="20" symbolic="YES" id="947"/>
<constraint firstItem="465" firstAttribute="top" secondItem="928" secondAttribute="bottom" constant="8" symbolic="YES" id="949"/>
<constraint firstItem="465" firstAttribute="top" secondItem="1" secondAttribute="top" constant="156" id="950"/>
<constraint firstAttribute="height" constant="401" id="Prx-WU-fwu"/>
<constraint firstAttribute="height" constant="418" id="otH-bj-MWy"/>
<constraint firstAttribute="bottom" secondItem="465" secondAttribute="bottom" constant="20" symbolic="YES" id="uwq-az-XwJ"/>
</constraints>
</customView>