fix issue when disabling the auto-enabled blank wallet checkbox #243

pull jarolrod wants to merge 1 commits into bitcoin-core:master from jarolrod:create-wallet changing 1 files +6 −0
  1. jarolrod commented at 1:14 am on March 10, 2021: member

    As detailed by #151, On master a user can create the confusing scenario where you have a disabled Encrypt Wallet checkbox and a selected Disable Private Keys checkbox after unselecting the auto-enabled Blank Wallet checkbox.

    This commit makes it so that when the Blank Wallet checkbox is auto-selected after the user selects Disable Private keys, unselecting it will also unselect the Disable Private Keys checkbox, which in turn re-enables the Encrypt Wallet checkbox.

    Below are screenshots comparing the behavior of selecting Disable Private Keys then unselecting the Blank Wallet between master and this PR:

    Master:

    Select Disable Private Keys Unselect Blank Wallet
    Screen Shot 2021-03-09 at 7 57 14 PM Screen Shot 2021-03-09 at 7 57 31 PM

    PR:

    Select Disable Private Keys Unselect Blank Wallet
    Screen Shot 2021-03-09 at 7 34 12 PM Screen Shot 2021-03-09 at 7 34 20 PM
  2. hebasto added the label Design on Mar 10, 2021
  3. in src/qt/createwalletdialog.cpp:57 in ca6bb0dac8 outdated
    52@@ -53,6 +53,13 @@ CreateWalletDialog::CreateWalletDialog(QWidget* parent) :
    53         }
    54     });
    55 
    56+    connect(ui->blank_wallet_checkbox, &QCheckBox::toggled, [this](bool checked) {
    57+        // Disable the disable_privkeys_checkbox when blank_wallet_checkbox is false
    


    Talkless commented at 5:13 pm on March 11, 2021:

    Not sure if these kind of comments are helpful. You can see that stated fact by just looking at rather self-explanatory code, with descriptive variable names.

    Maybe this message would be more informative:

    //Having “Disable Private Keys” checked after unchecking “Make Blank Wallet” makes no sense. Disabling keys means wallet has to be blank.

    Or something similar.


    hebasto commented at 2:34 am on March 20, 2021:

    Actually, the comment is wrong as the disable_privkeys_checkbox is to be unchecked, not disabled :)

    I think just removing it is fine.


    jarolrod commented at 5:18 pm on March 23, 2021:
    Removed the comment in 915e341
  4. leonardojobim approved
  5. leonardojobim commented at 2:03 am on March 12, 2021: none
  6. MarcoFalke requested review from Sjors on Mar 12, 2021
  7. Rspigler commented at 11:37 pm on March 18, 2021: contributor

    Tested ACK commit ca6bb0dac80bf970db9f42109f2304a2fdc5d1ee

    Looks good!

    Doesn’t fix all the issues I described in #151, since the encryption tooltip is still wrong. But this annoying inconsistency is fixed

  8. hebasto commented at 1:39 am on March 20, 2021: member
    Concept ACK. The logic of checkboxes interaction is correct.
  9. hebasto commented at 2:45 am on March 20, 2021: member
    Approach ACK ca6bb0dac80bf970db9f42109f2304a2fdc5d1ee, please remove comment.
  10. qt: fix issue when disabling the auto-enabled blank wallet checkbox
    This commit makes it so that when the `Blank Wallet` checkbox is auto-selected after the user selects 'Disable Private' keys, unselecting it will also unselect the 'Disable Private Keys' checkbox, which in turn re-enables the 'Encrypt Wallet' checkbox.
    915e34112b
  11. jarolrod force-pushed on Mar 23, 2021
  12. jarolrod commented at 5:18 pm on March 23, 2021: member

    Updated from ca6bb0d -> 915e341, addressed @hebasto’s comment

    Changes: remove the redundant comment. Code is self-explanatory.

  13. hebasto approved
  14. hebasto commented at 5:19 pm on March 23, 2021: member
    ACK 915e34112b5a4c2ef391d7e3706603bcd6f62a2a
  15. Talkless approved
  16. Talkless commented at 5:42 pm on March 23, 2021: none
    ACK 915e34112b5a4c2ef391d7e3706603bcd6f62a2a
  17. MarcoFalke renamed this:
    qt: fix issue when disabling the auto-enabled blank wallet checkbox
    fix issue when disabling the auto-enabled blank wallet checkbox
    on Mar 26, 2021
  18. MarcoFalke merged this on Mar 26, 2021
  19. MarcoFalke closed this on Mar 26, 2021

  20. sidhujag referenced this in commit 2926644210 on Mar 26, 2021
  21. jarolrod deleted the branch on Mar 26, 2021
  22. gwillen referenced this in commit 9eebd3345e on Jun 1, 2022
  23. bitcoin-core locked this on Aug 16, 2022

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin-core/gui. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-12-03 17:20 UTC

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