Allow password to be changed

This commit is contained in:
stoffu
2017-09-22 23:25:25 +09:00
parent cec206ec8d
commit cf488f4406
4 changed files with 304 additions and 0 deletions

View File

@@ -1162,6 +1162,29 @@ ApplicationWindow {
}
}
NewPasswordDialog {
id: newPasswordDialog
z: parent.z + 1
visible:false
anchors.fill: parent
onAccepted: {
if (currentWallet.setPassword(newPasswordDialog.password)) {
appWindow.walletPassword = newPasswordDialog.password;
informationPopup.title = qsTr("Information") + translationManager.emptyString;
informationPopup.text = qsTr("Password changed successfully") + translationManager.emptyString;
informationPopup.icon = StandardIcon.Information;
} else {
informationPopup.title = qsTr("Error") + translationManager.emptyString;
informationPopup.text = qsTr("Error: ") + currentWallet.errorString;
informationPopup.icon = StandardIcon.Critical;
}
informationPopup.onCloseCallback = null;
informationPopup.open();
}
onRejected: {
}
}
DaemonManagerDialog {
id: daemonManagerDialog
onRejected: {