Fix keymap.
[vuplus_xbmc] / xbmc / LangInfo.cpp
index f283c28..3f2e04f 100644 (file)
@@ -20,6 +20,7 @@
 
 #include "LangInfo.h"
 #include "Application.h"
+#include "ApplicationMessenger.h"
 #include "FileItem.h"
 #include "Util.h"
 #include "filesystem/Directory.h"
@@ -27,7 +28,7 @@
 #include "guilib/LocalizeStrings.h"
 #include "pvr/PVRManager.h"
 #include "settings/AdvancedSettings.h"
-#include "settings/Setting.h"
+#include "settings/lib/Setting.h"
 #include "settings/Settings.h"
 #include "utils/CharsetConverter.h"
 #include "utils/log.h"
@@ -319,7 +320,7 @@ bool CLangInfo::Load(const std::string& strFileName, bool onlyCheckLanguage /*=
     {
       CRegion region(m_defaultRegion);
       region.m_strName=pRegion->Attribute("name");
-      if (region.m_strName.IsEmpty())
+      if (region.m_strName.empty())
         region.m_strName="N/A";
 
       if (pRegion->Attribute("locale"))
@@ -399,7 +400,7 @@ void CLangInfo::LoadTokens(const TiXmlNode* pTokens, vector<CStdString>& vecToke
         strSep = pToken->Attribute("separators");
       if (pToken->FirstChild() && pToken->FirstChild()->Value())
       {
-        if (strSep.IsEmpty())
+        if (strSep.empty())
           vecTokens.push_back(pToken->FirstChild()->Value());
         else
           for (unsigned int i=0;i<strSep.size();++i)
@@ -462,7 +463,7 @@ bool CLangInfo::SetLanguage(const std::string &strLanguage)
   // also tell our weather and skin to reload as these are localized
   g_weatherManager.Refresh();
   g_PVRManager.LocalizationChanged();
-  g_application.ReloadSkin();
+  CApplicationMessenger::Get().ExecBuiltIn("ReloadSkin", false);
 
   return true;
 }
@@ -483,7 +484,10 @@ const CStdString& CLangInfo::GetAudioLanguage() const
 
 void CLangInfo::SetAudioLanguage(const std::string& language)
 {
-  if (language.empty() || StringUtils::EqualsNoCase(language, "default") || !g_LangCodeExpander.ConvertToThreeCharCode(m_audioLanguage, language))
+  if (language.empty()
+    || StringUtils::EqualsNoCase(language, "default")
+    || StringUtils::EqualsNoCase(language, "original")
+    || !g_LangCodeExpander.ConvertToThreeCharCode(m_audioLanguage, language))
     m_audioLanguage.clear();
 }
 
@@ -498,7 +502,10 @@ const CStdString& CLangInfo::GetSubtitleLanguage() const
 
 void CLangInfo::SetSubtitleLanguage(const std::string& language)
 {
-  if (language.empty() || StringUtils::EqualsNoCase(language, "default") || !g_LangCodeExpander.ConvertToThreeCharCode(m_subtitleLanguage, language))
+  if (language.empty()
+    || StringUtils::EqualsNoCase(language, "default")
+    || StringUtils::EqualsNoCase(language, "original")
+    || !g_LangCodeExpander.ConvertToThreeCharCode(m_subtitleLanguage, language))
     m_subtitleLanguage.clear();
 }