mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-29 13:46:49 +00:00
xbmc: add patch to allow plugins to set GUI language
This commit is contained in:
parent
eb7bc73a61
commit
cf371e26c8
@ -0,0 +1,32 @@
|
||||
commit d1fcd3007827ddd2ab20864677a5baf64e4782a4
|
||||
Author: Stefan Saraev <stefan@saraev.ca>
|
||||
Date: Mon Jan 21 17:11:21 2013 +0200
|
||||
|
||||
add builtin to set GUI Language
|
||||
|
||||
diff --git a/xbmc/interfaces/Builtins.cpp b/xbmc/interfaces/Builtins.cpp
|
||||
index fae2524..3f5ceab 100644
|
||||
--- a/xbmc/interfaces/Builtins.cpp
|
||||
+++ b/xbmc/interfaces/Builtins.cpp
|
||||
@@ -120,6 +120,7 @@ const BUILT_IN commands[] = {
|
||||
{ "Minimize", false, "Minimize XBMC" },
|
||||
{ "Reset", false, "Reset the system (same as reboot)" },
|
||||
{ "Mastermode", false, "Control master mode" },
|
||||
+ { "SetGUILanguage", true, "Set GUI Language" },
|
||||
{ "ActivateWindow", true, "Activate the specified window" },
|
||||
{ "ActivateWindowAndFocus", true, "Activate the specified window and sets focus to the specified id" },
|
||||
{ "ReplaceWindow", true, "Replaces the current window with the new one" },
|
||||
@@ -321,6 +322,13 @@ int CBuiltins::Execute(const CStdString& execString)
|
||||
CGUIMessage msg(GUI_MSG_NOTIFY_ALL, 0, 0, GUI_MSG_UPDATE);
|
||||
g_windowManager.SendMessage(msg);
|
||||
}
|
||||
+ else if (execute.Equals("setguilanguage"))
|
||||
+ {
|
||||
+ if (params.size())
|
||||
+ {
|
||||
+ CApplicationMessenger::Get().SetGUILanguage(params[0]);
|
||||
+ }
|
||||
+ }
|
||||
else if (execute.Equals("takescreenshot"))
|
||||
{
|
||||
CScreenShot::TakeScreenshot();
|
Loading…
x
Reference in New Issue
Block a user