From f5c5df7b677e10c78bddb2defa7b392bfe42696a Mon Sep 17 00:00:00 2001 From: xiphon Date: Tue, 28 Jul 2020 17:42:59 +0000 Subject: main: accountsDir runtime configuration support --- wizard/WizardController.qml | 6 +++--- wizard/WizardOpenWallet1.qml | 2 +- wizard/WizardWalletInput.qml | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) (limited to 'wizard') diff --git a/wizard/WizardController.qml b/wizard/WizardController.qml index b38d079f..e39a29de 100644 --- a/wizard/WizardController.qml +++ b/wizard/WizardController.qml @@ -308,7 +308,7 @@ Rectangle { FileDialog { id: fileDialog title: qsTr("Please choose a file") + translationManager.emptyString - folder: "file://" + moneroAccountsDir + folder: "file://" + appWindow.accountsDir nameFilters: [ "Wallet files (*.keys)"] sidebarVisible: false @@ -382,7 +382,7 @@ Rectangle { }; if (isIOS) { - new_wallet_filename = moneroAccountsDir + new_wallet_filename; + new_wallet_filename = appWindow.accountsDir + new_wallet_filename; } console.log("saving new wallet to", new_wallet_filename); wizardController.m_wallet.storeAsync(handler, new_wallet_filename); @@ -540,7 +540,7 @@ Rectangle { persistentSettings.wallet_path = fn; if(isIOS) - persistentSettings.wallet_path = persistentSettings.wallet_path.replace(moneroAccountsDir, ""); + persistentSettings.wallet_path = persistentSettings.wallet_path.replace(appWindow.accountsDir, ""); appWindow.openWallet(); } diff --git a/wizard/WizardOpenWallet1.qml b/wizard/WizardOpenWallet1.qml index 85bc48d7..778542e8 100644 --- a/wizard/WizardOpenWallet1.qml +++ b/wizard/WizardOpenWallet1.qml @@ -294,7 +294,7 @@ Rectangle { function onPageCompleted(previousView){ if(previousView.viewName == "wizardHome"){ - walletKeysFilesModel.refresh(moneroAccountsDir); + walletKeysFilesModel.refresh(appWindow.accountsDir); wizardOpenWallet1.walletCount = walletKeysFilesModel.rowCount(); flow._height = flow.calcHeight(); } diff --git a/wizard/WizardWalletInput.qml b/wizard/WizardWalletInput.qml index 261f4b37..5b2f3b69 100644 --- a/wizard/WizardWalletInput.qml +++ b/wizard/WizardWalletInput.qml @@ -55,7 +55,7 @@ GridLayout { function reset() { walletName.error = !walletName.verify(); walletLocation.error = walletLocation.text === ""; - walletLocation.text = moneroAccountsDir; + walletLocation.text = appWindow.accountsDir; walletName.text = defaultAccountName; } @@ -66,7 +66,7 @@ GridLayout { function verify(){ if(walletLocation === "" || /[\\\/]/.test(walletName.text)) return false; - var exists = Wizard.walletPathExists(walletLocation.text, walletName.text, isIOS, walletManager); + var exists = Wizard.walletPathExists(appWindow.accountsDir, walletLocation.text, walletName.text, isIOS, walletManager); return !exists && walletLocation.error === false; } @@ -88,7 +88,7 @@ GridLayout { labelFontSize: 14 placeholderText: "..." placeholderFontSize: 16 - text: moneroAccountsDir + "/" + text: appWindow.accountsDir + "/" inlineButton.small: true inlineButtonText: qsTr("Browse") + translationManager.emptyString inlineButton.onClicked: { -- cgit v1.2.3