#include "FileItem.h"
#include "guilib/GUIDialog.h"
#include "guilib/Key.h"
+#include "guilib/GUIKeyboardFactory.h"
#include "GUIInfoManager.h"
#include "utils/Splash.h"
#include "cores/IPlayer.h"
SendMessage(tMsg, true);
}
-void CApplicationMessenger::ExecOS(const CStdString command, bool waitExit)
+void CApplicationMessenger::ExecOS(const CStdString &command, bool waitExit)
{
ThreadMessage tMsg = {TMSG_EXECUTE_OS};
tMsg.strParam = command;
SendMessage(tMsg, waitResult);
}
+void CApplicationMessenger::SendText(const std::string &aTextString, bool closeKeyboard /* = false */)
+{
+ if (CGUIKeyboardFactory::SendTextToActiveKeyboard(aTextString, closeKeyboard))
+ return;
+
+ CGUIWindow *window = g_windowManager.GetWindow(g_windowManager.GetFocusedWindow());
+ if (!window)
+ return;
+
+ CGUIMessage msg(GUI_MSG_SET_TEXT, 0, 0);
+ msg.SetLabel(aTextString);
+ msg.SetParam1(closeKeyboard ? 1 : 0);
+ SendGUIMessage(msg, window->GetID());
+}
+
vector<CStdString> CApplicationMessenger::GetInfoLabels(const vector<CStdString> &properties)
{
vector<CStdString> infoLabels;