aboutsummaryrefslogtreecommitdiff
path: root/src/qt/bitcoingui.cpp
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2012-03-25 20:47:33 +0200
committerWladimir J. van der Laan <laanwj@gmail.com>2012-04-04 09:37:25 +0200
commit7cfbe1fee465e82ddbdc8ed17dfcce791bd765f5 (patch)
tree0888d0c52e49ffa0f683bbd927d738971f4a5dbc /src/qt/bitcoingui.cpp
parent1a3f0da9229a8e524d1010cdc8bd3b9da71fe529 (diff)
downloadbitcoin-7cfbe1fee465e82ddbdc8ed17dfcce791bd765f5.tar.xz
qtui.h/noui.h interface cleanup
- rename wxMessageBox, remove redundant arguments to noui/qtui calls - also, add flag to force blocking, modal dialog box for disk space warning etc - clarify function naming - no more special MessageBox needed from AppInit2, as window object is created before calling AppInit2
Diffstat (limited to 'src/qt/bitcoingui.cpp')
-rw-r--r--src/qt/bitcoingui.cpp13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/qt/bitcoingui.cpp b/src/qt/bitcoingui.cpp
index f2d1318517..c65a26debb 100644
--- a/src/qt/bitcoingui.cpp
+++ b/src/qt/bitcoingui.cpp
@@ -336,7 +336,7 @@ void BitcoinGUI::setClientModel(ClientModel *clientModel)
connect(clientModel, SIGNAL(numBlocksChanged(int)), this, SLOT(setNumBlocks(int)));
// Report errors from network/worker thread
- connect(clientModel, SIGNAL(error(QString,QString)), this, SLOT(error(QString,QString)));
+ connect(clientModel, SIGNAL(error(QString,QString, bool)), this, SLOT(error(QString,QString,bool)));
}
}
@@ -346,7 +346,7 @@ void BitcoinGUI::setWalletModel(WalletModel *walletModel)
if(walletModel)
{
// Report errors from wallet thread
- connect(walletModel, SIGNAL(error(QString,QString)), this, SLOT(error(QString,QString)));
+ connect(walletModel, SIGNAL(error(QString,QString,bool)), this, SLOT(error(QString,QString,bool)));
// Put transaction list in tabs
transactionView->setModel(walletModel);
@@ -538,10 +538,15 @@ void BitcoinGUI::setNumBlocks(int count)
progressBar->setToolTip(tooltip);
}
-void BitcoinGUI::error(const QString &title, const QString &message)
+void BitcoinGUI::error(const QString &title, const QString &message, bool modal)
{
// Report errors from network/worker thread
- notificator->notify(Notificator::Critical, title, message);
+ if(modal)
+ {
+ QMessageBox::critical(this, title, message, QMessageBox::Ok, QMessageBox::Ok);
+ } else {
+ notificator->notify(Notificator::Critical, title, message);
+ }
}
void BitcoinGUI::changeEvent(QEvent *e)