Changeset View
Changeset View
Standalone View
Standalone View
src/noui.cpp
Show All 29 Lines | switch (style) { | ||||
case CClientUIInterface::MSG_INFORMATION: | case CClientUIInterface::MSG_INFORMATION: | ||||
strCaption += _("Information"); | strCaption += _("Information"); | ||||
break; | break; | ||||
default: | default: | ||||
// Use supplied caption (can be empty) | // Use supplied caption (can be empty) | ||||
strCaption += caption; | strCaption += caption; | ||||
} | } | ||||
if (!fSecure) LogPrintf("%s: %s\n", strCaption, message); | if (!fSecure) LogPrint(BCLog::NOUI, "%s: %s\n", strCaption, message); | ||||
fprintf(stderr, "%s: %s\n", strCaption.c_str(), message.c_str()); | fprintf(stderr, "%s: %s\n", strCaption.c_str(), message.c_str()); | ||||
return false; | return false; | ||||
} | } | ||||
static bool | static bool | ||||
noui_ThreadSafeQuestion(const std::string & /* ignored interactive message */, | noui_ThreadSafeQuestion(const std::string & /* ignored interactive message */, | ||||
const std::string &message, const std::string &caption, | const std::string &message, const std::string &caption, | ||||
unsigned int style) { | unsigned int style) { | ||||
return noui_ThreadSafeMessageBox(message, caption, style); | return noui_ThreadSafeMessageBox(message, caption, style); | ||||
} | } | ||||
static void noui_InitMessage(const std::string &message) { | static void noui_InitMessage(const std::string &message) { | ||||
LogPrintf("init message: %s\n", message); | LogPrint(BCLog::NOUI, "init message: %s\n", message); | ||||
} | } | ||||
void noui_connect() { | void noui_connect() { | ||||
// Connect bitcoind signal handlers | // Connect bitcoind signal handlers | ||||
uiInterface.ThreadSafeMessageBox.connect(noui_ThreadSafeMessageBox); | uiInterface.ThreadSafeMessageBox.connect(noui_ThreadSafeMessageBox); | ||||
uiInterface.ThreadSafeQuestion.connect(noui_ThreadSafeQuestion); | uiInterface.ThreadSafeQuestion.connect(noui_ThreadSafeQuestion); | ||||
uiInterface.InitMessage.connect(noui_InitMessage); | uiInterface.InitMessage.connect(noui_InitMessage); | ||||
} | } |