mirror of
https://github.com/sparrowwallet/sparrow.git
synced 2024-12-25 05:06:45 +00:00
improve script type descriptions and help text
This commit is contained in:
parent
5abea8c594
commit
ae2db6e204
3 changed files with 15 additions and 2 deletions
2
drongo
2
drongo
|
@ -1 +1 @@
|
||||||
Subproject commit 3882a4b4bd9a738329bfffcaff72b477bb3a2d2f
|
Subproject commit 79216fac912724e7b06b3ffe15e38ddf005e665f
|
|
@ -24,6 +24,7 @@ import javafx.fxml.FXMLLoader;
|
||||||
import javafx.fxml.Initializable;
|
import javafx.fxml.Initializable;
|
||||||
import javafx.scene.control.*;
|
import javafx.scene.control.*;
|
||||||
import javafx.scene.layout.StackPane;
|
import javafx.scene.layout.StackPane;
|
||||||
|
import javafx.util.StringConverter;
|
||||||
import org.controlsfx.control.RangeSlider;
|
import org.controlsfx.control.RangeSlider;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
@ -105,6 +106,18 @@ public class SettingsController extends WalletFormController implements Initiali
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
scriptType.setConverter(new StringConverter<>() {
|
||||||
|
@Override
|
||||||
|
public String toString(ScriptType scriptType) {
|
||||||
|
return scriptType.getDescription();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ScriptType fromString(String string) {
|
||||||
|
return ScriptType.fromDescriptor(string);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
scriptType.getSelectionModel().selectedItemProperty().addListener((observable, oldValue, scriptType) -> {
|
scriptType.getSelectionModel().selectedItemProperty().addListener((observable, oldValue, scriptType) -> {
|
||||||
if(scriptType != null) {
|
if(scriptType != null) {
|
||||||
walletForm.getWallet().setScriptType(scriptType);
|
walletForm.getWallet().setScriptType(scriptType);
|
||||||
|
|
|
@ -57,7 +57,7 @@
|
||||||
</FXCollections>
|
</FXCollections>
|
||||||
</items>
|
</items>
|
||||||
</ComboBox>
|
</ComboBox>
|
||||||
<HelpLabel helpText="P2WPKH and P2WSH are Native Segwit types and are usually the best choice.\nP2SH-P2WPKH and P2SH-P2WSH are Wrapped Segwit types and a good choice for the widest compatibility.\nP2PKH and P2SH are Legacy types and should be avoided, unless configuring an old wallet." />
|
<HelpLabel helpText="Native Segwit types are the default and are usually the best choice.\nNested Segwit types are a good choice for the widest compatibility with older wallets.\nLegacy types should be avoided, unless configuring an old wallet." />
|
||||||
</Field>
|
</Field>
|
||||||
</Fieldset>
|
</Fieldset>
|
||||||
</Form>
|
</Form>
|
||||||
|
|
Loading…
Reference in a new issue