@@ -86,6 +86,7 @@ BitcoinGUI::BitcoinGUI(const PlatformStyle *_platformStyle, const NetworkStyle *
86
86
progressBar(0 ),
87
87
progressDialog(0 ),
88
88
appMenuBar(0 ),
89
+ appToolBar(0 ),
89
90
overviewAction(0 ),
90
91
historyAction(0 ),
91
92
quitAction(0 ),
@@ -453,6 +454,7 @@ void BitcoinGUI::createToolBars()
453
454
if (walletFrame)
454
455
{
455
456
QToolBar *toolbar = addToolBar (tr (" Tabs toolbar" ));
457
+ appToolBar = toolbar;
456
458
toolbar->setContextMenuPolicy (Qt::PreventContextMenu);
457
459
toolbar->setMovable (false );
458
460
toolbar->setToolButtonStyle (Qt::ToolButtonTextBesideIcon);
@@ -467,15 +469,7 @@ void BitcoinGUI::createToolBars()
467
469
spacer->setSizePolicy (QSizePolicy::Expanding, QSizePolicy::Expanding);
468
470
toolbar->addWidget (spacer);
469
471
470
- m_wallet_selector_label = new QLabel ();
471
- m_wallet_selector_label->setText (tr (" Wallet:" ) + " " );
472
- toolbar->addWidget (m_wallet_selector_label);
473
- m_wallet_selector_label->setVisible (false );
474
472
m_wallet_selector = new QComboBox ();
475
- toolbar->addWidget (m_wallet_selector);
476
- m_wallet_selector->setVisible (false );
477
- m_wallet_selector_label->setBuddy (m_wallet_selector);
478
-
479
473
connect (m_wallet_selector, SIGNAL (currentIndexChanged (const QString&)), this , SLOT (setCurrentWallet (const QString&)));
480
474
#endif
481
475
}
@@ -551,8 +545,11 @@ bool BitcoinGUI::addWallet(const QString& name, WalletModel *walletModel)
551
545
setWalletActionsEnabled (true );
552
546
m_wallet_selector->addItem (name);
553
547
if (m_wallet_selector->count () == 2 ) {
554
- m_wallet_selector->setVisible (true );
555
- m_wallet_selector->setVisible (true );
548
+ m_wallet_selector_label = new QLabel ();
549
+ m_wallet_selector_label->setText (tr (" Wallet:" ) + " " );
550
+ m_wallet_selector_label->setBuddy (m_wallet_selector);
551
+ appToolBar->addWidget (m_wallet_selector_label);
552
+ appToolBar->addWidget (m_wallet_selector);
556
553
}
557
554
rpcConsole->addWallet (name, walletModel);
558
555
return walletFrame->addWallet (name, walletModel);
0 commit comments