more clear name

pull/4/head
Zlatin Balevsky 2019-06-05 16:47:10 +01:00
parent cdb6e22522
commit 7fe78a0719
3 changed files with 7 additions and 7 deletions

View File

@ -53,9 +53,9 @@ class OptionsController {
model.updateCheckInterval = text
settings.updateCheckInterval = Integer.valueOf(text)
boolean allowUntrusted = view.allowUntrustedCheckbox.model.isSelected()
model.allowUntrusted = allowUntrusted
settings.setAllowUntrusted(allowUntrusted)
boolean onlyTrusted = view.allowUntrustedCheckbox.model.isSelected()
model.onlyTrusted = onlyTrusted
settings.setAllowUntrusted(!onlyTrusted)
File settingsFile = new File(core.home, "MuWire.properties")
settingsFile.withOutputStream {

View File

@ -11,7 +11,7 @@ import griffon.metadata.ArtifactProviderFor
class OptionsModel {
@Observable String downloadRetryInterval
@Observable String updateCheckInterval
@Observable boolean allowUntrusted
@Observable boolean onlyTrusted
// i2p options
@Observable String inboundLength
@ -23,7 +23,7 @@ class OptionsModel {
MuWireSettings settings = application.context.get("muwire-settings")
downloadRetryInterval = settings.downloadRetryInterval
updateCheckInterval = settings.updateCheckInterval
allowUntrusted = settings.allowUntrusted()
onlyTrusted = !settings.allowUntrusted()
Core core = application.context.get("core")
inboundLength = core.i2pOptions["inbound.length"]

View File

@ -52,8 +52,8 @@ class OptionsView {
updateField = textField(text : bind {model.updateCheckInterval }, columns : 2, constraints : gbc(gridx : 1, gridy: 1))
label(text : "hours", constraints : gbc(gridx: 2, gridy : 1))
label(text : "Allow untrusted connections", constraints : gbc(gridx: 0, gridy : 2))
allowUntrustedCheckbox = checkBox(selected : bind {model.allowUntrusted}, constraints : gbc(gridx: 1, gridy : 2))
label(text : "Only allow trusted connections", constraints : gbc(gridx: 0, gridy : 2))
allowUntrustedCheckbox = checkBox(selected : bind {model.onlyTrusted}, constraints : gbc(gridx: 1, gridy : 2))
}
i = builder.panel {