mirror of
https://github.com/haveno-dex/haveno.git
synced 2025-04-19 07:15:54 -04:00
Change selection event handler
This commit is contained in:
parent
844a6dd66c
commit
b5e29d0cf7
@ -46,7 +46,7 @@
|
||||
</TextField>
|
||||
|
||||
<Label text="Select Network:" GridPane.rowIndex="1"/>
|
||||
<ComboBox fx:id="netWorkComboBox" onAction="#onSelectNetwork" GridPane.rowIndex="1" GridPane.columnIndex="1"/>
|
||||
<ComboBox fx:id="netWorkComboBox" GridPane.rowIndex="1" GridPane.columnIndex="1"/>
|
||||
|
||||
<Label text="Bitcoin network connected peers:" GridPane.rowIndex="2"/>
|
||||
<TextField fx:id="connectedPeersBTC" GridPane.rowIndex="2" GridPane.columnIndex="1"
|
||||
|
@ -78,6 +78,7 @@ public class NetworkSettingsView extends InitializableView {
|
||||
|
||||
netWorkComboBox.setItems(FXCollections.observableArrayList(BitcoinNetwork.values()));
|
||||
netWorkComboBox.getSelectionModel().select(preferences.getBitcoinNetwork());
|
||||
netWorkComboBox.setOnAction(e -> onSelectNetwork());
|
||||
}
|
||||
|
||||
@FXML
|
||||
@ -85,7 +86,6 @@ public class NetworkSettingsView extends InitializableView {
|
||||
preferences.setUseUPnP(useUPnP.isSelected());
|
||||
}
|
||||
|
||||
@FXML
|
||||
void onSelectNetwork() {
|
||||
preferences.setBitcoinNetwork(netWorkComboBox.getSelectionModel().getSelectedItem());
|
||||
|
||||
@ -106,7 +106,7 @@ public class NetworkSettingsView extends InitializableView {
|
||||
}
|
||||
});
|
||||
|
||||
Action response = Popups.openConfirmPopup("Info", null,
|
||||
Action response = Popups.openConfirmPopup("Info", "",
|
||||
"You need to restart the application to apply the change of the Bitcoin network." +
|
||||
"\n\nDo you want to shutdown now?",
|
||||
actions);
|
||||
|
Loading…
x
Reference in New Issue
Block a user