Bitcoin-Qt: Fix display of window when bitcoin: URI is opened

WalletView:
- add new signal showNormalIfMinimized()
- emit the new signal in handleURI() to fix a bug, preventing the main
  window to show up when using bitcoin: URIs

Upstream: dbc0a6aba2
This commit is contained in:
Philip Kaufmann
2013-08-02 13:53:03 +02:00
committed by Wladimir J. van der Laan
parent 3b8868dca4
commit bfb0856986
3 changed files with 10 additions and 0 deletions

View File

@@ -13,6 +13,7 @@
WalletStack::WalletStack(QWidget *parent) :
QStackedWidget(parent),
gui(0),
clientModel(0),
bOutOfSync(true)
{
@@ -35,6 +36,10 @@ bool WalletStack::addWallet(const QString& name, WalletModel *walletModel)
walletView->showOutOfSyncWarning(bOutOfSync);
addWidget(walletView);
mapWalletViews[name] = walletView;
// Ensure a walletView is able to show the main window
connect(walletView, SIGNAL(showNormalIfMinimized()), gui, SLOT(showNormalIfMinimized()));
return true;
}

View File

@@ -203,6 +203,7 @@ bool WalletView::handleURI(const QString& strURI)
if (sendCoinsPage->handleURI(strURI))
{
gotoSendCoinsPage();
emit showNormalIfMinimized();
return true;
}
else

View File

@@ -99,6 +99,10 @@ public slots:
void unlockWallet();
void setEncryptionStatus();
signals:
/** Signal that we want to show the main window */
void showNormalIfMinimized();
};
#endif // WALLETVIEW_H