Add Neutral button to search tab, issue #17

This commit is contained in:
Zlatin Balevsky
2019-10-02 06:02:06 +01:00
parent eda3e7ad3a
commit d9c1067226
2 changed files with 10 additions and 0 deletions

View File

@@ -67,4 +67,13 @@ class SearchTabController {
def sender = model.senders[row]
core.eventBus.publish( new TrustEvent(persona : sender, level : TrustLevel.DISTRUSTED))
}
@ControllerAction
void neutral() {
int row = view.selectedSenderRow()
if (row < 0)
return
def sender = model.senders[row]
core.eventBus.publish( new TrustEvent(persona : sender, level : TrustLevel.NEUTRAL))
}
}

View File

@@ -66,6 +66,7 @@ class SearchTabView {
}
panel(constraints : BorderLayout.SOUTH) {
button(text : "Trust", enabled: bind {model.trustButtonsEnabled }, trustAction)
button(text : "Neutral", enabled: bind {model.trustButtonsEnabled}, neutralAction)
button(text : "Distrust", enabled : bind {model.trustButtonsEnabled}, distrustAction)
}
}