aboutsummaryrefslogtreecommitdiff
path: root/src/qt/optionsdialog.cpp
diff options
context:
space:
mode:
authorfurszy <matiasfurszyfer@protonmail.com>2022-06-12 11:59:50 -0300
committerfurszy <matiasfurszyfer@protonmail.com>2022-06-28 10:29:08 -0300
commitac4fb3bbbe207d0744201a9df8a971af06db5476 (patch)
tree0bf276b3c9e8095468f22532c3c96b704162f36f /src/qt/optionsdialog.cpp
parent37633d2f61697fc719390767aae740ece978b074 (diff)
downloadbitcoin-ac4fb3bbbe207d0744201a9df8a971af06db5476.tar.xz
gui: reset options, notify user about the backup creation
Diffstat (limited to 'src/qt/optionsdialog.cpp')
-rw-r--r--src/qt/optionsdialog.cpp15
1 files changed, 11 insertions, 4 deletions
diff --git a/src/qt/optionsdialog.cpp b/src/qt/optionsdialog.cpp
index f3c3af10e0..462b923d61 100644
--- a/src/qt/optionsdialog.cpp
+++ b/src/qt/optionsdialog.cpp
@@ -10,6 +10,7 @@
#include <qt/forms/ui_optionsdialog.h>
#include <qt/bitcoinunits.h>
+#include <qt/clientmodel.h>
#include <qt/guiconstants.h>
#include <qt/guiutil.h>
#include <qt/optionsmodel.h>
@@ -168,6 +169,11 @@ OptionsDialog::~OptionsDialog()
delete ui;
}
+void OptionsDialog::setClientModel(ClientModel* client_model)
+{
+ m_client_model = client_model;
+}
+
void OptionsDialog::setModel(OptionsModel *_model)
{
this->model = _model;
@@ -278,14 +284,15 @@ void OptionsDialog::setOkButtonState(bool fState)
void OptionsDialog::on_resetButton_clicked()
{
- if(model)
- {
+ if (model) {
// confirmation dialog
QMessageBox::StandardButton btnRetVal = QMessageBox::question(this, tr("Confirm options reset"),
- tr("Client restart required to activate changes.") + "<br><br>" + tr("Client will be shut down. Do you want to proceed?"),
+ tr("Client restart required to activate changes.") + "<br><br>" +
+ tr("Current settings will be backed up at \"%1\".").arg(m_client_model->dataDir()) + "<br><br>" +
+ tr("Client will be shut down. Do you want to proceed?"),
QMessageBox::Yes | QMessageBox::Cancel, QMessageBox::Cancel);
- if(btnRetVal == QMessageBox::Cancel)
+ if (btnRetVal == QMessageBox::Cancel)
return;
/* reset all options and close GUI */