15 static bool noui_ThreadSafeMessageBox(
const std::string& message,
const std::string& caption,
unsigned int style)
17 std::string strCaption;
21 strCaption +=
_(
"Error");
24 strCaption +=
_(
"Warning");
27 strCaption +=
_(
"Information");
30 strCaption += caption;
33 LogPrintf(
"%s: %s\n", strCaption, message);
34 fprintf(stderr,
"%s: %s\n", strCaption.c_str(), message.c_str());
39 static bool noui_ThreadSafeShowGeneratedI2PAddress(
const std::string& caption,
const std::string& pub,
const std::string& priv,
const std::string& b32,
const std::string& configFileName)
41 std::string msg =
_(
"\nIf you want to use a permanent I2P-address you have to set options in the configuration file:\nYour Config file is: ");
42 msg += configFileName;
44 msg +=
_(
"\nThis is your Address + private key (save this text in the configuration file and keep it secret):\n");
47 msg +=
_(
"\n\nThis is your Address (you can make it public):\n");
50 msg +=
_(
"\n\nYour Short base32-address:\n");
54 printf(
"%s: %s\n", caption.c_str(), msg.c_str());
55 LogPrintf(
"%s: %s\n", caption.c_str(), msg.c_str());
58 #endif // ENABLE_I2PSAM
60 static void noui_InitMessage(
const std::string &message)
71 uiInterface.ThreadSafeShowGeneratedI2PAddress.connect(noui_ThreadSafeShowGeneratedI2PAddress);
CClientUIInterface uiInterface
std::string _(const char *psz)
Translation function: Call Translate signal on UI interface, which returns a boost::optional result...
boost::signals2::signal< bool(const std::string &message, const std::string &caption, unsigned int style), boost::signals2::last_value< bool > > ThreadSafeMessageBox
Show message box.
boost::signals2::signal< void(const std::string &message)> InitMessage
Progress message during initialization.
Predefined combinations for certain default usage cases.