aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorluigi1111 <luigi1111w@gmail.com>2020-04-22 13:34:47 -0500
committerluigi1111 <luigi1111w@gmail.com>2020-04-22 13:34:47 -0500
commit2bef74fe8a9a90f0eb0f9ff5b53dddd97daed369 (patch)
tree153840d10f91a23d091e94fb727b44ab3cd0b5b0
parenta75a0fb8c5aa451cd1405bf0fdcb440666ba96f0 (diff)
parentffceda9159b75eb113c98810794afcceb9a40bcf (diff)
downloadmonzero-gui-2bef74fe8a9a90f0eb0f9ff5b53dddd97daed369.tar.gz
monzero-gui-2bef74fe8a9a90f0eb0f9ff5b53dddd97daed369.tar.xz
monzero-gui-2bef74fe8a9a90f0eb0f9ff5b53dddd97daed369.zip
Merge pull request #2838
ffceda9 SettingsLayout: add checkbox 'ask for password before sending a transaction' (rating89us)
-rw-r--r--main.qml22
-rw-r--r--pages/settings/SettingsLayout.qml7
2 files changed, 22 insertions, 7 deletions
diff --git a/main.qml b/main.qml
index a3651137..bb68008d 100644
--- a/main.qml
+++ b/main.qml
@@ -1367,6 +1367,7 @@ ApplicationWindow {
property int segregationHeight: 0
property int kdfRounds: 1
property bool hideBalance: false
+ property bool askPasswordBeforeSending: true
property bool lockOnUserInActivity: true
property int walletMode: 2
property int lockOnUserInActivityInterval: 10 // minutes
@@ -1402,21 +1403,28 @@ ApplicationWindow {
z: parent.z + 1
id: transactionConfirmationPopup
onAccepted: {
+ var handleAccepted = function() {
+ // Save transaction to file if view only wallet
+ if (viewOnly) {
+ saveTxDialog.open();
+ } else {
+ handleTransactionConfirmed()
+ }
+ }
close();
passwordDialog.onAcceptedCallback = function() {
if(walletPassword === passwordDialog.password){
- // Save transaction to file if view only wallet
- if(viewOnly) {
- saveTxDialog.open();
- } else {
- handleTransactionConfirmed()
- }
+ handleAccepted()
} else {
passwordDialog.showError(qsTr("Wrong password") + translationManager.emptyString);
}
}
passwordDialog.onRejectedCallback = null;
- passwordDialog.open()
+ if(!persistentSettings.askPasswordBeforeSending) {
+ handleAccepted()
+ } else {
+ passwordDialog.open()
+ }
}
}
diff --git a/pages/settings/SettingsLayout.qml b/pages/settings/SettingsLayout.qml
index 56d459cc..4515fe99 100644
--- a/pages/settings/SettingsLayout.qml
+++ b/pages/settings/SettingsLayout.qml
@@ -78,6 +78,13 @@ Rectangle {
persistentSettings.blackTheme = MoneroComponents.Style.blackTheme;
}
}
+
+ MoneroComponents.CheckBox {
+ id: askPasswordBeforeSendingCheckbox
+ checked: persistentSettings.askPasswordBeforeSending
+ onClicked: persistentSettings.askPasswordBeforeSending = !persistentSettings.askPasswordBeforeSending
+ text: qsTr("Ask for password before sending a transaction") + translationManager.emptyString
+ }
MoneroComponents.CheckBox {
id: userInActivityCheckbox