Changeset View
Changeset View
Standalone View
Standalone View
src/qt/rpcconsole.cpp
Show First 20 Lines • Show All 815 Lines • ▼ Show 20 Lines | void RPCConsole::setClientModel(ClientModel *model) { | ||||
} | } | ||||
} | } | ||||
#ifdef ENABLE_WALLET | #ifdef ENABLE_WALLET | ||||
void RPCConsole::addWallet(WalletModel *const walletModel) { | void RPCConsole::addWallet(WalletModel *const walletModel) { | ||||
const QString name = walletModel->getWalletName(); | const QString name = walletModel->getWalletName(); | ||||
// use name for text and internal data object (to allow to move to a wallet | // use name for text and internal data object (to allow to move to a wallet | ||||
// id later) | // id later) | ||||
ui->WalletSelector->addItem(name, name); | QString display_name = | ||||
name.isEmpty() ? "[" + tr("default wallet") + "]" : name; | |||||
ui->WalletSelector->addItem(display_name, name); | |||||
if (ui->WalletSelector->count() == 2 && !isVisible()) { | if (ui->WalletSelector->count() == 2 && !isVisible()) { | ||||
// First wallet added, set to default so long as the window isn't | // First wallet added, set to default so long as the window isn't | ||||
// presently visible (and potentially in use) | // presently visible (and potentially in use) | ||||
ui->WalletSelector->setCurrentIndex(1); | ui->WalletSelector->setCurrentIndex(1); | ||||
} | } | ||||
if (ui->WalletSelector->count() > 2) { | if (ui->WalletSelector->count() > 2) { | ||||
ui->WalletSelector->setVisible(true); | ui->WalletSelector->setVisible(true); | ||||
ui->WalletSelectorLabel->setVisible(true); | ui->WalletSelectorLabel->setVisible(true); | ||||
▲ Show 20 Lines • Show All 609 Lines • Show Last 20 Lines |