aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorShashwat <svangani239@gmail.com>2021-07-21 22:12:25 +0530
committerShashwat <svangani239@gmail.com>2021-09-10 19:02:54 +0530
commit0b869df1c913839855148d728514c76ba7664092 (patch)
tree36753ff3ac5ef2a3231d47277a26066ced05f417 /src
parent201c5e4aec5210b258644ff96379cda0ca7273ab (diff)
downloadbitcoin-0b869df1c913839855148d728514c76ba7664092.tar.xz
qt: Add cancel button to configuration options popup
This adds a cancel buttion to the configuration options window
Diffstat (limited to 'src')
-rw-r--r--src/qt/optionsdialog.cpp20
1 files changed, 16 insertions, 4 deletions
diff --git a/src/qt/optionsdialog.cpp b/src/qt/optionsdialog.cpp
index b12fe96567..00d81f57fe 100644
--- a/src/qt/optionsdialog.cpp
+++ b/src/qt/optionsdialog.cpp
@@ -295,10 +295,22 @@ void OptionsDialog::on_resetButton_clicked()
void OptionsDialog::on_openBitcoinConfButton_clicked()
{
- /* explain the purpose of the config file */
- QMessageBox::information(this, tr("Configuration options"),
- tr("The configuration file is used to specify advanced user options which override GUI settings. "
- "Additionally, any command-line options will override this configuration file."));
+ QMessageBox config_msgbox(this);
+ config_msgbox.setIcon(QMessageBox::Information);
+ //: Window title text of pop-up box that allows opening up of configuration file.
+ config_msgbox.setWindowTitle(tr("Configuration options"));
+ /*: Explanatory text about the priority order of instructions considered by client.
+ The order from high to low being: command-line, configuration file, GUI settings. */
+ config_msgbox.setText(tr("The configuration file is used to specify advanced user options which override GUI settings. "
+ "Additionally, any command-line options will override this configuration file."));
+
+ QPushButton* open_button = config_msgbox.addButton(tr("Continue"), QMessageBox::ActionRole);
+ config_msgbox.addButton(tr("Cancel"), QMessageBox::RejectRole);
+ open_button->setDefault(true);
+
+ config_msgbox.exec();
+
+ if (config_msgbox.clickedButton() != open_button) return;
/* show an error if there was some problem opening the file */
if (!GUIUtil::openBitcoinConf())