mirror of
https://github.com/MacPass/MacPass.git
synced 2025-12-18 03:49:22 +00:00
Added wrapping adapter for isHistory to ease binding
This commit is contained in:
@@ -31,6 +31,12 @@
|
||||
<imageCell key="cell" alignment="left" imageScaling="proportionallyUpOrDown" image="NSActionTemplate" id="2999"/>
|
||||
<connections>
|
||||
<action selector="pickIcon:" target="-2" id="6wh-Ka-Thl"/>
|
||||
<binding destination="-2" name="enabled" keyPath="representedObject.isHistory" id="nhm-tN-zlN">
|
||||
<dictionary key="options">
|
||||
<bool key="NSRaisesForNotApplicableKeys" value="NO"/>
|
||||
<string key="NSValueTransformerName">NSNegateBoolean</string>
|
||||
</dictionary>
|
||||
</binding>
|
||||
<binding destination="-2" name="value" keyPath="representedObject.iconImage" id="agf-eg-okr">
|
||||
<dictionary key="options">
|
||||
<bool key="NSConditionallySetsEnabled" value="NO"/>
|
||||
@@ -129,6 +135,12 @@
|
||||
<size key="maxSize" width="463" height="10000000"/>
|
||||
<color key="insertionPointColor" white="0.0" alpha="1" colorSpace="calibratedWhite"/>
|
||||
<connections>
|
||||
<binding destination="-2" name="editable" keyPath="representedObject.isHistory" id="E4x-pV-sJk">
|
||||
<dictionary key="options">
|
||||
<bool key="NSRaisesForNotApplicableKeys" value="NO"/>
|
||||
<string key="NSValueTransformerName">NSNegateBoolean</string>
|
||||
</dictionary>
|
||||
</binding>
|
||||
<binding destination="-2" name="value" keyPath="representedObject.notes" id="E0d-ZH-Wbc">
|
||||
<dictionary key="options">
|
||||
<bool key="NSConditionallySetsEditable" value="NO"/>
|
||||
|
||||
15
MacPass/KPKNode+MPIsHistory.h
Normal file
15
MacPass/KPKNode+MPIsHistory.h
Normal file
@@ -0,0 +1,15 @@
|
||||
//
|
||||
// KPKNode+MPIsHistory.h
|
||||
// MacPass
|
||||
//
|
||||
// Created by Michael Starke on 25.04.17.
|
||||
// Copyright © 2017 HicknHack Software GmbH. All rights reserved.
|
||||
//
|
||||
|
||||
#import <KeePassKit/KeePassKit.h>
|
||||
|
||||
@interface KPKNode (MPIsHistory)
|
||||
|
||||
@property (nonatomic, readonly) BOOL isHistory;
|
||||
|
||||
@end
|
||||
21
MacPass/KPKNode+MPIsHistory.m
Normal file
21
MacPass/KPKNode+MPIsHistory.m
Normal file
@@ -0,0 +1,21 @@
|
||||
//
|
||||
// KPKNode+MPIsHistory.m
|
||||
// MacPass
|
||||
//
|
||||
// Created by Michael Starke on 25.04.17.
|
||||
// Copyright © 2017 HicknHack Software GmbH. All rights reserved.
|
||||
//
|
||||
|
||||
#import "KPKNode+MPIsHistory.h"
|
||||
|
||||
@implementation KPKNode (MPIsHistory)
|
||||
|
||||
|
||||
- (BOOL)isHistory {
|
||||
if(self.asEntry) {
|
||||
return self.asEntry.isHistory;
|
||||
}
|
||||
return NO;
|
||||
}
|
||||
|
||||
@end
|
||||
Reference in New Issue
Block a user