mirror of
https://github.com/MacPass/MacPass.git
synced 2025-12-13 21:42:32 +00:00
Plugin data display works.
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
//
|
||||
|
||||
#import "MPPluginDataViewController.h"
|
||||
#import "MPCustomFieldTableCellView.h"
|
||||
|
||||
#import <KeePassKit/KeePassKit.h>
|
||||
|
||||
@@ -34,6 +35,7 @@
|
||||
|
||||
- (void)didLoadView {
|
||||
[self.pluginDataController bind:NSContentDictionaryBinding toObject:self.representedObject withKeyPath:NSStringFromSelector(@selector(customData)) options:nil];
|
||||
[self.pluginDataTabelView bind:NSContentBinding toObject:self.pluginDataController withKeyPath:NSStringFromSelector(@selector(arrangedObjects)) options:nil];
|
||||
self.pluginDataTabelView.backgroundColor = [NSColor clearColor];
|
||||
}
|
||||
|
||||
@@ -49,7 +51,15 @@
|
||||
}
|
||||
|
||||
- (NSView *)tableView:(NSTableView *)tableView viewForTableColumn:(NSTableColumn *)tableColumn row:(NSInteger)row {
|
||||
NSTableCellView *view = [tableView makeViewWithIdentifier:@"PluginCell" owner:self];
|
||||
MPCustomFieldTableCellView *view = [tableView makeViewWithIdentifier:@"PluginCell" owner:self];
|
||||
[view.valueTextField bind:NSValueBinding
|
||||
toObject:view
|
||||
withKeyPath:[NSString stringWithFormat:@"%@.%@", NSStringFromSelector(@selector(objectValue)), NSStringFromSelector(@selector(value))]
|
||||
options:nil];
|
||||
[view.labelTextField bind:NSValueBinding
|
||||
toObject:view
|
||||
withKeyPath:[NSString stringWithFormat:@"%@.%@", NSStringFromSelector(@selector(objectValue)), NSStringFromSelector(@selector(key))]
|
||||
options:nil];
|
||||
return view;
|
||||
}
|
||||
|
||||
|
||||
@@ -102,6 +102,9 @@
|
||||
</prototypeCellViews>
|
||||
</tableColumn>
|
||||
</tableColumns>
|
||||
<connections>
|
||||
<outlet property="delegate" destination="-2" id="vlQ-Zb-6LN"/>
|
||||
</connections>
|
||||
</tableView>
|
||||
</subviews>
|
||||
</clipView>
|
||||
@@ -147,7 +150,7 @@
|
||||
<constraint firstItem="eUU-kx-L3U" firstAttribute="top" secondItem="ZhC-nS-vfd" secondAttribute="bottom" constant="8" symbolic="YES" id="Z31-cy-f9g"/>
|
||||
<constraint firstAttribute="bottom" secondItem="wUR-gA-36a" secondAttribute="bottom" constant="20" symbolic="YES" id="ohy-oM-biY"/>
|
||||
</constraints>
|
||||
<point key="canvasLocation" x="-159.5" y="130"/>
|
||||
<point key="canvasLocation" x="-458" y="147"/>
|
||||
</customView>
|
||||
</objects>
|
||||
<resources>
|
||||
|
||||
Reference in New Issue
Block a user