Updated to new HNHUi API

Signed-off-by: michael starke <michael.starke@hicknhack-software.com>
This commit is contained in:
michael starke
2015-11-08 12:11:34 +01:00
parent a7567c2e07
commit bb0e36ab08
15 changed files with 68 additions and 69 deletions

View File

@@ -40,8 +40,8 @@
<view translatesAutoresizingMaskIntoConstraints="NO" id="3"> <view translatesAutoresizingMaskIntoConstraints="NO" id="3">
<rect key="frame" x="0.0" y="0.0" width="293" height="529"/> <rect key="frame" x="0.0" y="0.0" width="293" height="529"/>
<subviews> <subviews>
<segmentedControl verticalHuggingPriority="750" misplaced="YES" translatesAutoresizingMaskIntoConstraints="NO" id="82"> <segmentedControl verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="82">
<rect key="frame" x="35" y="505" width="223" height="19"/> <rect key="frame" x="34.5" y="505" width="224" height="19"/>
<animations/> <animations/>
<segmentedCell key="cell" controlSize="small" borderStyle="border" alignment="left" style="texturedSquare" trackingMode="selectOne" id="238"> <segmentedCell key="cell" controlSize="small" borderStyle="border" alignment="left" style="texturedSquare" trackingMode="selectOne" id="238">
<font key="font" metaFont="smallSystem"/> <font key="font" metaFont="smallSystem"/>
@@ -512,8 +512,8 @@
<outlet property="nextKeyView" destination="55" id="FgE-cj-E5Z"/> <outlet property="nextKeyView" destination="55" id="FgE-cj-E5Z"/>
</connections> </connections>
</textField> </textField>
<textField verticalHuggingPriority="750" misplaced="YES" translatesAutoresizingMaskIntoConstraints="NO" id="54"> <textField verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="54">
<rect key="frame" x="18" y="378" width="57" height="14"/> <rect key="frame" x="18" y="378" width="58" height="14"/>
<animations/> <animations/>
<textFieldCell key="cell" controlSize="small" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="Username" id="69"> <textFieldCell key="cell" controlSize="small" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="Username" id="69">
<font key="font" metaFont="smallSystem"/> <font key="font" metaFont="smallSystem"/>
@@ -551,8 +551,8 @@
<outlet property="nextKeyView" destination="7" id="8Vo-ZR-aWE"/> <outlet property="nextKeyView" destination="7" id="8Vo-ZR-aWE"/>
</connections> </connections>
</textField> </textField>
<textField verticalHuggingPriority="750" misplaced="YES" translatesAutoresizingMaskIntoConstraints="NO" id="57"> <textField verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="57">
<rect key="frame" x="18" y="244" width="25" height="14"/> <rect key="frame" x="18" y="244" width="26" height="14"/>
<animations/> <animations/>
<textFieldCell key="cell" controlSize="small" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="URL" id="66"> <textFieldCell key="cell" controlSize="small" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="URL" id="66">
<font key="font" metaFont="smallSystem"/> <font key="font" metaFont="smallSystem"/>
@@ -560,8 +560,8 @@
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/> <color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
</textFieldCell> </textFieldCell>
</textField> </textField>
<textField verticalHuggingPriority="750" misplaced="YES" translatesAutoresizingMaskIntoConstraints="NO" id="58"> <textField verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="58">
<rect key="frame" x="18" y="322" width="57" height="14"/> <rect key="frame" x="18" y="322" width="55" height="14"/>
<animations/> <animations/>
<textFieldCell key="cell" controlSize="small" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="Password" id="65"> <textFieldCell key="cell" controlSize="small" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="Password" id="65">
<font key="font" metaFont="smallSystem"/> <font key="font" metaFont="smallSystem"/>
@@ -666,8 +666,8 @@
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/> <color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
</textFieldCell> </textFieldCell>
</textField> </textField>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" horizontalCompressionResistancePriority="249" misplaced="YES" translatesAutoresizingMaskIntoConstraints="NO" id="0U8-TS-giU"> <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" horizontalCompressionResistancePriority="249" translatesAutoresizingMaskIntoConstraints="NO" id="0U8-TS-giU">
<rect key="frame" x="18" y="50" width="31" height="14"/> <rect key="frame" x="18" y="50" width="32" height="14"/>
<animations/> <animations/>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" allowsUndo="NO" sendsActionOnEndEditing="YES" title="UUID" id="vTq-N1-5oa"> <textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" allowsUndo="NO" sendsActionOnEndEditing="YES" title="UUID" id="vTq-N1-5oa">
<font key="font" metaFont="smallSystem"/> <font key="font" metaFont="smallSystem"/>
@@ -704,7 +704,6 @@
<constraint firstItem="56" firstAttribute="top" secondItem="57" secondAttribute="bottom" constant="8" symbolic="YES" id="24"/> <constraint firstItem="56" firstAttribute="top" secondItem="57" secondAttribute="bottom" constant="8" symbolic="YES" id="24"/>
<constraint firstAttribute="trailing" secondItem="56" secondAttribute="trailing" constant="20" symbolic="YES" id="25"/> <constraint firstAttribute="trailing" secondItem="56" secondAttribute="trailing" constant="20" symbolic="YES" id="25"/>
<constraint firstItem="58" firstAttribute="leading" secondItem="4" secondAttribute="leading" constant="20" symbolic="YES" id="26"/> <constraint firstItem="58" firstAttribute="leading" secondItem="4" secondAttribute="leading" constant="20" symbolic="YES" id="26"/>
<constraint firstItem="58" firstAttribute="trailing" secondItem="54" secondAttribute="trailing" id="27"/>
<constraint firstItem="60" firstAttribute="top" secondItem="58" secondAttribute="bottom" constant="8" symbolic="YES" id="29"/> <constraint firstItem="60" firstAttribute="top" secondItem="58" secondAttribute="bottom" constant="8" symbolic="YES" id="29"/>
<constraint firstItem="60" firstAttribute="leading" secondItem="4" secondAttribute="leading" constant="20" symbolic="YES" id="30"/> <constraint firstItem="60" firstAttribute="leading" secondItem="4" secondAttribute="leading" constant="20" symbolic="YES" id="30"/>
<constraint firstItem="59" firstAttribute="top" secondItem="61" secondAttribute="bottom" constant="8" symbolic="YES" id="31"/> <constraint firstItem="59" firstAttribute="top" secondItem="61" secondAttribute="bottom" constant="8" symbolic="YES" id="31"/>

View File

@@ -37,8 +37,8 @@
<customView translatesAutoresizingMaskIntoConstraints="NO" id="1" customClass="HNHUIGradientView"> <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="576" height="30"/>
<subviews> <subviews>
<textField verticalHuggingPriority="750" misplaced="YES" translatesAutoresizingMaskIntoConstraints="NO" id="6"> <textField verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="6">
<rect key="frame" x="6" y="8" width="45" height="14"/> <rect key="frame" x="6" y="8" width="47" height="14"/>
<animations/> <animations/>
<textFieldCell key="cell" controlSize="small" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="Search:" id="7"> <textFieldCell key="cell" controlSize="small" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="Search:" id="7">
<font key="font" metaFont="smallSystemBold"/> <font key="font" metaFont="smallSystemBold"/>
@@ -46,8 +46,8 @@
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/> <color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
</textFieldCell> </textFieldCell>
</textField> </textField>
<button verticalHuggingPriority="750" misplaced="YES" translatesAutoresizingMaskIntoConstraints="NO" id="O7W-cn-eUP"> <button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="O7W-cn-eUP">
<rect key="frame" x="57" y="6" width="42" height="17"/> <rect key="frame" x="59" y="6" width="42" height="17"/>
<animations/> <animations/>
<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"> <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"/> <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES" changeBackground="YES" changeGray="YES"/>
@@ -57,8 +57,8 @@
<action selector="toggleSearchFlags:" target="-1" id="gUm-y4-CDb"/> <action selector="toggleSearchFlags:" target="-1" id="gUm-y4-CDb"/>
</connections> </connections>
</button> </button>
<button verticalHuggingPriority="750" misplaced="YES" translatesAutoresizingMaskIntoConstraints="NO" id="0R1-PX-dgn"> <button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="0R1-PX-dgn">
<rect key="frame" x="107" y="6" width="77" height="17"/> <rect key="frame" x="109" y="6" width="76" height="17"/>
<animations/> <animations/>
<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"> <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"/> <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES" changeBackground="YES" changeGray="YES"/>
@@ -68,8 +68,8 @@
<action selector="toggleSearchFlags:" target="-1" id="DEi-hq-N39"/> <action selector="toggleSearchFlags:" target="-1" id="DEi-hq-N39"/>
</connections> </connections>
</button> </button>
<button verticalHuggingPriority="750" misplaced="YES" translatesAutoresizingMaskIntoConstraints="NO" id="Uhl-ck-vVQ"> <button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="Uhl-ck-vVQ">
<rect key="frame" x="192" y="6" width="74" height="17"/> <rect key="frame" x="193" y="6" width="73" height="17"/>
<animations/> <animations/>
<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"> <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"/> <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES" changeBackground="YES" changeGray="YES"/>
@@ -79,8 +79,8 @@
<action selector="toggleSearchFlags:" target="-1" id="xYd-Fp-jxn"/> <action selector="toggleSearchFlags:" target="-1" id="xYd-Fp-jxn"/>
</connections> </connections>
</button> </button>
<button verticalHuggingPriority="750" misplaced="YES" translatesAutoresizingMaskIntoConstraints="NO" id="Bn2-iY-mQ3"> <button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="Bn2-iY-mQ3">
<rect key="frame" x="274" y="6" width="38" height="17"/> <rect key="frame" x="274" y="6" width="39" height="17"/>
<animations/> <animations/>
<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"> <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"/> <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES" changeBackground="YES" changeGray="YES"/>
@@ -90,8 +90,8 @@
<action selector="toggleSearchFlags:" target="-1" id="Ykb-ye-FqF"/> <action selector="toggleSearchFlags:" target="-1" id="Ykb-ye-FqF"/>
</connections> </connections>
</button> </button>
<button verticalHuggingPriority="750" misplaced="YES" translatesAutoresizingMaskIntoConstraints="NO" id="SaV-5p-jIX"> <button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="SaV-5p-jIX">
<rect key="frame" x="320" y="6" width="50" height="17"/> <rect key="frame" x="321" y="6" width="50" height="17"/>
<animations/> <animations/>
<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"> <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"/> <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES" changeBackground="YES" changeGray="YES"/>
@@ -101,8 +101,8 @@
<action selector="toggleSearchFlags:" target="-1" id="cuN-5p-vZD"/> <action selector="toggleSearchFlags:" target="-1" id="cuN-5p-vZD"/>
</connections> </connections>
</button> </button>
<popUpButton verticalHuggingPriority="750" misplaced="YES" translatesAutoresizingMaskIntoConstraints="NO" id="aPQ-t2-bgz"> <popUpButton verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="aPQ-t2-bgz">
<rect key="frame" x="491" y="5" width="65" height="19"/> <rect key="frame" x="492" y="5" width="64" height="19"/>
<animations/> <animations/>
<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"> <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"/> <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES" changeBackground="YES" changeGray="YES"/>
@@ -196,8 +196,8 @@
<customView translatesAutoresizingMaskIntoConstraints="NO" id="S8L-rB-h0h" customClass="HNHUIGradientView"> <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="576" height="30"/>
<subviews> <subviews>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" misplaced="YES" translatesAutoresizingMaskIntoConstraints="NO" id="gGR-f0-dcr"> <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="gGR-f0-dcr">
<rect key="frame" x="18" y="6" width="38" height="17"/> <rect key="frame" x="18" y="6" width="37" height="17"/>
<animations/> <animations/>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="Label" id="8LU-cT-rsU"> <textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="Label" id="8LU-cT-rsU">
<font key="font" metaFont="system"/> <font key="font" metaFont="system"/>

View File

@@ -37,7 +37,7 @@ typedef NS_ENUM(NSUInteger, MPContextTab) {
@property (weak) IBOutlet NSTextField *historyLabel; @property (weak) IBOutlet NSTextField *historyLabel;
@property (weak) IBOutlet NSButton *exitHistoryButton; @property (weak) IBOutlet NSButton *exitHistoryButton;
/* Trash*/ /* Trash*/
@property (weak) IBOutlet HNHGradientView *trashBar; @property (weak) IBOutlet HNHUIGradientView *trashBar;
@property (weak) IBOutlet NSButton *emptyTrashButton; @property (weak) IBOutlet NSButton *emptyTrashButton;
@end @end
@@ -141,12 +141,12 @@ typedef NS_ENUM(NSUInteger, MPContextTab) {
- (void)_updateFilterButtons { - (void)_updateFilterButtons {
MPDocument *document = [[self windowController] document]; MPDocument *document = [[self windowController] document];
MPEntrySearchFlags currentFlags = document.searchContext.searchFlags; MPEntrySearchFlags currentFlags = document.searchContext.searchFlags;
[self.duplicatePasswordsButton setState:HNHStateForBool(MPIsFlagSetInOptions(MPEntrySearchDoublePasswords, currentFlags))]; [self.duplicatePasswordsButton setState:HNHUIStateForBool(MPIsFlagSetInOptions(MPEntrySearchDoublePasswords, currentFlags))];
[self.notesButton setState:HNHStateForBool(MPIsFlagSetInOptions(MPEntrySearchNotes, currentFlags))]; [self.notesButton setState:HNHUIStateForBool(MPIsFlagSetInOptions(MPEntrySearchNotes, currentFlags))];
[self.passwordButton setState:HNHStateForBool(MPIsFlagSetInOptions(MPEntrySearchPasswords, currentFlags))]; [self.passwordButton setState:HNHUIStateForBool(MPIsFlagSetInOptions(MPEntrySearchPasswords, currentFlags))];
[self.titleButton setState:HNHStateForBool(MPIsFlagSetInOptions(MPEntrySearchTitles, currentFlags))]; [self.titleButton setState:HNHUIStateForBool(MPIsFlagSetInOptions(MPEntrySearchTitles, currentFlags))];
[self.urlButton setState:HNHStateForBool(MPIsFlagSetInOptions(MPEntrySearchUrls, currentFlags))]; [self.urlButton setState:HNHUIStateForBool(MPIsFlagSetInOptions(MPEntrySearchUrls, currentFlags))];
[self.usernameButton setState:HNHStateForBool(MPIsFlagSetInOptions(MPEntrySearchUsernames, currentFlags))]; [self.usernameButton setState:HNHUIStateForBool(MPIsFlagSetInOptions(MPEntrySearchUsernames, currentFlags))];
NSInteger selectedTag = MPEntrySearchNone; NSInteger selectedTag = MPEntrySearchNone;
for(NSMenuItem *item in [[self.specialFilterPopUpButton menu] itemArray]) { for(NSMenuItem *item in [[self.specialFilterPopUpButton menu] itemArray]) {
MPEntrySearchFlags flag = [item tag]; MPEntrySearchFlags flag = [item tag];
@@ -159,7 +159,7 @@ typedef NS_ENUM(NSUInteger, MPContextTab) {
if(isActive) { if(isActive) {
selectedTag = flag; selectedTag = flag;
} }
[item setState:HNHStateForBool(isActive)]; [item setState:HNHUIStateForBool(isActive)];
} }
} }
[self.specialFilterPopUpButton selectItemWithTag:selectedTag]; [self.specialFilterPopUpButton selectItemWithTag:selectedTag];

View File

@@ -70,7 +70,7 @@
} }
/* Advanced */ /* Advanced */
metaData.useTrash = HNHBoolForState(self.enableTrashCheckButton.state); metaData.useTrash = HNHUIBoolForState(self.enableTrashCheckButton.state);
NSMenuItem *trashMenuItem = self.selectTrashGoupPopUpButton.selectedItem; NSMenuItem *trashMenuItem = self.selectTrashGoupPopUpButton.selectedItem;
KPKGroup *trashGroup = trashMenuItem.representedObject; KPKGroup *trashGroup = trashMenuItem.representedObject;
((MPDocument *)self.document).tree.trash = trashGroup; ((MPDocument *)self.document).tree.trash = trashGroup;
@@ -80,8 +80,8 @@
((MPDocument *)self.document).templates = templateGroup; ((MPDocument *)self.document).templates = templateGroup;
BOOL enforceMasterKeyChange = HNHBoolForState(self.enforceKeyChangeCheckButton.state); BOOL enforceMasterKeyChange = HNHUIBoolForState(self.enforceKeyChangeCheckButton.state);
BOOL recommendMasterKeyChange = HNHBoolForState(self.recommendKeyChangeCheckButton.state); BOOL recommendMasterKeyChange = HNHUIBoolForState(self.recommendKeyChangeCheckButton.state);
enforceMasterKeyChange &= (self.enforceKeyChangeIntervalTextField.stringValue.length != 0); enforceMasterKeyChange &= (self.enforceKeyChangeIntervalTextField.stringValue.length != 0);
recommendMasterKeyChange &= (self.recommendKeyChangeIntervalTextField.stringValue.length != 0); recommendMasterKeyChange &= (self.recommendKeyChangeIntervalTextField.stringValue.length != 0);
@@ -94,11 +94,11 @@
/* Security */ /* Security */
metaData.protectNotes = HNHBoolForState(self.protectNotesCheckButton.state); metaData.protectNotes = HNHUIBoolForState(self.protectNotesCheckButton.state);
metaData.protectPassword = HNHBoolForState(self.protectPasswortCheckButton.state); metaData.protectPassword = HNHUIBoolForState(self.protectPasswortCheckButton.state);
metaData.protectTitle = HNHBoolForState(self.protectTitleCheckButton.state); metaData.protectTitle = HNHUIBoolForState(self.protectTitleCheckButton.state);
metaData.protectUrl = HNHBoolForState(self.protectURLCheckButton.state); metaData.protectUrl = HNHUIBoolForState(self.protectURLCheckButton.state);
metaData.protectUserName = HNHBoolForState(self.protectUserNameCheckButton.state); metaData.protectUserName = HNHUIBoolForState(self.protectUserNameCheckButton.state);
metaData.defaultUserName = self.defaultUsernameTextField.stringValue; metaData.defaultUserName = self.defaultUsernameTextField.stringValue;
@@ -180,18 +180,18 @@
} }
- (void)_setupProtectionTab:(KPKMetaData *)metaData { - (void)_setupProtectionTab:(KPKMetaData *)metaData {
HNHSetStateFromBool(self.protectNotesCheckButton, metaData.protectNotes); self.protectNotesCheckButton.state = HNHUIStateForBool(metaData.protectNotes);
HNHSetStateFromBool(self.protectPasswortCheckButton, metaData.protectPassword); self.protectPasswortCheckButton.state = HNHUIStateForBool(metaData.protectPassword);
HNHSetStateFromBool(self.protectTitleCheckButton, metaData.protectTitle); self.protectTitleCheckButton.state = HNHUIStateForBool(metaData.protectTitle);
HNHSetStateFromBool(self.protectURLCheckButton, metaData.protectUrl); self.protectURLCheckButton.state = HNHUIStateForBool(metaData.protectUrl);
HNHSetStateFromBool(self.protectUserNameCheckButton, metaData.protectUserName); self.protectUserNameCheckButton.state = HNHUIStateForBool(metaData.protectUserName);
[self.encryptionRoundsTextField setIntegerValue:metaData.rounds]; [self.encryptionRoundsTextField setIntegerValue:metaData.rounds];
[self.benchmarkButton setEnabled:YES]; [self.benchmarkButton setEnabled:YES];
} }
- (void)_setupAdvancedTab:(KPKTree *)tree { - (void)_setupAdvancedTab:(KPKTree *)tree {
HNHSetStateFromBool(self.enableTrashCheckButton, tree.metaData.useTrash); HNHUISetStateFromBool(self.enableTrashCheckButton, tree.metaData.useTrash);
self.selectTrashGoupPopUpButton.enabled = tree.metaData.useTrash; self.selectTrashGoupPopUpButton.enabled = tree.metaData.useTrash;
[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];
@@ -200,8 +200,8 @@
self.defaultUsernameTextField.editable = YES; self.defaultUsernameTextField.editable = YES;
[self _updateTemplateGroup:tree]; [self _updateTemplateGroup:tree];
HNHSetStateFromBool(self.enforceKeyChangeCheckButton, tree.metaData.enforceMasterKeyChange); HNHUISetStateFromBool(self.enforceKeyChangeCheckButton, tree.metaData.enforceMasterKeyChange);
HNHSetStateFromBool(self.recommendKeyChangeCheckButton, tree.metaData.recommendMasterKeyChange); HNHUISetStateFromBool(self.recommendKeyChangeCheckButton, tree.metaData.recommendMasterKeyChange);
[self.enforceKeyChangeIntervalTextField setEnabled:tree.metaData.enforceMasterKeyChange]; [self.enforceKeyChangeIntervalTextField setEnabled:tree.metaData.enforceMasterKeyChange];
[self.recommendKeyChangeIntervalTextField setEnabled:tree.metaData.recommendMasterKeyChange]; [self.recommendKeyChangeIntervalTextField setEnabled:tree.metaData.recommendMasterKeyChange];

View File

@@ -43,7 +43,7 @@
- (void)toggleAllowAllFiles:(id)sender { - (void)toggleAllowAllFiles:(id)sender {
NSButton *button = (NSButton *)sender; NSButton *button = (NSButton *)sender;
BOOL allowAllFiles = HNHBoolForState(button.state); BOOL allowAllFiles = HNHUIBoolForState(button.state);
/* Toggle hidden to force a refresh */ /* Toggle hidden to force a refresh */
self.openPanel.showsHiddenFiles = !self.openPanel.showsHiddenFiles; self.openPanel.showsHiddenFiles = !self.openPanel.showsHiddenFiles;
self.openPanel.allowedFileTypes = allowAllFiles ? nil : @[MPLegacyDocumentUTI, MPXMLDocumentUTI]; self.openPanel.allowedFileTypes = allowAllFiles ? nil : @[MPLegacyDocumentUTI, MPXMLDocumentUTI];

View File

@@ -10,7 +10,7 @@
#import <Quartz/Quartz.h> #import <Quartz/Quartz.h>
@class HNHRoundedSecureTextField; @class HNHUIRoundedSecureTextField;
@class MPDocument; @class MPDocument;
@interface MPEntryInspectorViewController : MPViewController <NSPopoverDelegate, QLPreviewPanelDelegate> @interface MPEntryInspectorViewController : MPViewController <NSPopoverDelegate, QLPreviewPanelDelegate>
@@ -18,7 +18,7 @@
@property (weak) IBOutlet NSTextField *titleTextField; @property (weak) IBOutlet NSTextField *titleTextField;
@property (weak) IBOutlet NSTextField *usernameTextField; @property (weak) IBOutlet NSTextField *usernameTextField;
@property (weak) IBOutlet NSTextField *URLTextField; @property (weak) IBOutlet NSTextField *URLTextField;
@property (weak) IBOutlet HNHRoundedSecureTextField *passwordTextField; @property (weak) IBOutlet HNHUIRoundedSecureTextField *passwordTextField;
@property (weak) IBOutlet NSTextField *uuidTextField; @property (weak) IBOutlet NSTextField *uuidTextField;

View File

@@ -329,7 +329,7 @@ typedef NS_ENUM(NSUInteger, MPEntryTab) {
- (void)_addScrollViewWithView:(NSView *)view atTab:(MPEntryTab)tab { - (void)_addScrollViewWithView:(NSView *)view atTab:(MPEntryTab)tab {
/* ScrollView setup for the General Tab */ /* ScrollView setup for the General Tab */
HNHScrollView *scrollView = [[HNHScrollView alloc] init]; HNHUIScrollView *scrollView = [[HNHUIScrollView alloc] init];
scrollView.actAsFlipped = NO; scrollView.actAsFlipped = NO;
scrollView.showBottomShadow = NO; scrollView.showBottomShadow = NO;
scrollView.hasVerticalScroller = YES; scrollView.hasVerticalScroller = YES;

View File

@@ -75,7 +75,7 @@ NSString *const _MPTableSecurCellView = @"PasswordCell";
@property (strong) IBOutlet NSLayoutConstraint *tableToTopConstraint; @property (strong) IBOutlet NSLayoutConstraint *tableToTopConstraint;
@property (strong) NSLayoutConstraint *contextBarTopConstraint; @property (strong) NSLayoutConstraint *contextBarTopConstraint;
@property (weak) IBOutlet HNHGradientView *bottomBar; @property (weak) IBOutlet HNHUIGradientView *bottomBar;
@property (weak) IBOutlet NSButton *addEntryButton; @property (weak) IBOutlet NSButton *addEntryButton;
@property (weak) IBOutlet NSTextField *footerInfoText; @property (weak) IBOutlet NSTextField *footerInfoText;

View File

@@ -8,19 +8,19 @@
#import "MPViewController.h" #import "MPViewController.h"
@class MPDocument; @class MPDocument;
@class HNHRoundedTextField; @class HNHUIRoundedTextField;
@interface MPGroupInspectorViewController : MPViewController @interface MPGroupInspectorViewController : MPViewController
@property (strong) IBOutlet NSView *contentView; @property (strong) IBOutlet NSView *contentView;
@property (weak) IBOutlet HNHRoundedTextField *titleTextField; @property (weak) IBOutlet HNHUIRoundedTextField *titleTextField;
@property (weak) IBOutlet NSButton *expiresCheckButton; @property (weak) IBOutlet NSButton *expiresCheckButton;
@property (weak) IBOutlet NSButton *expireDateSelectButton; @property (weak) IBOutlet NSButton *expireDateSelectButton;
@property (weak) IBOutlet NSPopUpButton *searchPopupButton; @property (weak) IBOutlet NSPopUpButton *searchPopupButton;
@property (weak) IBOutlet NSPopUpButton *autotypePopupButton; @property (weak) IBOutlet NSPopUpButton *autotypePopupButton;
@property (weak) IBOutlet HNHRoundedTextField *autotypeSequenceTextField; @property (weak) IBOutlet HNHUIRoundedTextField *autotypeSequenceTextField;
- (void)setupBindings:(MPDocument *)document; - (void)setupBindings:(MPDocument *)document;
- (void)beginEditing; - (void)beginEditing;

View File

@@ -39,7 +39,7 @@
} }
- (void)awakeFromNib { - (void)awakeFromNib {
HNHScrollView *scrollView = (HNHScrollView *)self.view; HNHUIScrollView *scrollView = (HNHUIScrollView *)self.view;
scrollView.actAsFlipped = NO; scrollView.actAsFlipped = NO;
scrollView.showBottomShadow = NO; scrollView.showBottomShadow = NO;

View File

@@ -8,12 +8,12 @@
#import "MPViewController.h" #import "MPViewController.h"
@class HNHGradientView; @class HNHUIGradientView;
@class MPPopupImageView; @class MPPopupImageView;
@interface MPInspectorViewController : MPViewController <NSPopoverDelegate> @interface MPInspectorViewController : MPViewController <NSPopoverDelegate>
@property (weak) IBOutlet HNHGradientView *bottomBar; @property (weak) IBOutlet HNHUIGradientView *bottomBar;
@property (weak) IBOutlet NSTextField *createdTextField; @property (weak) IBOutlet NSTextField *createdTextField;
@property (weak) IBOutlet NSTextField *modifiedTextField; @property (weak) IBOutlet NSTextField *modifiedTextField;
@property (weak) IBOutlet NSTextField *noSelectionInfo; @property (weak) IBOutlet NSTextField *noSelectionInfo;

View File

@@ -11,13 +11,13 @@
APPKIT_EXTERN NSString *const MPOutlineViewDidChangeGroupSelection; APPKIT_EXTERN NSString *const MPOutlineViewDidChangeGroupSelection;
@class HNHGradientView; @class HNHUIGradientView;
@class MPDocument; @class MPDocument;
@interface MPOutlineViewController : MPViewController <MPTargetNodeResolving, NSOutlineViewDelegate, NSMenuDelegate> @interface MPOutlineViewController : MPViewController <MPTargetNodeResolving, NSOutlineViewDelegate, NSMenuDelegate>
@property (weak) IBOutlet HNHGradientView *bottomBar; @property (weak) IBOutlet HNHUIGradientView *bottomBar;
- (void)clearSelection; - (void)clearSelection;
- (void)showOutline; - (void)showOutline;

View File

@@ -20,7 +20,7 @@
#import "KeePassKit/KeePassKit.h" #import "KeePassKit/KeePassKit.h"
#import "KPKNode+IconImage.h" #import "KPKNode+IconImage.h"
#import "HNHGradientView.h" #import "HNHUi/HNHUi.h"
#define EXPIRED_GROUP_REFRESH_SECONDS 60 #define EXPIRED_GROUP_REFRESH_SECONDS 60

View File

@@ -9,7 +9,7 @@
#import <Cocoa/Cocoa.h> #import <Cocoa/Cocoa.h>
#import "MPSheetWindowController.h" #import "MPSheetWindowController.h"
@class MPDocument; @class MPDocument;
@class HNHRoundedSecureTextField; @class HNHUIRoundedSecureTextField;
@protocol MPPasswordEditWindowDelegate <NSObject> @protocol MPPasswordEditWindowDelegate <NSObject>
@@ -24,8 +24,8 @@
@interface MPPasswordEditWindowController : MPSheetWindowController <NSTextFieldDelegate> @interface MPPasswordEditWindowController : MPSheetWindowController <NSTextFieldDelegate>
@property (weak) IBOutlet HNHRoundedSecureTextField *passwordTextField; @property (weak) IBOutlet HNHUIRoundedSecureTextField *passwordTextField;
@property (weak) IBOutlet HNHRoundedSecureTextField *passwordRepeatTextField; @property (weak) IBOutlet HNHUIRoundedSecureTextField *passwordRepeatTextField;
@property (weak) IBOutlet NSPathControl *keyfilePathControl; @property (weak) IBOutlet NSPathControl *keyfilePathControl;
@property (weak) IBOutlet NSButton *togglePasswordButton; @property (weak) IBOutlet NSButton *togglePasswordButton;
@property (weak) IBOutlet NSTextField *errorTextField; @property (weak) IBOutlet NSTextField *errorTextField;

View File

@@ -19,7 +19,7 @@
@interface MPPasswordInputController () @interface MPPasswordInputController ()
@property (weak) IBOutlet HNHRoundedSecureTextField *passwordTextField; @property (weak) IBOutlet HNHUIRoundedSecureTextField *passwordTextField;
@property (weak) IBOutlet NSPathControl *keyPathControl; @property (weak) IBOutlet NSPathControl *keyPathControl;
@property (strong) MPKeyfilePathControlDelegate *pathControlDelegate; @property (strong) MPKeyfilePathControlDelegate *pathControlDelegate;
@property (weak) IBOutlet NSImageView *errorImageView; @property (weak) IBOutlet NSImageView *errorImageView;