mirror of
https://github.com/monero-project/monero-gui.git
synced 2025-01-09 12:30:10 +00:00
main: apply WalletMode check on start
This commit is contained in:
parent
fe3c06c36b
commit
582267a923
1 changed files with 8 additions and 1 deletions
9
main.qml
9
main.qml
|
@ -1271,6 +1271,9 @@ ApplicationWindow {
|
||||||
Component.onCompleted: {
|
Component.onCompleted: {
|
||||||
x = (Screen.width - width) / 2
|
x = (Screen.width - width) / 2
|
||||||
y = (Screen.height - maxWindowHeight) / 2
|
y = (Screen.height - maxWindowHeight) / 2
|
||||||
|
|
||||||
|
applyWalletMode(persistentSettings.walletMode);
|
||||||
|
|
||||||
//
|
//
|
||||||
walletManager.walletOpened.connect(onWalletOpened);
|
walletManager.walletOpened.connect(onWalletOpened);
|
||||||
walletManager.deviceButtonRequest.connect(onDeviceButtonRequest);
|
walletManager.deviceButtonRequest.connect(onDeviceButtonRequest);
|
||||||
|
@ -2054,6 +2057,10 @@ ApplicationWindow {
|
||||||
appWindow.disconnectedEpoch = 0;
|
appWindow.disconnectedEpoch = 0;
|
||||||
appWindow.walletMode = mode;
|
appWindow.walletMode = mode;
|
||||||
persistentSettings.walletMode = mode;
|
persistentSettings.walletMode = mode;
|
||||||
|
applyWalletMode(mode);
|
||||||
|
}
|
||||||
|
|
||||||
|
function applyWalletMode(mode){
|
||||||
if (mode < 2) {
|
if (mode < 2) {
|
||||||
persistentSettings.useRemoteNode = false;
|
persistentSettings.useRemoteNode = false;
|
||||||
persistentSettings.bootstrapNodeAddress = "auto";
|
persistentSettings.bootstrapNodeAddress = "auto";
|
||||||
|
@ -2062,7 +2069,7 @@ ApplicationWindow {
|
||||||
middlePanel.settingsView.settingsStateViewState = "Wallet"
|
middlePanel.settingsView.settingsStateViewState = "Wallet"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
console.log("walletMode changed: " + (mode === 0 ? "simple": mode === 1 ? "simple (bootstrap)" : "Advanced"));
|
console.log("walletMode: " + (mode === 0 ? "simple": mode === 1 ? "simple (bootstrap)" : "Advanced"));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Daemon console
|
// Daemon console
|
||||||
|
|
Loading…
Reference in a new issue