From 7fe78a0719cd54a096912cd200f8d1c46b7ac7e6 Mon Sep 17 00:00:00 2001 From: Zlatin Balevsky Date: Wed, 5 Jun 2019 16:47:10 +0100 Subject: [PATCH] more clear name --- .../controllers/com/muwire/gui/OptionsController.groovy | 6 +++--- gui/griffon-app/models/com/muwire/gui/OptionsModel.groovy | 4 ++-- gui/griffon-app/views/com/muwire/gui/OptionsView.groovy | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/gui/griffon-app/controllers/com/muwire/gui/OptionsController.groovy b/gui/griffon-app/controllers/com/muwire/gui/OptionsController.groovy index 0903dcc3..9b6b9fdc 100644 --- a/gui/griffon-app/controllers/com/muwire/gui/OptionsController.groovy +++ b/gui/griffon-app/controllers/com/muwire/gui/OptionsController.groovy @@ -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 { diff --git a/gui/griffon-app/models/com/muwire/gui/OptionsModel.groovy b/gui/griffon-app/models/com/muwire/gui/OptionsModel.groovy index 492df515..00f23e53 100644 --- a/gui/griffon-app/models/com/muwire/gui/OptionsModel.groovy +++ b/gui/griffon-app/models/com/muwire/gui/OptionsModel.groovy @@ -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"] diff --git a/gui/griffon-app/views/com/muwire/gui/OptionsView.groovy b/gui/griffon-app/views/com/muwire/gui/OptionsView.groovy index b7c6088b..ab2a8f35 100644 --- a/gui/griffon-app/views/com/muwire/gui/OptionsView.groovy +++ b/gui/griffon-app/views/com/muwire/gui/OptionsView.groovy @@ -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 {