Skip to content

Commit 0b869df

Browse files
committed
qt: Add cancel button to configuration options popup
This adds a cancel buttion to the configuration options window
1 parent 201c5e4 commit 0b869df

File tree

1 file changed

+16
-4
lines changed

1 file changed

+16
-4
lines changed

src/qt/optionsdialog.cpp

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -295,10 +295,22 @@ void OptionsDialog::on_resetButton_clicked()
295295

296296
void OptionsDialog::on_openBitcoinConfButton_clicked()
297297
{
298-
/* explain the purpose of the config file */
299-
QMessageBox::information(this, tr("Configuration options"),
300-
tr("The configuration file is used to specify advanced user options which override GUI settings. "
301-
"Additionally, any command-line options will override this configuration file."));
298+
QMessageBox config_msgbox(this);
299+
config_msgbox.setIcon(QMessageBox::Information);
300+
//: Window title text of pop-up box that allows opening up of configuration file.
301+
config_msgbox.setWindowTitle(tr("Configuration options"));
302+
/*: Explanatory text about the priority order of instructions considered by client.
303+
The order from high to low being: command-line, configuration file, GUI settings. */
304+
config_msgbox.setText(tr("The configuration file is used to specify advanced user options which override GUI settings. "
305+
"Additionally, any command-line options will override this configuration file."));
306+
307+
QPushButton* open_button = config_msgbox.addButton(tr("Continue"), QMessageBox::ActionRole);
308+
config_msgbox.addButton(tr("Cancel"), QMessageBox::RejectRole);
309+
open_button->setDefault(true);
310+
311+
config_msgbox.exec();
312+
313+
if (config_msgbox.clickedButton() != open_button) return;
302314

303315
/* show an error if there was some problem opening the file */
304316
if (!GUIUtil::openBitcoinConf())

0 commit comments

Comments
 (0)