aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorWladimir J. van der Laan <[email protected]>2014-07-14 11:33:02 +0200
committerWladimir J. van der Laan <[email protected]>2014-07-14 11:33:30 +0200
commitd4bed1a6d32e415b5d460bf60217d4950d28165e (patch)
tree1fdb566e224f764b034ec7c629c33780d65b71be /src
parentMerge pull request #4513 (diff)
parentqt: Ignore showNormalIfMinimized in initialization or shutdown (diff)
downloaddiscoin-d4bed1a6d32e415b5d460bf60217d4950d28165e.tar.xz
discoin-d4bed1a6d32e415b5d460bf60217d4950d28165e.zip
Merge pull request #4524
49d5712 qt: Ignore showNormalIfMinimized in initialization or shutdown (Wladimir J. van der Laan)
Diffstat (limited to 'src')
-rw-r--r--src/init.cpp4
-rw-r--r--src/qt/bitcoingui.cpp8
-rw-r--r--src/ui_interface.h2
3 files changed, 5 insertions, 9 deletions
diff --git a/src/init.cpp b/src/init.cpp
index 9daad6ac8..99df237b2 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -179,13 +179,13 @@ void HandleSIGHUP(int)
bool static InitError(const std::string &str)
{
- uiInterface.ThreadSafeMessageBox(str, "", CClientUIInterface::MSG_ERROR | CClientUIInterface::NOSHOWGUI);
+ uiInterface.ThreadSafeMessageBox(str, "", CClientUIInterface::MSG_ERROR);
return false;
}
bool static InitWarning(const std::string &str)
{
- uiInterface.ThreadSafeMessageBox(str, "", CClientUIInterface::MSG_WARNING | CClientUIInterface::NOSHOWGUI);
+ uiInterface.ThreadSafeMessageBox(str, "", CClientUIInterface::MSG_WARNING);
return true;
}
diff --git a/src/qt/bitcoingui.cpp b/src/qt/bitcoingui.cpp
index 4fabc2a5d..5fc2f500b 100644
--- a/src/qt/bitcoingui.cpp
+++ b/src/qt/bitcoingui.cpp
@@ -783,11 +783,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)
@@ -924,6 +920,8 @@ void BitcoinGUI::setEncryptionStatus(int status)
void BitcoinGUI::showNormalIfMinimized(bool fToggleHidden)
{
+ if(!clientModel)
+ return;
// activateWindow() (sometimes) helps with keyboard focus on Windows
if (isHidden())
{
diff --git a/src/ui_interface.h b/src/ui_interface.h
index e9fcd91d4..a48ba237d 100644
--- a/src/ui_interface.h
+++ b/src/ui_interface.h
@@ -63,8 +63,6 @@ public:
/** Force blocking, modal message box dialog (not just OS notification) */
MODAL = 0x10000000U,
- /** Don't bring GUI to foreground. Use for messages during initialization */
- NOSHOWGUI = 0x20000000U,
/** Predefined combinations for certain default usage cases */
MSG_INFORMATION = ICON_INFORMATION,