diff options
| author | Wladimir J. van der Laan <[email protected]> | 2013-04-13 05:40:30 -0700 |
|---|---|---|
| committer | Wladimir J. van der Laan <[email protected]> | 2013-04-13 05:40:30 -0700 |
| commit | ac89a1ebe7110051bd35fbbcdb706030f07d561e (patch) | |
| tree | 2d4dd67e394d718c0367a73964236a6dfdd3d361 /src | |
| parent | Merge pull request #2515 from laanwj/2013_04_move_exportbutton (diff) | |
| parent | Bitcoin-Qt: remove " - " on empty title in BitcoinGUI::message() (diff) | |
| download | discoin-ac89a1ebe7110051bd35fbbcdb706030f07d561e.tar.xz discoin-ac89a1ebe7110051bd35fbbcdb706030f07d561e.zip | |
Merge pull request #2492 from Diapolo/Qt_message
Bitcoin-Qt: remove " - " on empty title in BitcoinGUI::message()
Diffstat (limited to 'src')
| -rw-r--r-- | src/qt/bitcoingui.cpp | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/src/qt/bitcoingui.cpp b/src/qt/bitcoingui.cpp index ada55c45e..14d738d9d 100644 --- a/src/qt/bitcoingui.cpp +++ b/src/qt/bitcoingui.cpp @@ -603,25 +603,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) { |