Changeset View
Changeset View
Standalone View
Standalone View
src/noui.cpp
Show All 24 Lines | bool noui_ThreadSafeMessageBox(const std::string &message, | ||||
const std::string &caption, unsigned int style) { | const std::string &caption, unsigned int style) { | ||||
bool fSecure = style & CClientUIInterface::SECURE; | bool fSecure = style & CClientUIInterface::SECURE; | ||||
style &= ~CClientUIInterface::SECURE; | style &= ~CClientUIInterface::SECURE; | ||||
std::string strCaption; | std::string strCaption; | ||||
// Check for usage of predefined caption | // Check for usage of predefined caption | ||||
switch (style) { | switch (style) { | ||||
case CClientUIInterface::MSG_ERROR: | case CClientUIInterface::MSG_ERROR: | ||||
strCaption += _("Error"); | strCaption += _("Error").translated; | ||||
break; | break; | ||||
case CClientUIInterface::MSG_WARNING: | case CClientUIInterface::MSG_WARNING: | ||||
strCaption += _("Warning"); | strCaption += _("Warning").translated; | ||||
break; | break; | ||||
case CClientUIInterface::MSG_INFORMATION: | case CClientUIInterface::MSG_INFORMATION: | ||||
strCaption += _("Information"); | strCaption += _("Information").translated; | ||||
break; | break; | ||||
default: | default: | ||||
// Use supplied caption (can be empty) | // Use supplied caption (can be empty) | ||||
strCaption += caption; | strCaption += caption; | ||||
} | } | ||||
if (!fSecure) { | if (!fSecure) { | ||||
LogPrintf("%s: %s\n", strCaption, message); | LogPrintf("%s: %s\n", strCaption, message); | ||||
▲ Show 20 Lines • Show All 61 Lines • Show Last 20 Lines |