aboutsummaryrefslogtreecommitdiff
path: root/src/qt
diff options
context:
space:
mode:
authorPhilip Kaufmann <phil.kaufmann@t-online.de>2013-04-09 09:54:19 +0200
committerPhilip Kaufmann <phil.kaufmann@t-online.de>2013-04-11 08:32:55 +0200
commit8d643c90a6e0f1b69f23738701cb7a090870669c (patch)
tree357899663f77b336fabb4d0611de4199cfc6019a /src/qt
parent9a4eaf3cff9d37118939e38e7ce029a71e062ee9 (diff)
downloadbitcoin-8d643c90a6e0f1b69f23738701cb7a090870669c.tar.xz
Bitcoin-Qt: remove " - " on empty title in BitcoinGUI::message()
- don't display "Bitcoin - " when no title was supplied but just "Bitcoin"
Diffstat (limited to 'src/qt')
-rw-r--r--src/qt/bitcoingui.cpp15
1 files changed, 9 insertions, 6 deletions
diff --git a/src/qt/bitcoingui.cpp b/src/qt/bitcoingui.cpp
index 27272e69e1..877cdb1540 100644
--- a/src/qt/bitcoingui.cpp
+++ b/src/qt/bitcoingui.cpp
@@ -611,25 +611,28 @@ void BitcoinGUI::setNumBlocks(int count, int nTotalBlocks)
void BitcoinGUI::message(const QString &title, const QString &message, unsigned int style, bool *ret)
{
- QString strTitle = tr("Bitcoin") + " - ";
+ QString strTitle = tr("Bitcoin"); // default title
// Default to information icon
int nMBoxIcon = QMessageBox::Information;
int nNotifyIcon = Notificator::Information;
- // Check for usage of predefined title
+ // Override title based on style
+ QString msgType;
switch (style) {
case CClientUIInterface::MSG_ERROR:
- strTitle += tr("Error");
+ msgType = tr("Error");
break;
case CClientUIInterface::MSG_WARNING:
- strTitle += tr("Warning");
+ msgType = tr("Warning");
break;
case CClientUIInterface::MSG_INFORMATION:
- strTitle += tr("Information");
+ msgType = tr("Information");
break;
default:
- strTitle += title; // Use supplied title
+ msgType = title; // Use supplied title
}
+ if (!msgType.isEmpty())
+ strTitle += " - " + msgType;
// Check for error/warning icon
if (style & CClientUIInterface::ICON_ERROR) {