mirror of
https://github.com/monero-project/monero-gui.git
synced 2024-11-17 00:07:51 +00:00
wizard: store settings before opening from file
This commit is contained in:
parent
d8f9e7360f
commit
427d9e2645
2 changed files with 24 additions and 14 deletions
|
@ -105,25 +105,19 @@ Rectangle {
|
||||||
|
|
||||||
function openCreateWalletPage() {
|
function openCreateWalletPage() {
|
||||||
print ("show create wallet page");
|
print ("show create wallet page");
|
||||||
pages[currentPage].opacity = 0;
|
|
||||||
createWalletPage.opacity = 1
|
|
||||||
currentPath = "create_wallet"
|
currentPath = "create_wallet"
|
||||||
pages = paths[currentPath]
|
|
||||||
currentPage = pages.indexOf(createWalletPage)
|
|
||||||
createWalletPage.createWallet(settings)
|
createWalletPage.createWallet(settings)
|
||||||
wizard.nextButton.visible = true
|
wizard.nextButton.visible = true
|
||||||
createWalletPage.onPageOpened(settings);
|
// goto next page
|
||||||
|
switchPage(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
function openRecoveryWalletPage() {
|
function openRecoveryWalletPage() {
|
||||||
print ("show recovery wallet page");
|
print ("show recovery wallet page");
|
||||||
pages[currentPage].opacity = 0
|
|
||||||
recoveryWalletPage.opacity = 1
|
|
||||||
currentPath = "recovery_wallet"
|
currentPath = "recovery_wallet"
|
||||||
pages = paths[currentPath]
|
|
||||||
currentPage = pages.indexOf(recoveryWalletPage)
|
|
||||||
wizard.nextButton.visible = true
|
wizard.nextButton.visible = true
|
||||||
recoveryWalletPage.onPageOpened(settings);
|
// goto next page
|
||||||
|
switchPage(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
function openOpenWalletPage() {
|
function openOpenWalletPage() {
|
||||||
|
@ -132,8 +126,8 @@ Rectangle {
|
||||||
settings.wallet.destroy();
|
settings.wallet.destroy();
|
||||||
delete wizard.settings['wallet'];
|
delete wizard.settings['wallet'];
|
||||||
}
|
}
|
||||||
|
optionsPage.onPageClosed(settings)
|
||||||
wizard.openWalletFromFileClicked();
|
wizard.openWalletFromFileClicked();
|
||||||
}
|
}
|
||||||
|
|
||||||
function createWalletPath(folder_path,account_name){
|
function createWalletPath(folder_path,account_name){
|
||||||
|
|
|
@ -40,6 +40,17 @@ Item {
|
||||||
visible: false
|
visible: false
|
||||||
property var buttonSize: 190
|
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() {
|
function saveDaemonAddress() {
|
||||||
wizard.settings["daemon_address"] = daemonAddress.text
|
wizard.settings["daemon_address"] = daemonAddress.text
|
||||||
wizard.settings["testnet"] = testNet.checked
|
wizard.settings["testnet"] = testNet.checked
|
||||||
|
@ -261,7 +272,12 @@ Item {
|
||||||
Layout.alignment: Qt.AlignCenter
|
Layout.alignment: Qt.AlignCenter
|
||||||
width: 200
|
width: 200
|
||||||
fontSize: 14
|
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 {
|
CheckBox {
|
||||||
|
@ -274,7 +290,7 @@ Item {
|
||||||
fontSize: 16
|
fontSize: 16
|
||||||
checkedIcon: "../images/checkedVioletIcon.png"
|
checkedIcon: "../images/checkedVioletIcon.png"
|
||||||
uncheckedIcon: "../images/uncheckedIcon.png"
|
uncheckedIcon: "../images/uncheckedIcon.png"
|
||||||
checked: false
|
checked: appWindow.persistentSettings.testnet;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue