mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-04-26 23:09:03 +02:00
qt: Add cancel button to configuration options popup
This adds a cancel buttion to the configuration options window
This commit is contained in:
@@ -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())
|
||||
|
||||
Reference in New Issue
Block a user