Browse Source

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
0.8
Philip Kaufmann 11 years ago committed by Warren Togami
parent
commit
4b2d42ec3f
  1. 5
      src/qt/walletstack.cpp
  2. 1
      src/qt/walletview.cpp
  3. 4
      src/qt/walletview.h

5
src/qt/walletstack.cpp

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

1
src/qt/walletview.cpp

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

4
src/qt/walletview.h

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

Loading…
Cancel
Save