Skip to content

Commit

Permalink
add Skin.ToggleDebug function
Browse files Browse the repository at this point in the history
  • Loading branch information
ronie committed May 9, 2015
1 parent e7446ab commit 74bd761
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
5 changes: 5 additions & 0 deletions xbmc/addons/Skin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -485,4 +485,9 @@ void CSkinInfo::SettingOptionsStartupWindowsFiller(const CSetting *setting, std:
current = list[0].second;
}

void CSkinInfo::ToggleDebug()
{
m_debugging = !m_debugging;
}

} /*namespace ADDON*/
1 change: 1 addition & 0 deletions xbmc/addons/Skin.h
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ class CSkinInfo : public CAddon
const std::string& GetCurrentAspect() const { return m_currentAspect; }

void LoadIncludes();
void ToggleDebug();
const INFO::CSkinVariableString* CreateSkinVariable(const std::string& name, int context);

static void SettingOptionsSkinColorsFiller(const CSetting *setting, std::vector< std::pair<std::string, std::string> > &list, std::string &current, void *data);
Expand Down
6 changes: 6 additions & 0 deletions xbmc/interfaces/Builtins.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
#include "addons/AddonInstaller.h"
#include "addons/AddonManager.h"
#include "addons/PluginSource.h"
#include "addons/Skin.h"
#include "interfaces/generic/ScriptInvocationManager.h"
#include "interfaces/AnnouncementManager.h"
#include "network/NetworkServices.h"
Expand Down Expand Up @@ -169,6 +170,7 @@ const BUILT_IN commands[] = {
{ "PlayDVD", false, "Plays the inserted CD or DVD media from the DVD-ROM Drive!" },
{ "RipCD", false, "Rip the currently inserted audio CD"},
{ "Skin.ToggleSetting", true, "Toggles a skin setting on or off" },
{ "Skin.ToggleDebug", false, "Toggles skin debug info on or off" },
{ "Skin.SetString", true, "Prompts and sets skin string" },
{ "Skin.SetNumeric", true, "Prompts and sets numeric input" },
{ "Skin.SetPath", true, "Prompts and sets a skin path" },
Expand Down Expand Up @@ -1465,6 +1467,10 @@ int CBuiltins::Execute(const std::string& execString)
CSettings::Get().Save();
}
}
else if (execute == "skin.toggledebug")
{
g_SkinInfo->ToggleDebug();
}
else if (execute == "dialog.close" && params.size())
{
bool bForce = false;
Expand Down

1 comment on commit 74bd761

@Hitcher
Copy link

@Hitcher Hitcher commented on 74bd761 May 9, 2015

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 and thanks.

Please sign in to comment.