Permalink
Browse files

add a settings entry for skin settings in Appearance, enabled if Skin…

…Settings.xml is available in the skin. Skinners should move their skin settings into this file, and remove links to skin settings elsewhere if they are no longer required.
  • Loading branch information...
1 parent 9f77981 commit 763a0b754087a6dcceaa10d60c71fff434f75afa Jonathan Marshall committed Oct 15, 2012
@@ -1229,6 +1229,7 @@ bool CApplication::Initialize()
g_windowManager.Add(new CGUIWindowVideoPlaylist); // window id = 28
g_windowManager.Add(new CGUIWindowLoginScreen); // window id = 29
g_windowManager.Add(new CGUIWindowSettingsProfile); // window id = 34
+ g_windowManager.Add(new CGUIWindow(WINDOW_SKIN_SETTINGS, "SkinSettings.xml")); // window id = 35
g_windowManager.Add(new CGUIWindowAddonBrowser); // window id = 40
g_windowManager.Add(new CGUIWindowScreensaverDim); // window id = 97
g_windowManager.Add(new CGUIWindowDebugInfo); // window id = 98
View
@@ -343,6 +343,7 @@
#define WINDOW_LOGIN_SCREEN 10029
#define WINDOW_SETTINGS_PROFILES 10034
+#define WINDOW_SKIN_SETTINGS 10035
#define WINDOW_ADDON_BROWSER 10040
@@ -271,6 +271,7 @@ static const ActionMapping windows[] =
{"videoplaylist" , WINDOW_VIDEO_PLAYLIST},
{"loginscreen" , WINDOW_LOGIN_SCREEN},
{"profiles" , WINDOW_SETTINGS_PROFILES},
+ {"skinsettings" , WINDOW_SKIN_SETTINGS},
{"addonbrowser" , WINDOW_ADDON_BROWSER},
{"yesnodialog" , WINDOW_DIALOG_YES_NO},
{"progressdialog" , WINDOW_DIALOG_PROGRESS},
@@ -872,6 +872,7 @@ void CGUISettings::Initialize()
AddGroup(SETTINGS_APPEARANCE, 480);
CSettingsCategory* laf = AddCategory(SETTINGS_APPEARANCE,"lookandfeel", 166);
AddDefaultAddon(laf, "lookandfeel.skin",166,DEFAULT_SKIN, ADDON_SKIN);
+ AddString(laf, "lookandfeel.skinsettings", 21417, "", BUTTON_CONTROL_STANDARD);
AddString(laf, "lookandfeel.skintheme",15111,"SKINDEFAULT", SPIN_CONTROL_TEXT);
AddString(laf, "lookandfeel.skincolors",14078, "SKINDEFAULT", SPIN_CONTROL_TEXT);
AddString(laf, "lookandfeel.font",13303,"Default", SPIN_CONTROL_TEXT);
@@ -974,6 +974,11 @@ void CGUIWindowSettingsCategory::UpdateSettings()
CGUIControl *pControl = (CGUIControl *)GetControl(pSettingControl->GetID());
pControl->SetEnabled(g_guiSettings.GetBool("lookandfeel.enablerssfeeds"));
}
+ else if (strSetting.Equals("lookandfeel.skinsettings"))
+ {
+ CGUIControl *pControl = (CGUIControl *)GetControl(pSettingControl->GetID());
+ pControl->SetEnabled(g_SkinInfo->HasSkinFile("SkinSettings.xml"));
+ }
else if (strSetting.Equals("videoplayer.pauseafterrefreshchange"))
{
CGUIControl *pControl = (CGUIControl *)GetControl(pSettingControl->GetID());
@@ -1438,6 +1443,10 @@ void CGUIWindowSettingsCategory::OnSettingChanged(CBaseSettingControl *pSettingC
g_audioManager.Enable(true);
g_audioManager.Load();
}
+ else if (strSetting.Equals("lookandfeel.skinsettings"))
+ {
+ g_windowManager.ActivateWindow(WINDOW_SKIN_SETTINGS);
+ }
else if (strSetting.Equals("input.enablemouse"))
{
g_Mouse.SetEnabled(g_guiSettings.GetBool("input.enablemouse"));

0 comments on commit 763a0b7

Please sign in to comment.