mirror of
https://github.com/twisterarmy/twister-core.git
synced 2025-01-10 14:58:05 +00:00
Merge pull request #2492 from Diapolo/Qt_message
Bitcoin-Qt: remove " - " on empty title in BitcoinGUI::message()
This commit is contained in:
commit
ac89a1ebe7
@ -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)
|
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
|
// Default to information icon
|
||||||
int nMBoxIcon = QMessageBox::Information;
|
int nMBoxIcon = QMessageBox::Information;
|
||||||
int nNotifyIcon = Notificator::Information;
|
int nNotifyIcon = Notificator::Information;
|
||||||
|
|
||||||
// Check for usage of predefined title
|
// Override title based on style
|
||||||
|
QString msgType;
|
||||||
switch (style) {
|
switch (style) {
|
||||||
case CClientUIInterface::MSG_ERROR:
|
case CClientUIInterface::MSG_ERROR:
|
||||||
strTitle += tr("Error");
|
msgType = tr("Error");
|
||||||
break;
|
break;
|
||||||
case CClientUIInterface::MSG_WARNING:
|
case CClientUIInterface::MSG_WARNING:
|
||||||
strTitle += tr("Warning");
|
msgType = tr("Warning");
|
||||||
break;
|
break;
|
||||||
case CClientUIInterface::MSG_INFORMATION:
|
case CClientUIInterface::MSG_INFORMATION:
|
||||||
strTitle += tr("Information");
|
msgType = tr("Information");
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
strTitle += title; // Use supplied title
|
msgType = title; // Use supplied title
|
||||||
}
|
}
|
||||||
|
if (!msgType.isEmpty())
|
||||||
|
strTitle += " - " + msgType;
|
||||||
|
|
||||||
// Check for error/warning icon
|
// Check for error/warning icon
|
||||||
if (style & CClientUIInterface::ICON_ERROR) {
|
if (style & CClientUIInterface::ICON_ERROR) {
|
||||||
|
Loading…
Reference in New Issue
Block a user