From 4b2d42ec3f94005dfc31aade7ded5c9cd56be130 Mon Sep 17 00:00:00 2001 From: Philip Kaufmann Date: Fri, 2 Aug 2013 13:53:03 +0200 Subject: [PATCH] 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: dbc0a6aba2cf94aa1b167145a18e0b9c671aef5b --- src/qt/walletstack.cpp | 5 +++++ src/qt/walletview.cpp | 1 + src/qt/walletview.h | 4 ++++ 3 files changed, 10 insertions(+) diff --git a/src/qt/walletstack.cpp b/src/qt/walletstack.cpp index 9e3060e86..3576d55ce 100644 --- a/src/qt/walletstack.cpp +++ b/src/qt/walletstack.cpp @@ -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; } diff --git a/src/qt/walletview.cpp b/src/qt/walletview.cpp index 277c05669..dd2034c34 100644 --- a/src/qt/walletview.cpp +++ b/src/qt/walletview.cpp @@ -207,6 +207,7 @@ bool WalletView::handleURI(const QString& strURI) if (sendCoinsPage->handleURI(strURI)) { gotoSendCoinsPage(); + emit showNormalIfMinimized(); return true; } else diff --git a/src/qt/walletview.h b/src/qt/walletview.h index 6bcd70baf..6ad5180d5 100644 --- a/src/qt/walletview.h +++ b/src/qt/walletview.h @@ -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