mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-02-22 15:04:44 +01:00
Merge bitcoin-core/gui#391: Add cancel button to configuration options popup
0b869df1c9
qt: Add cancel button to configuration options popup (Shashwat) Pull request description: This PR renames the **OK** button to **Continue** and adds a **Cancel** button to the configuration options pop-up. This feature will give the user an option to abort opening the configuration file if they want to. This is an essential helpful feature that was missing in the master branch. In some windows managers such as Windows I3. The exit button at the top right corner is missing. So this feature becomes crucial there. And even when the exit button is there, it doesn't prevent the opening of the configuration file even when pressed. Additionally, it will always be possible to close using Keyboard Shortcut. This PR helps accessibility for those who need to use a mouse. <table> <tr> <td>Master </td> <td>PR </td> </tr> <tr> <td>  </td> <td>  </td> </tr> </table> ACKs for top commit: hebasto: ACK0b869df1c9
, tested on Linux Mint 20.2 (Qt 5.12.8): prayank23: tACK0b869df1c9
Tree-SHA512: c314e8b84064134f028f66f5015eb0f6ba33d5d4174c9ff49dcb5d2b577dce6019f59f9c7913393a415a323ea98c26febf5ca26e3e2102e7a1d31171e01937f1
This commit is contained in:
commit
5895a502cb
1 changed files with 16 additions and 4 deletions
|
@ -296,10 +296,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())
|
||||
|
|
Loading…
Add table
Reference in a new issue