qt: Ignore showNormalIfMinimized in initialization or shutdown

Also get rid of ui_interface flag NOSHOWGUI. It's up to the GUI to
decide this.

Fixes #4360.
This commit is contained in:
Wladimir J. van der Laan
2014-07-14 10:46:06 +02:00
parent c9bc398ad9
commit 49d57125f9
3 changed files with 5 additions and 9 deletions

View File

@@ -780,11 +780,7 @@ 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, 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();
showNormalIfMinimized();
QMessageBox mBox((QMessageBox::Icon)nMBoxIcon, strTitle, message, buttons, this);
int r = mBox.exec();
if (ret != NULL)
@@ -921,6 +917,8 @@ void BitcoinGUI::setEncryptionStatus(int status)
void BitcoinGUI::showNormalIfMinimized(bool fToggleHidden)
{
if(!clientModel)
return;
// activateWindow() (sometimes) helps with keyboard focus on Windows
if (isHidden())
{