diff --git a/MacPass/Base.lproj/EntryInspectorView.xib b/MacPass/Base.lproj/EntryInspectorView.xib index 347ad2c5..0e71f501 100644 --- a/MacPass/Base.lproj/EntryInspectorView.xib +++ b/MacPass/Base.lproj/EntryInspectorView.xib @@ -94,7 +94,7 @@ - + @@ -271,7 +271,7 @@ - + @@ -752,7 +752,7 @@ - + @@ -948,7 +948,7 @@ - + diff --git a/MacPass/MPPluginDataViewController.m b/MacPass/MPPluginDataViewController.m index e9db4528..161b3cc7 100644 --- a/MacPass/MPPluginDataViewController.m +++ b/MacPass/MPPluginDataViewController.m @@ -46,6 +46,17 @@ return nil; } +- (IBAction)removePluginData:(id)sender { + if(![sender isKindOfClass:NSButton.class]) { + return; // wrong sender + } + NSInteger tag = ((NSButton *)sender).tag; + if(tag >= 0 && tag < [self.pluginDataController.arrangedObjects count]) { + id keyValueStore = ((NSArray *)self.pluginDataController.arrangedObjects)[tag]; + [self.representedNode removeCustomDataValueForKey:[keyValueStore key]]; + } +} + - (IBAction)removeAllPluginData:(id)sender { // } @@ -60,7 +71,13 @@ toObject:view withKeyPath:[NSString stringWithFormat:@"%@.%@", NSStringFromSelector(@selector(objectValue)), NSStringFromSelector(@selector(key))] options:nil]; + + view.removeButton.target = self; + view.removeButton.action = @selector(removePluginData:); + view.removeButton.tag = row; + view.observer = self.observer; + return view; } diff --git a/MacPass/PluginDataView.xib b/MacPass/PluginDataView.xib index dbcccbde..4d81209d 100644 --- a/MacPass/PluginDataView.xib +++ b/MacPass/PluginDataView.xib @@ -1,8 +1,8 @@ - + - + @@ -48,24 +48,24 @@ - + - + - + - + @@ -120,7 +120,7 @@ - + @@ -150,7 +150,7 @@ - +