Don't show wallet options in the preferences menu when running with -dis... #5245

pull sinetek wants to merge 1 commits into bitcoin:master from sinetek:master changing 4 files +11 −5
  1. sinetek commented at 7:03 PM on November 8, 2014: contributor

    See #5222

  2. Don't show wallet options in the preferences menu when running with -disablewallet 0e64df50b0
  3. laanwj commented at 12:18 PM on November 10, 2014: member

    ACK

  4. laanwj added the label GUI on Nov 10, 2014
  5. fanquake commented at 12:54 PM on November 10, 2014: member

    ACK @sinetek Can you close the original pull request?

  6. in src/qt/optionsdialog.cpp:None in 0e64df50b0
      65 | @@ -66,6 +66,11 @@ OptionsDialog::OptionsDialog(QWidget *parent) :
      66 |      ui->tabWidget->removeTab(ui->tabWidget->indexOf(ui->tabWindow));
      67 |  #endif
      68 |  
      69 | +    /* remove Wallet tab in case of -disablewallet */
      70 | +    if (!enableWallet) {
      71 | +		ui->tabWidget->removeTab(ui->tabWidget->indexOf(ui->tabWallet));
    


    Diapolo commented at 1:42 PM on November 10, 2014:

    This has the wrong indentation.

  7. in src/qt/bitcoingui.cpp:None in 0e64df50b0
     553 | @@ -554,7 +554,7 @@ void BitcoinGUI::optionsClicked()
     554 |      if(!clientModel || !clientModel->getOptionsModel())
     555 |          return;
     556 |  
     557 | -    OptionsDialog dlg(this);
     558 | +    OptionsDialog dlg(this, enableWallet);
    


    jonasschnelli commented at 2:52 PM on November 10, 2014:

    Is it worth to have a initializer parameter (enableWallet) for this? Would it not be possible to wrap the bool through the OptionsModel instance? My idea would be to do... ui->tabWidget->removeTab(...) ... when setting the optionsModel and after checking thought the optionsModel if the wallet is enabled.

  8. jonasschnelli commented at 2:53 PM on November 10, 2014: contributor

    Tested. ACK with some ideas for optimize the code.

  9. sinetek commented at 7:00 PM on November 10, 2014: contributor

    feel free to improve it :-) closing both my issues.

  10. sinetek closed this on Nov 10, 2014

  11. jonasschnelli commented at 7:38 PM on November 10, 2014: contributor

    why did you close it?

  12. laanwj commented at 7:41 PM on November 10, 2014: member

    @jonasschnelli I suggested to use the constructor parameter, it's fine. Wallet or not is not an option (like the others), so doesn't belong on the options model either.

  13. laanwj reopened this on Nov 10, 2014

  14. laanwj referenced this in commit 83f5daf2fe on Nov 10, 2014
  15. laanwj commented at 7:52 PM on November 10, 2014: member

    Merged via 83f5daf2fe6e2f42c81576097f4084d2788b454b

  16. laanwj closed this on Nov 10, 2014

  17. jonasschnelli commented at 7:53 PM on November 10, 2014: contributor

    Okay, i see. Options has nothing to do with startup/config args. Right.

  18. laanwj commented at 8:04 AM on November 11, 2014: member

    @jonasschnelli Well it's a grey area in this case. It's sort of an option, but one that switches the entire identity of the program. For OptionsDialog it's a matter of 'what version of the UI to show', and I think it's more transparent to just pass a flag.

  19. sinetek commented at 8:07 AM on November 11, 2014: contributor

    +1 laanwj

  20. MarcoFalke locked this on Sep 8, 2021

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-13 18:15 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me