mirror of
https://github.com/haveno-dex/haveno.git
synced 2025-06-25 15:20:40 -04:00
Change selection event handler
This commit is contained in:
parent
844a6dd66c
commit
b5e29d0cf7
2 changed files with 3 additions and 3 deletions
|
@ -46,7 +46,7 @@
|
||||||
</TextField>
|
</TextField>
|
||||||
|
|
||||||
<Label text="Select Network:" GridPane.rowIndex="1"/>
|
<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"/>
|
<Label text="Bitcoin network connected peers:" GridPane.rowIndex="2"/>
|
||||||
<TextField fx:id="connectedPeersBTC" GridPane.rowIndex="2" GridPane.columnIndex="1"
|
<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.setItems(FXCollections.observableArrayList(BitcoinNetwork.values()));
|
||||||
netWorkComboBox.getSelectionModel().select(preferences.getBitcoinNetwork());
|
netWorkComboBox.getSelectionModel().select(preferences.getBitcoinNetwork());
|
||||||
|
netWorkComboBox.setOnAction(e -> onSelectNetwork());
|
||||||
}
|
}
|
||||||
|
|
||||||
@FXML
|
@FXML
|
||||||
|
@ -85,7 +86,6 @@ public class NetworkSettingsView extends InitializableView {
|
||||||
preferences.setUseUPnP(useUPnP.isSelected());
|
preferences.setUseUPnP(useUPnP.isSelected());
|
||||||
}
|
}
|
||||||
|
|
||||||
@FXML
|
|
||||||
void onSelectNetwork() {
|
void onSelectNetwork() {
|
||||||
preferences.setBitcoinNetwork(netWorkComboBox.getSelectionModel().getSelectedItem());
|
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." +
|
"You need to restart the application to apply the change of the Bitcoin network." +
|
||||||
"\n\nDo you want to shutdown now?",
|
"\n\nDo you want to shutdown now?",
|
||||||
actions);
|
actions);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue