Qt: use [default wallet] as name for wallet with no name #13275

pull jonasschnelli wants to merge 1 commits into bitcoin:master from jonasschnelli:2018/05/loadwallet_gui_name changing 3 files +12 −3
  1. jonasschnelli commented at 12:39 PM on May 18, 2018: contributor

    Loading a wallet from a state where only the default wallet was active results in using an empty string for the initial/default wallet name.

    This is a GUI only quick-fix that overrides wallet(s) with name "" to "[default wallet]". Does not affect getwalletinfo or listwallets.

    Also, unsure if it should be fixed at a deeper level and if – instead of [default wallet] – it should use wallet.dat (the filename of the default wallet).

  2. jonasschnelli added the label GUI on May 18, 2018
  3. in src/qt/bitcoingui.cpp:555 in 01356d5525 outdated
     551 | @@ -552,8 +552,9 @@ bool BitcoinGUI::addWallet(WalletModel *walletModel)
     552 |      if(!walletFrame)
     553 |          return false;
     554 |      const QString name = walletModel->getWalletName();
     555 | +    QString display_name = (name == "") ? "["+tr("default wallet")+"]" : name;
    


    promag commented at 1:36 PM on May 18, 2018:

    name.isEmpty() ? ...

  4. in src/qt/rpcconsole.cpp:705 in 01356d5525 outdated
     701 | @@ -702,7 +702,8 @@ void RPCConsole::addWallet(WalletModel * const walletModel)
     702 |  {
     703 |      const QString name = walletModel->getWalletName();
     704 |      // use name for text and internal data object (to allow to move to a wallet id later)
     705 | -    ui->WalletSelector->addItem(name, name);
     706 | +    QString display_name = (name == "") ? "["+tr("default wallet")+"]" : name;
    


    promag commented at 1:39 PM on May 18, 2018:

    name.isEmpty() ? ...

  5. in src/qt/bitcoingui.cpp:578 in 01356d5525 outdated
     572 | @@ -572,6 +573,12 @@ bool BitcoinGUI::setCurrentWallet(const QString& name)
     573 |      return walletFrame->setCurrentWallet(name);
     574 |  }
     575 |  
     576 | +bool BitcoinGUI::setCurrentWalletBySelectorIndex(int index)
     577 | +{
     578 | +    QString internal_name = m_wallet_selector->itemData(index).toString();
    


    promag commented at 1:42 PM on May 18, 2018:

    nit, explicitly select Qt::UserRole?


    jonasschnelli commented at 9:13 AM on May 19, 2018:

    I don't think this is necessary,... or what would be the benefits of explicitly set it? I don't expect multiple roles in that dropdown.

  6. promag commented at 1:44 PM on May 18, 2018: member

    Tested ACK 01356d5. Both wallet selectors work as expected.

    I thought making the empty entry italic, but I guess [] also works.

    Some nits for your consideration.

  7. Qt: use [default wallet] as name for wallet with no name 2885c131b6
  8. jonasschnelli force-pushed on May 19, 2018
  9. jonasschnelli commented at 9:27 AM on May 19, 2018: contributor

    Fixed points reported by @promag

  10. promag commented at 3:30 PM on May 21, 2018: member

    reutACK 2885c13.

  11. laanwj commented at 3:08 PM on May 28, 2018: member

    utACK 2885c131b6b8ec1140e02ed8f2933c2ffbf41fd1

  12. laanwj merged this on May 28, 2018
  13. laanwj closed this on May 28, 2018

  14. laanwj referenced this in commit a315b79ad2 on May 28, 2018
  15. jasonbcox referenced this in commit 7f1df1c959 on Oct 25, 2019
  16. jonspock referenced this in commit dfe53cec79 on Feb 26, 2020
  17. jonspock referenced this in commit f6f32c602d on Mar 2, 2020
  18. jonspock referenced this in commit f08005a61e on Mar 7, 2020
  19. jonspock referenced this in commit bed7a732cd on Mar 14, 2020
  20. jonspock referenced this in commit e817f48924 on Mar 21, 2020
  21. jonspock referenced this in commit 758fcc64bb on Mar 24, 2020
  22. jonspock referenced this in commit 4bb7ebf864 on Apr 6, 2020
  23. jonspock referenced this in commit f641bc8dac on Apr 8, 2020
  24. jonspock referenced this in commit 631a859873 on Apr 8, 2020
  25. jonspock referenced this in commit a3b50e2ca0 on Apr 8, 2020
  26. jonspock referenced this in commit 4e93f0ddd3 on Apr 8, 2020
  27. jonspock referenced this in commit de83aeb90e on Apr 9, 2020
  28. jonspock referenced this in commit ed5d4456b0 on Apr 17, 2020
  29. jonspock referenced this in commit 8a1bf81f24 on May 23, 2020
  30. jonspock referenced this in commit e83e2eb6a7 on May 25, 2020
  31. jonspock referenced this in commit 0ff61f01e2 on Jul 9, 2020
  32. jonspock referenced this in commit 325f8e7331 on Jul 10, 2020
  33. jonspock referenced this in commit 2421e16e38 on Jul 17, 2020
  34. jonspock referenced this in commit 211a7529b0 on Jul 17, 2020
  35. jonspock referenced this in commit e6b03f9250 on Jul 20, 2020
  36. jonspock referenced this in commit c95539d8ba on Jul 29, 2020
  37. jonspock referenced this in commit 89dafad557 on Jul 31, 2020
  38. jonspock referenced this in commit ea3358cb26 on Aug 5, 2020
  39. jonspock referenced this in commit e8b35e6c08 on Aug 6, 2020
  40. jonspock referenced this in commit 4a6018fd0c on Aug 7, 2020
  41. proteanx referenced this in commit 45d324c87f on Aug 8, 2020
  42. xdustinface referenced this in commit 228de80829 on Apr 4, 2021
  43. xdustinface referenced this in commit b1ef6b0325 on Apr 4, 2021
  44. xdustinface referenced this in commit b052730e97 on Apr 4, 2021
  45. xdustinface referenced this in commit 65f1133da4 on Apr 4, 2021
  46. xdustinface referenced this in commit 4666e2c20a on Apr 5, 2021
  47. xdustinface referenced this in commit 26034ff778 on Apr 13, 2021
  48. TheArbitrator referenced this in commit 503102f18c on Jun 21, 2021
  49. MarcoFalke locked this on Sep 8, 2021
Labels

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-21 18:15 UTC

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