mirror of
https://github.com/sparrowwallet/sparrow.git
synced 2024-12-25 05:06:45 +00:00
move show transaction hex setting into config
This commit is contained in:
parent
572e451279
commit
7461b47466
3 changed files with 14 additions and 6 deletions
|
@ -144,8 +144,6 @@ public class AppController implements Initializable {
|
||||||
|
|
||||||
private static Integer currentBlockHeight;
|
private static Integer currentBlockHeight;
|
||||||
|
|
||||||
public static boolean showTxHexProperty;
|
|
||||||
|
|
||||||
private static Map<Integer, Double> targetBlockFeeRates;
|
private static Map<Integer, Double> targetBlockFeeRates;
|
||||||
|
|
||||||
private static final Map<Date, Set<MempoolRateSize>> mempoolHistogram = new TreeMap<>();
|
private static final Map<Date, Set<MempoolRateSize>> mempoolHistogram = new TreeMap<>();
|
||||||
|
@ -257,8 +255,7 @@ public class AppController implements Initializable {
|
||||||
selectedThemeToggle.ifPresent(toggle -> theme.selectToggle(toggle));
|
selectedThemeToggle.ifPresent(toggle -> theme.selectToggle(toggle));
|
||||||
setTheme(null);
|
setTheme(null);
|
||||||
|
|
||||||
showTxHex.setSelected(true);
|
showTxHex.setSelected(Config.get().isShowTransactionHex());
|
||||||
showTxHexProperty = true;
|
|
||||||
exportWallet.setDisable(true);
|
exportWallet.setDisable(true);
|
||||||
|
|
||||||
serverToggle.selectedProperty().addListener((observable, oldValue, newValue) -> {
|
serverToggle.selectedProperty().addListener((observable, oldValue, newValue) -> {
|
||||||
|
@ -756,8 +753,8 @@ public class AppController implements Initializable {
|
||||||
|
|
||||||
public void showTxHex(ActionEvent event) {
|
public void showTxHex(ActionEvent event) {
|
||||||
CheckMenuItem item = (CheckMenuItem)event.getSource();
|
CheckMenuItem item = (CheckMenuItem)event.getSource();
|
||||||
|
Config.get().setShowTransactionHex(item.isSelected());
|
||||||
EventManager.get().post(new TransactionTabChangedEvent(tabs.getSelectionModel().getSelectedItem(), item.isSelected()));
|
EventManager.get().post(new TransactionTabChangedEvent(tabs.getSelectionModel().getSelectedItem(), item.isSelected()));
|
||||||
showTxHexProperty = item.isSelected();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setBitcoinUnit(ActionEvent event) {
|
public void setBitcoinUnit(ActionEvent event) {
|
||||||
|
|
|
@ -31,6 +31,7 @@ public class Config {
|
||||||
private boolean notifyNewTransactions = true;
|
private boolean notifyNewTransactions = true;
|
||||||
private boolean checkNewVersions = true;
|
private boolean checkNewVersions = true;
|
||||||
private Theme theme;
|
private Theme theme;
|
||||||
|
private boolean showTransactionHex = true;
|
||||||
private List<File> recentWalletFiles;
|
private List<File> recentWalletFiles;
|
||||||
private Integer keyDerivationPeriod;
|
private Integer keyDerivationPeriod;
|
||||||
private File hwi;
|
private File hwi;
|
||||||
|
@ -184,6 +185,15 @@ public class Config {
|
||||||
flush();
|
flush();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean isShowTransactionHex() {
|
||||||
|
return showTransactionHex;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setShowTransactionHex(boolean showTransactionHex) {
|
||||||
|
this.showTransactionHex = showTransactionHex;
|
||||||
|
flush();
|
||||||
|
}
|
||||||
|
|
||||||
public List<File> getRecentWalletFiles() {
|
public List<File> getRecentWalletFiles() {
|
||||||
return recentWalletFiles;
|
return recentWalletFiles;
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,6 +12,7 @@ import com.sparrowwallet.sparrow.TransactionTabData;
|
||||||
import com.sparrowwallet.sparrow.control.TransactionDiagram;
|
import com.sparrowwallet.sparrow.control.TransactionDiagram;
|
||||||
import com.sparrowwallet.sparrow.control.TransactionHexArea;
|
import com.sparrowwallet.sparrow.control.TransactionHexArea;
|
||||||
import com.sparrowwallet.sparrow.event.*;
|
import com.sparrowwallet.sparrow.event.*;
|
||||||
|
import com.sparrowwallet.sparrow.io.Config;
|
||||||
import com.sparrowwallet.sparrow.net.ElectrumServer;
|
import com.sparrowwallet.sparrow.net.ElectrumServer;
|
||||||
import javafx.application.Platform;
|
import javafx.application.Platform;
|
||||||
import javafx.fxml.FXML;
|
import javafx.fxml.FXML;
|
||||||
|
@ -63,7 +64,7 @@ public class TransactionController implements Initializable {
|
||||||
|
|
||||||
public void initializeView() {
|
public void initializeView() {
|
||||||
initializeTxTree();
|
initializeTxTree();
|
||||||
transactionMasterDetail.setShowDetailNode(AppController.showTxHexProperty);
|
transactionMasterDetail.setShowDetailNode(Config.get().isShowTransactionHex());
|
||||||
txhex.setTransaction(getTransaction());
|
txhex.setTransaction(getTransaction());
|
||||||
highlightTxHex();
|
highlightTxHex();
|
||||||
fetchThisAndInputBlockTransactions(0, Math.min(getTransaction().getInputs().size(), PageForm.PAGE_SIZE));
|
fetchThisAndInputBlockTransactions(0, Math.min(getTransaction().getInputs().size(), PageForm.PAGE_SIZE));
|
||||||
|
|
Loading…
Reference in a new issue