mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-04-29 08:19:21 +02:00
refactor: Remove empty caption from ThreadSafeMessageBox
The caption was empty for all call-sites, so this refactor does not change any behavior. Note that noui_ThreadSafeMessageBoxRedirect is test-only, so no end-user behavior is changed here.
This commit is contained in:
10
src/noui.cpp
10
src/noui.cpp
@@ -19,7 +19,7 @@ boost::signals2::connection noui_ThreadSafeMessageBoxConn;
|
||||
boost::signals2::connection noui_ThreadSafeQuestionConn;
|
||||
boost::signals2::connection noui_InitMessageConn;
|
||||
|
||||
bool noui_ThreadSafeMessageBox(const bilingual_str& message, const std::string& caption, unsigned int style)
|
||||
bool noui_ThreadSafeMessageBox(const bilingual_str& message, unsigned int style)
|
||||
{
|
||||
bool fSecure = style & CClientUIInterface::SECURE;
|
||||
style &= ~CClientUIInterface::SECURE;
|
||||
@@ -39,7 +39,7 @@ bool noui_ThreadSafeMessageBox(const bilingual_str& message, const std::string&
|
||||
if (!fSecure) LogInfo("%s\n", message.original);
|
||||
break;
|
||||
default:
|
||||
strCaption = caption + ": "; // Use supplied caption (can be empty)
|
||||
strCaption = ": "; // caption is always empty TODO fix this
|
||||
if (!fSecure) LogInfo("%s%s\n", strCaption, message.original);
|
||||
}
|
||||
|
||||
@@ -49,7 +49,7 @@ bool noui_ThreadSafeMessageBox(const bilingual_str& message, const std::string&
|
||||
|
||||
bool noui_ThreadSafeQuestion(const bilingual_str& /* ignored interactive message */, const std::string& message, unsigned int style)
|
||||
{
|
||||
return noui_ThreadSafeMessageBox(Untranslated(message), /*caption=*/"", style);
|
||||
return noui_ThreadSafeMessageBox(Untranslated(message), style);
|
||||
}
|
||||
|
||||
void noui_InitMessage(const std::string& message)
|
||||
@@ -64,9 +64,9 @@ void noui_connect()
|
||||
noui_InitMessageConn = uiInterface.InitMessage_connect(noui_InitMessage);
|
||||
}
|
||||
|
||||
bool noui_ThreadSafeMessageBoxRedirect(const bilingual_str& message, const std::string& caption, unsigned int style)
|
||||
bool noui_ThreadSafeMessageBoxRedirect(const bilingual_str& message, unsigned int style)
|
||||
{
|
||||
LogInfo("%s: %s", caption, message.original);
|
||||
LogInfo("%s", message.original);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user