mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-14 12:43:40 +02:00
Make ThreadSafe{MessageBox|Question} bilingual
This commit is contained in:
parent
23b9fa2e5e
commit
917ca93553
14 changed files with 82 additions and 64 deletions
|
|
@ -4,6 +4,8 @@
|
|||
|
||||
#include <ui_interface.h>
|
||||
|
||||
#include <util/translation.h>
|
||||
|
||||
#include <boost/signals2/last_value.hpp>
|
||||
#include <boost/signals2/signal.hpp>
|
||||
|
||||
|
|
@ -40,8 +42,8 @@ ADD_SIGNALS_IMPL_WRAPPER(NotifyBlockTip);
|
|||
ADD_SIGNALS_IMPL_WRAPPER(NotifyHeaderTip);
|
||||
ADD_SIGNALS_IMPL_WRAPPER(BannedListChanged);
|
||||
|
||||
bool CClientUIInterface::ThreadSafeMessageBox(const std::string& message, const std::string& caption, unsigned int style) { return g_ui_signals.ThreadSafeMessageBox(message, caption, style); }
|
||||
bool CClientUIInterface::ThreadSafeQuestion(const std::string& message, const std::string& non_interactive_message, const std::string& caption, unsigned int style) { return g_ui_signals.ThreadSafeQuestion(message, non_interactive_message, caption, style); }
|
||||
bool CClientUIInterface::ThreadSafeMessageBox(const bilingual_str& message, const std::string& caption, unsigned int style) { return g_ui_signals.ThreadSafeMessageBox(message, caption, style); }
|
||||
bool CClientUIInterface::ThreadSafeQuestion(const bilingual_str& message, const std::string& non_interactive_message, const std::string& caption, unsigned int style) { return g_ui_signals.ThreadSafeQuestion(message, non_interactive_message, caption, style); }
|
||||
void CClientUIInterface::InitMessage(const std::string& message) { return g_ui_signals.InitMessage(message); }
|
||||
void CClientUIInterface::NotifyNumConnectionsChanged(int newNumConnections) { return g_ui_signals.NotifyNumConnectionsChanged(newNumConnections); }
|
||||
void CClientUIInterface::NotifyNetworkActiveChanged(bool networkActive) { return g_ui_signals.NotifyNetworkActiveChanged(networkActive); }
|
||||
|
|
@ -54,11 +56,11 @@ void CClientUIInterface::BannedListChanged() { return g_ui_signals.BannedListCha
|
|||
|
||||
bool InitError(const std::string& str)
|
||||
{
|
||||
uiInterface.ThreadSafeMessageBox(str, "", CClientUIInterface::MSG_ERROR);
|
||||
uiInterface.ThreadSafeMessageBox(Untranslated(str), "", CClientUIInterface::MSG_ERROR);
|
||||
return false;
|
||||
}
|
||||
|
||||
void InitWarning(const std::string& str)
|
||||
{
|
||||
uiInterface.ThreadSafeMessageBox(str, "", CClientUIInterface::MSG_WARNING);
|
||||
uiInterface.ThreadSafeMessageBox(Untranslated(str), "", CClientUIInterface::MSG_WARNING);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue