mirror of
https://github.com/MacPass/MacPass.git
synced 2025-12-14 05:52:58 +00:00
Plugin data display works.
This commit is contained in:
@@ -7,6 +7,7 @@
|
|||||||
//
|
//
|
||||||
|
|
||||||
#import "MPPluginDataViewController.h"
|
#import "MPPluginDataViewController.h"
|
||||||
|
#import "MPCustomFieldTableCellView.h"
|
||||||
|
|
||||||
#import <KeePassKit/KeePassKit.h>
|
#import <KeePassKit/KeePassKit.h>
|
||||||
|
|
||||||
@@ -34,6 +35,7 @@
|
|||||||
|
|
||||||
- (void)didLoadView {
|
- (void)didLoadView {
|
||||||
[self.pluginDataController bind:NSContentDictionaryBinding toObject:self.representedObject withKeyPath:NSStringFromSelector(@selector(customData)) options:nil];
|
[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];
|
self.pluginDataTabelView.backgroundColor = [NSColor clearColor];
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -49,7 +51,15 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
- (NSView *)tableView:(NSTableView *)tableView viewForTableColumn:(NSTableColumn *)tableColumn row:(NSInteger)row {
|
- (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;
|
return view;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -102,6 +102,9 @@
|
|||||||
</prototypeCellViews>
|
</prototypeCellViews>
|
||||||
</tableColumn>
|
</tableColumn>
|
||||||
</tableColumns>
|
</tableColumns>
|
||||||
|
<connections>
|
||||||
|
<outlet property="delegate" destination="-2" id="vlQ-Zb-6LN"/>
|
||||||
|
</connections>
|
||||||
</tableView>
|
</tableView>
|
||||||
</subviews>
|
</subviews>
|
||||||
</clipView>
|
</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 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"/>
|
<constraint firstAttribute="bottom" secondItem="wUR-gA-36a" secondAttribute="bottom" constant="20" symbolic="YES" id="ohy-oM-biY"/>
|
||||||
</constraints>
|
</constraints>
|
||||||
<point key="canvasLocation" x="-159.5" y="130"/>
|
<point key="canvasLocation" x="-458" y="147"/>
|
||||||
</customView>
|
</customView>
|
||||||
</objects>
|
</objects>
|
||||||
<resources>
|
<resources>
|
||||||
|
|||||||
Reference in New Issue
Block a user