File tree Expand file tree Collapse file tree 4 files changed +11
-4
lines changed Expand file tree Collapse file tree 4 files changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -570,7 +570,7 @@ bool BitcoinGUI::addWallet(WalletModel *walletModel)
570
570
if (!walletFrame)
571
571
return false ;
572
572
const QString name = walletModel->getWalletName ();
573
- QString display_name = name. isEmpty () ? " [ " + tr ( " default wallet " )+ " ] " : name ;
573
+ const QString display_name = walletModel-> getDisplayName () ;
574
574
setWalletActionsEnabled (true );
575
575
m_wallet_selector->addItem (display_name, name);
576
576
if (m_wallet_selector->count () == 2 ) {
Original file line number Diff line number Diff line change @@ -700,7 +700,7 @@ void RPCConsole::addWallet(WalletModel * const walletModel)
700
700
{
701
701
const QString name = walletModel->getWalletName ();
702
702
// use name for text and internal data object (to allow to move to a wallet id later)
703
- QString display_name = name. isEmpty () ? " [ " + tr ( " default wallet " )+ " ] " : name ;
703
+ const QString display_name = walletModel-> getDisplayName () ;
704
704
ui->WalletSelector ->addItem (display_name, name);
705
705
if (ui->WalletSelector ->count () == 2 && !isVisible ()) {
706
706
// First wallet added, set to default so long as the window isn't presently visible (and potentially in use)
Original file line number Diff line number Diff line change 1
- // Copyright (c) 2011-2018 The Bitcoin Core developers
1
+ // Copyright (c) 2011-2019 The Bitcoin Core developers
2
2
// Distributed under the MIT software license, see the accompanying
3
3
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
4
4
@@ -578,6 +578,12 @@ QString WalletModel::getWalletName() const
578
578
return QString::fromStdString (m_wallet->getWalletName ());
579
579
}
580
580
581
+ QString WalletModel::getDisplayName () const
582
+ {
583
+ const QString name = getWalletName ();
584
+ return name.isEmpty () ? " [" +tr (" default wallet" )+" ]" : name;
585
+ }
586
+
581
587
bool WalletModel::isMultiwallet ()
582
588
{
583
589
return m_node.getWallets ().size () > 1 ;
Original file line number Diff line number Diff line change 1
- // Copyright (c) 2011-2018 The Bitcoin Core developers
1
+ // Copyright (c) 2011-2019 The Bitcoin Core developers
2
2
// Distributed under the MIT software license, see the accompanying
3
3
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
4
4
@@ -219,6 +219,7 @@ class WalletModel : public QObject
219
219
interfaces::Wallet& wallet () const { return *m_wallet; }
220
220
221
221
QString getWalletName () const ;
222
+ QString getDisplayName () const ;
222
223
223
224
bool isMultiwallet ();
224
225
You can’t perform that action at this time.
0 commit comments