From 970439b145539a9f25925d0c73de6adf02c6e81e Mon Sep 17 00:00:00 2001 From: fsb4000 Date: Sat, 14 Feb 2015 10:26:47 +0600 Subject: [PATCH] =?utf8?q?=D0=B2=D0=B5=D1=80=D0=BD=D1=83=D0=BB=20BitcoinGUI::error?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- src/qt/bitcoingui.cpp | 11 +++++++++++ src/qt/bitcoingui.h | 1 + 2 files changed, 12 insertions(+), 0 deletions(-) diff --git a/src/qt/bitcoingui.cpp b/src/qt/bitcoingui.cpp index c25f833..a191a8d 100644 --- a/src/qt/bitcoingui.cpp +++ b/src/qt/bitcoingui.cpp @@ -1218,3 +1218,14 @@ void BitcoinGUI::toggleHidden() { showNormalIfMinimized(true); } + +void BitcoinGUI::error(const QString &title, const QString &message, bool modal) +{ + // Report errors from network/worker thread + if(modal) + { + QMessageBox::critical(this, title, message, QMessageBox::Ok, QMessageBox::Ok); + } else { + notificator->notify(Notificator::Critical, title, message); + } +} diff --git a/src/qt/bitcoingui.h b/src/qt/bitcoingui.h index de83a58..d27151a 100644 --- a/src/qt/bitcoingui.h +++ b/src/qt/bitcoingui.h @@ -138,6 +138,7 @@ public slots: void setEncryptionStatus(int status); /** Notify the user of an error in the network or transaction handling code. */ + void error(const QString &title, const QString &message, bool modal); void message(const QString &title, const QString &message, unsigned int style, const QString &detail=QString()); /** Asks the user whether to pay the transaction fee or to cancel the transaction. -- 1.7.1