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:
MarcoFalke
2026-01-13 18:43:01 +01:00
parent fa8d0088e7
commit fafe71b743
9 changed files with 19 additions and 19 deletions

View File

@@ -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;
}