X-Git-Url: https://git.novaco.in/?a=blobdiff_plain;f=src%2Fqt%2Fbitcoin.cpp;h=311fab3c9b98c07737582990bad7af52b42be8da;hb=91d7e847e051c9aa8be87a72d2763872b6b4f385;hp=2142db5a364efb26ee06b2a2d90ad424e4b60bc0;hpb=181b863d224b5236b53309e7cb12b3927b240d70;p=novacoin.git diff --git a/src/qt/bitcoin.cpp b/src/qt/bitcoin.cpp index 2142db5..311fab3 100644 --- a/src/qt/bitcoin.cpp +++ b/src/qt/bitcoin.cpp @@ -41,12 +41,19 @@ int MyMessageBox(const std::string& message, const std::string& caption, int sty int ThreadSafeMessageBox(const std::string& message, const std::string& caption, int style, wxWindow* parent, int x, int y) { + bool modal = style & wxMODAL; + + if (modal) + while (!guiref) + sleep(1); + // Message from network thread if(guiref) { QMetaObject::invokeMethod(guiref, "error", Qt::QueuedConnection, Q_ARG(QString, QString::fromStdString(caption)), - Q_ARG(QString, QString::fromStdString(message))); + Q_ARG(QString, QString::fromStdString(message)), + Q_ARG(bool, modal)); } else { @@ -147,9 +154,12 @@ int main(int argc, char *argv[]) app.setApplicationName(QApplication::translate("main", "Bitcoin-Qt")); QSplashScreen splash(QPixmap(":/images/splash"), 0); - splash.show(); - splash.setAutoFillBackground(true); - splashref = &splash; + if (!GetBoolArg("-min")) + { + splash.show(); + splash.setAutoFillBackground(true); + splashref = &splash; + } app.processEvents(); @@ -163,7 +173,8 @@ int main(int argc, char *argv[]) // Put this in a block, so that BitcoinGUI is cleaned up properly before // calling Shutdown(). BitcoinGUI window; - splash.finish(&window); + if (splashref) + splash.finish(&window); OptionsModel optionsModel(pwalletMain); ClientModel clientModel(&optionsModel); WalletModel walletModel(pwalletMain, &optionsModel);