From 91a0681ab8b2752b5ebd7cfebdd1456708d6ed69 Mon Sep 17 00:00:00 2001 From: louis Date: Fri, 3 Oct 2014 15:54:23 +0200 Subject: changed skin handling and added themes support for skins --- libtemplate/xmlparser.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'libtemplate/xmlparser.c') diff --git a/libtemplate/xmlparser.c b/libtemplate/xmlparser.c index 228488b..8c21ed9 100644 --- a/libtemplate/xmlparser.c +++ b/libtemplate/xmlparser.c @@ -177,11 +177,14 @@ void cXmlParser::DeleteDocument(void) { string cXmlParser::GetPath(string xmlFile) { string activeSkin = Setup.OSDSkin; - string theme = "default"; - if (!activeSkin.compare("skindesigner")) { - theme = Setup.OSDTheme; + string activeTheme = Setup.OSDTheme; + string path = ""; + if (!xmlFile.compare("globals.xml")) { + path = *cString::sprintf("%s%s/themes/%s/%s", *config.skinPath, activeSkin.c_str(), activeTheme.c_str(), xmlFile.c_str()); + } else { + path = *cString::sprintf("%s%s/xmlfiles/%s", *config.skinPath, activeSkin.c_str(), xmlFile.c_str()); } - return *cString::sprintf("%s%s/xmlfiles/%s", *config.skinPath, theme.c_str(), xmlFile.c_str()); + return path; } void cXmlParser::ParseGlobalColors(xmlNodePtr node) { -- cgit v1.2.3