diff options
author | Shashwat <svangani239@gmail.com> | 2021-07-21 22:12:25 +0530 |
---|---|---|
committer | Shashwat <svangani239@gmail.com> | 2021-09-10 19:02:54 +0530 |
commit | 0b869df1c913839855148d728514c76ba7664092 (patch) | |
tree | 36753ff3ac5ef2a3231d47277a26066ced05f417 /src/qt | |
parent | 201c5e4aec5210b258644ff96379cda0ca7273ab (diff) |
qt: Add cancel button to configuration options popup
This adds a cancel buttion to the configuration options window
Diffstat (limited to 'src/qt')
-rw-r--r-- | src/qt/optionsdialog.cpp | 20 |
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()) |