mirror of
https://github.com/monero-project/monero-gui.git
synced 2024-12-13 11:56:32 +02:00
wizard: store settings before opening from file
This commit is contained in:
parent
d8f9e7360f
commit
427d9e2645
@ -105,25 +105,19 @@ Rectangle {
|
||||
|
||||
function openCreateWalletPage() {
|
||||
print ("show create wallet page");
|
||||
pages[currentPage].opacity = 0;
|
||||
createWalletPage.opacity = 1
|
||||
currentPath = "create_wallet"
|
||||
pages = paths[currentPath]
|
||||
currentPage = pages.indexOf(createWalletPage)
|
||||
createWalletPage.createWallet(settings)
|
||||
wizard.nextButton.visible = true
|
||||
createWalletPage.onPageOpened(settings);
|
||||
// goto next page
|
||||
switchPage(true);
|
||||
}
|
||||
|
||||
function openRecoveryWalletPage() {
|
||||
print ("show recovery wallet page");
|
||||
pages[currentPage].opacity = 0
|
||||
recoveryWalletPage.opacity = 1
|
||||
currentPath = "recovery_wallet"
|
||||
pages = paths[currentPath]
|
||||
currentPage = pages.indexOf(recoveryWalletPage)
|
||||
wizard.nextButton.visible = true
|
||||
recoveryWalletPage.onPageOpened(settings);
|
||||
// goto next page
|
||||
switchPage(true);
|
||||
}
|
||||
|
||||
function openOpenWalletPage() {
|
||||
@ -132,7 +126,7 @@ Rectangle {
|
||||
settings.wallet.destroy();
|
||||
delete wizard.settings['wallet'];
|
||||
}
|
||||
|
||||
optionsPage.onPageClosed(settings)
|
||||
wizard.openWalletFromFileClicked();
|
||||
}
|
||||
|
||||
|
@ -40,6 +40,17 @@ Item {
|
||||
visible: false
|
||||
property var buttonSize: 190
|
||||
|
||||
function onPageClosed() {
|
||||
// Save settings used in open from file.
|
||||
// other wizard settings are saved on last page in applySettings()
|
||||
appWindow.persistentSettings.testnet = wizard.settings["testnet"]
|
||||
appWindow.persistentSettings.daemon_address = wizard.settings["daemon_address"]
|
||||
appWindow.persistentSettings.language = wizard.settings.language
|
||||
appWindow.persistentSettings.locale = wizard.settings.locale
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
function saveDaemonAddress() {
|
||||
wizard.settings["daemon_address"] = daemonAddress.text
|
||||
wizard.settings["testnet"] = testNet.checked
|
||||
@ -261,7 +272,12 @@ Item {
|
||||
Layout.alignment: Qt.AlignCenter
|
||||
width: 200
|
||||
fontSize: 14
|
||||
text: testNet.checked ? d.daemonAddressTestnet : d.daemonAddressMainnet
|
||||
text: {
|
||||
if(appWindow.persistentSettings.daemon_address)
|
||||
return appWindow.persistentSettings.daemon_address;
|
||||
return testNet.checked ? d.daemonAddressTestnet : d.daemonAddressMainnet
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
CheckBox {
|
||||
@ -274,7 +290,7 @@ Item {
|
||||
fontSize: 16
|
||||
checkedIcon: "../images/checkedVioletIcon.png"
|
||||
uncheckedIcon: "../images/uncheckedIcon.png"
|
||||
checked: false
|
||||
checked: appWindow.persistentSettings.testnet;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user