aboutsummaryrefslogtreecommitdiff
path: root/src/qt/bitcoingui.cpp
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2013-12-16 18:13:31 +0100
committerWladimir J. van der Laan <laanwj@gmail.com>2013-12-16 18:51:30 +0100
commit1ad26362c92c7d5678c24df85fd7b9ab1d3d34fe (patch)
tree7bc3446ccc10fe5c571b4b0bcbe148e715543c7d /src/qt/bitcoingui.cpp
parent93a7861d719ac8b4ec57cf89c3e2d423ba7f18e1 (diff)
qt: Prevent non-functional GUI from popping up during Init
When a InitError or InitWarning happens, the GUI pops up but is unusable (until Init finishes). This is caused by showNormalIfMinimized. Add a message flag to skip this call for Init errors or warnings.
Diffstat (limited to 'src/qt/bitcoingui.cpp')
-rw-r--r--src/qt/bitcoingui.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/qt/bitcoingui.cpp b/src/qt/bitcoingui.cpp
index 5ffd3f8987..048ac070ad 100644
--- a/src/qt/bitcoingui.cpp
+++ b/src/qt/bitcoingui.cpp
@@ -681,8 +681,11 @@ void BitcoinGUI::message(const QString &title, const QString &message, unsigned
if (!(buttons = (QMessageBox::StandardButton)(style & CClientUIInterface::BTN_MASK)))
buttons = QMessageBox::Ok;
- // Ensure we get users attention
- showNormalIfMinimized();
+ // Ensure we get users attention, but only if main window is visible
+ // as we don't want to pop up the main window for messages that happen before
+ // initialization is finished.
+ if(!(style & CClientUIInterface::NOSHOWGUI))
+ showNormalIfMinimized();
QMessageBox mBox((QMessageBox::Icon)nMBoxIcon, strTitle, message, buttons, this);
int r = mBox.exec();
if (ret != NULL)