X-Git-Url: https://git.novaco.in/?a=blobdiff_plain;f=src%2Fqt%2Fbitcoin.cpp;h=311fab3c9b98c07737582990bad7af52b42be8da;hb=91d7e847e051c9aa8be87a72d2763872b6b4f385;hp=6afa9671d0bf80a06d1f0002192bb14b4cacf62d;hpb=8c69b6621c6d0a03ddcb9e3c16ebed3af81497e9;p=novacoin.git diff --git a/src/qt/bitcoin.cpp b/src/qt/bitcoin.cpp index 6afa967..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 { @@ -91,6 +98,8 @@ void UIThreadCall(boost::function0 fn) void MainFrameRepaint() { + if(guiref) + QMetaObject::invokeMethod(guiref, "refreshStatusBar", Qt::QueuedConnection); } void InitMessage(const std::string &message) @@ -145,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(); @@ -161,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);