added: UnloadSkin builtin function, and allow ApplicationMessenger::ExecBuiltIn to...
authorjmarshallnz <jmarshallnz@svn>
Mon, 13 Dec 2010 19:44:51 +0000 (19:44 +0000)
committerjmarshallnz <jmarshallnz@svn>
Mon, 13 Dec 2010 19:44:51 +0000 (19:44 +0000)
(cherry picked from commit a249081ab2e3d4b2b5348607df6a3513522bc40f)

git-svn-id: https://xbmc.svn.sourceforge.net/svnroot/xbmc/branches/Dharma@35632 568bbfeb-2a22-0410-94d2-cc84cf5bfa90

xbmc/ApplicationMessenger.cpp
xbmc/ApplicationMessenger.h
xbmc/utils/Builtins.cpp

index e2fe740..0a8a4fb 100644 (file)
@@ -713,11 +713,11 @@ void CApplicationMessenger::HttpApi(string cmd, bool wait)
   SendMessage(tMsg, wait);
 }
 
-void CApplicationMessenger::ExecBuiltIn(const CStdString &command)
+void CApplicationMessenger::ExecBuiltIn(const CStdString &command, bool wait)
 {
   ThreadMessage tMsg = {TMSG_EXECUTE_BUILT_IN};
   tMsg.strParam = command;
-  SendMessage(tMsg);
+  SendMessage(tMsg, wait);
 }
 
 void CApplicationMessenger::MediaPlay(string filename)
index cd0ea75..ac1c7f0 100644 (file)
@@ -147,7 +147,7 @@ public:
   CStdString GetResponse();
   int SetResponse(CStdString response);
   void HttpApi(std::string cmd, bool wait = false);
-  void ExecBuiltIn(const CStdString &command);
+  void ExecBuiltIn(const CStdString &command, bool wait = false);
 
   void NetworkMessage(DWORD dwMessage, DWORD dwParam = 0);
 
index e2fbbc5..08c7893 100644 (file)
@@ -124,6 +124,7 @@ const BUILT_IN commands[] = {
   { "SlideShow",                  true,   "Run a slideshow from the specified directory" },
   { "RecursiveSlideShow",         true,   "Run a slideshow from the specified directory, including all subdirs" },
   { "ReloadSkin",                 false,  "Reload XBMC's skin" },
+  { "UnloadSkin",                 false,  "Unload XBMC's skin" },
   { "RefreshRSS",                 false,  "Reload RSS feeds from RSSFeeds.xml"},
   { "PlayerControl",              true,   "Control the music or video player" },
   { "Playlist.PlayOffset",        true,   "Start playing from a particular offset in the playlist" },
@@ -521,6 +522,10 @@ int CBuiltins::Execute(const CStdString& execString)
     //  Reload the skin
     g_application.ReloadSkin();
   }
+  else if (execute.Equals("unloadskin"))
+  {
+    g_application.UnloadSkin();
+  }
   else if (execute.Equals("refreshrss"))
   {
     g_rssManager.Stop();