diff --git a/HISTORY b/HISTORY index aae3d5c..adaa102 100644 --- a/HISTORY +++ b/HISTORY @@ -175,3 +175,6 @@ Version 0.1.6 - fixed bug that onpause view potentially starts during setting cutting marks +- made all globals variables private +- introduced globals.xml in skinpath, theme.xml in theme path. theme.xml + adds its vakues and potentially overrides valués from globals.xml \ No newline at end of file diff --git a/designer.c b/designer.c index 10a9ce7..676050f 100644 --- a/designer.c +++ b/designer.c @@ -146,17 +146,9 @@ bool cSkinDesigner::SetCustomToken(string option) { return true; if (isNumber(val)) { - map::iterator hit = globals->customIntTokens.find(key); - if (hit != globals->customIntTokens.end()) { - globals->customIntTokens.erase(key); - } - globals->customIntTokens.insert(pair(key, atoi(val.c_str()))); + globals->AddCustomInt(key, atoi(val.c_str())); } else { - map::iterator hit = globals->customStringTokens.find(key); - if (hit != globals->customStringTokens.end()) { - globals->customStringTokens.erase(key); - } - globals->customStringTokens.insert(pair(key, val)); + globals->AddCustomString(key, val); } return true; } @@ -164,13 +156,7 @@ bool cSkinDesigner::SetCustomToken(string option) { void cSkinDesigner::ListCustomTokens(void) { if (!globals) return; - - for (map::iterator it = globals->customStringTokens.begin(); it != globals->customStringTokens.end(); it++) { - dsyslog("skindesigner: custom string token \"%s\" = \"%s\"", (it->first).c_str(), (it->second).c_str()); - } - for (map::iterator it = globals->customIntTokens.begin(); it != globals->customIntTokens.end(); it++) { - dsyslog("skindesigner: custom int token \"%s\" = \"%d\"", (it->first).c_str(), it->second); - } + globals->ListCustomTokens(); } /********************************************************************************* diff --git a/dtd/globals.dtd b/dtd/globals.dtd index e6246d6..d7a463c 100644 --- a/dtd/globals.dtd +++ b/dtd/globals.dtd @@ -1,6 +1,6 @@ - + diff --git a/libcore/helpers.c b/libcore/helpers.c index 4da97f7..3e08e11 100644 --- a/libcore/helpers.c +++ b/libcore/helpers.c @@ -90,6 +90,12 @@ bool isNumber(const string& s) { return !s.empty() && it == s.end(); } +bool IsToken(const string& token) { + if ((token.find("{") == 0) && (token.find("}") == (token.size()-1))) + return true; + return false; +} + bool FileExists(const string &fullpath) { struct stat buffer; return (stat (fullpath.c_str(), &buffer) == 0); diff --git a/libcore/helpers.h b/libcore/helpers.h index abfae6d..cfcd70d 100644 --- a/libcore/helpers.h +++ b/libcore/helpers.h @@ -12,6 +12,7 @@ int Minimum(int a, int b, int c, int d, int e, int f); std::string CutText(string &text, int width, string fontName, int fontSize); std::string StrToLowerCase(string str); bool isNumber(const string& s); +bool IsToken(const string& token); bool FileExists(const string &fullpath); bool FileExists(const string &path, const string &name, const string &ext); bool FolderExists(const string &path); diff --git a/libcore/skinsetup.c b/libcore/skinsetup.c index ceeb687..d678243 100644 --- a/libcore/skinsetup.c +++ b/libcore/skinsetup.c @@ -102,8 +102,7 @@ void cSkinSetup::AddToGlobals(cGlobals *globals) { return; for (map < string, cSkinSetupParameter* >::iterator p = parameters.begin(); p != parameters.end(); p++) { cSkinSetupParameter *param = p->second; - globals->intVars.erase(param->name); - globals->intVars.insert(pair(param->name, param->value)); + globals->AddInt(param->name, param->value); } } diff --git a/libtemplate/globals.c b/libtemplate/globals.c index 9a94b4f..36e2c19 100644 --- a/libtemplate/globals.c +++ b/libtemplate/globals.c @@ -1,5 +1,6 @@ #include "globals.h" #include "xmlparser.h" +#include "../config.h" #include cGlobals::cGlobals(void) { @@ -11,15 +12,134 @@ cGlobals::cGlobals(void) { } bool cGlobals::ReadFromXML(void) { + //globals.xml is mandatory string xmlFile = "globals.xml"; cXmlParser parser; - if (!parser.ReadGlobals(this, xmlFile)) + if (!parser.ReadGlobals(this, xmlFile, true)) return false; if (!parser.ParseGlobals()) return false; + //theme.xml is optional + xmlFile = "theme.xml"; + if (parser.ReadGlobals(this, xmlFile, false)) { + parser.ParseGlobals(); + } return true; } +void cGlobals::AddColor(string &name, tColor &col) { + colors.erase(name); + colors.insert(pair(name, col)); +} + +bool cGlobals::GetColor(string &name, tColor &col) { + int size = name.size(); + if (size < 2) + return false; + string nameCutted = name.substr(1, size-2); + map ::iterator hit = colors.find(nameCutted); + if (hit != colors.end()) { + col = hit->second; + return true; + } + return false; +} + +void cGlobals::AddFont(string &name, string &font) { + fonts.erase(name); + fonts.insert(pair(name, font)); +} + +bool cGlobals::GetFont(string name, string &font) { + int size = name.size(); + if (size < 2) + return false; + string nameCutted = name.substr(1, size-2); + map::iterator hit = fonts.find(nameCutted); + if (hit != fonts.end()) { + font = hit->second; + return true; + } + return false; +} + +void cGlobals::AddInt(string &name, int value) { + intVars.erase(name); + intVars.insert(pair(name, value)); +} + +void cGlobals::ReplaceIntVars(string &value) { + for (map::iterator it = intVars.begin(); it != intVars.end(); it++) { + stringstream sToken; + sToken << "{" << it->first << "}"; + string token = sToken.str(); + size_t foundToken = value.find(token); + if (foundToken != string::npos) { + stringstream st; + st << it->second; + value = value.replace(foundToken, token.size(), st.str()); + } + } +} + +bool cGlobals::GetInt(string name, int &val) { + map < string, int >::iterator hit = intVars.find(name); + if (hit != intVars.end()) { + val = hit->second; + return true; + } + return false; +} + +void cGlobals::AddDouble(string &name, string &value) { + doubleVars.erase(name); + if (config.replaceDecPoint) { + if (value.find_first_of('.') != string::npos) { + std::replace( value.begin(), value.end(), '.', config.decPoint); + } + } + double val = atof(value.c_str()); + doubleVars.insert(pair(name, val)); +} + +void cGlobals::ReplaceDoubleVars(string &value) { + for (map::iterator it = doubleVars.begin(); it != doubleVars.end(); it++) { + stringstream sToken; + sToken << "{" << it->first << "}"; + string token = sToken.str(); + size_t foundToken = value.find(token); + if (foundToken != string::npos) { + stringstream st; + st << it->second; + string doubleVal = st.str(); + value = value.replace(foundToken, token.size(), doubleVal); + } + } +} + +void cGlobals::AddString(string &name, string &value) { + stringVars.erase(name); + stringVars.insert(pair(name, value)); +} + +void cGlobals::ReplaceStringVars(string &value) { + for (map::iterator it = stringVars.begin(); it != stringVars.end(); it++) { + stringstream sToken; + sToken << "{" << it->first << "}"; + string token = sToken.str(); + size_t foundToken = value.find(token); + if (foundToken != string::npos) { + value = value.replace(foundToken, token.size(), it->second); + } + } + +} + +bool cGlobals::AddTranslation(string name, map < string, string > transl) { + translations.erase(name); + translations.insert(pair >(name, transl)); +} + bool cGlobals::Translate(string text, string &translation) { string transStart = "{tr("; string transEnd = ")}"; @@ -63,6 +183,34 @@ string cGlobals::DoTranslate(string token) { return translation; } +void cGlobals::AddCustomInt(string &name, int value) { + customIntTokens.erase(name); + customIntTokens.insert(pair(name, value)); +} + +void cGlobals::AddCustomString(string &name, string &value) { + customStringTokens.erase(name); + customStringTokens.insert(pair(name, value)); +} + +bool cGlobals::GetCustomInt(string name, int &val) { + map < string, int >::iterator hit = customIntTokens.find(name); + if (hit != customIntTokens.end()) { + val = hit->second; + return true; + } + return false; +} + +void cGlobals::ListCustomTokens(void) { + for (map::iterator it = customStringTokens.begin(); it != customStringTokens.end(); it++) { + dsyslog("skindesigner: custom string token \"%s\" = \"%s\"", (it->first).c_str(), (it->second).c_str()); + } + for (map::iterator it = customIntTokens.begin(); it != customIntTokens.end(); it++) { + dsyslog("skindesigner: custom int token \"%s\" = \"%d\"", (it->first).c_str(), it->second); + } +} + void cGlobals::Debug(void) { dsyslog("skindesigner: GLOBAL VARIABLES"); for (map ::iterator col = colors.begin(); col != colors.end(); col++) { @@ -80,7 +228,7 @@ void cGlobals::Debug(void) { for (map ::iterator font = fonts.begin(); font != fonts.end(); font++) { dsyslog("skindesigner: Font \"%s\": \"%s\"", (font->first).c_str(), (font->second).c_str()); } - /* + for (map >::iterator trans = translations.begin(); trans != translations.end(); trans++) { dsyslog("skindesigner: Translation Token %s", (trans->first).c_str()); map< string, string > tokenTrans = trans->second; @@ -88,5 +236,4 @@ void cGlobals::Debug(void) { dsyslog("skindesigner: language %s, translation %s", (transTok->first).c_str(), (transTok->second).c_str()); } } - */ } diff --git a/libtemplate/globals.h b/libtemplate/globals.h index 17f5242..9629e63 100644 --- a/libtemplate/globals.h +++ b/libtemplate/globals.h @@ -22,19 +22,37 @@ class cGlobals { private: string language; string DoTranslate(string token); -public: - cGlobals(void); - virtual ~cGlobals(void) {}; map colors; + map fonts; map intVars; map doubleVars; map stringVars; - map fonts; map > translations; map customStringTokens; map customIntTokens; +public: + cGlobals(void); + virtual ~cGlobals(void) {}; bool ReadFromXML(void); + void AddColor(string &name, tColor &col); + bool GetColor(string &name, tColor &col); + void AddFont(string &name, string &font); + bool GetFont(string name, string &font); + void AddInt(string &name, int value); + void ReplaceIntVars(string &value); + bool GetInt(string name, int &val); + void AddDouble(string &name, string &value); + void ReplaceDoubleVars(string &value); + void AddString(string &name, string &value); + void ReplaceStringVars(string &value); + bool AddTranslation(string name, map < string, string > transl); bool Translate(string text, string &translation); + void AddCustomInt(string &name, int value); + void AddCustomString(string &name, string &value); + bool GetCustomInt(string name, int &val); + map GetCustomStringTokens(void) { return customStringTokens; }; + map GetCustomIntTokens(void) { return customIntTokens; }; + void ListCustomTokens(void); void Debug(void); }; diff --git a/libtemplate/parameter.c b/libtemplate/parameter.c index 83597c8..1479014 100644 --- a/libtemplate/parameter.c +++ b/libtemplate/parameter.c @@ -146,34 +146,8 @@ bool cNumericParameter::CheckExpression(int &val, string &parsedVal) { } if (globals) { - for (map::iterator globInt = globals->intVars.begin(); globInt != globals->intVars.end(); globInt++) { - stringstream sToken; - sToken << "{" << globInt->first << "}"; - string token = sToken.str(); - size_t foundToken = parsedValue.find(token); - if (foundToken != string::npos) { - stringstream st; - st << globInt->second; - parsedValue = parsedValue.replace(foundToken, token.size(), st.str()); - } - } - for (map::iterator globDouble = globals->doubleVars.begin(); globDouble != globals->doubleVars.end(); globDouble++) { - stringstream sToken; - sToken << "{" << globDouble->first << "}"; - string token = sToken.str(); - size_t foundToken = parsedValue.find(token); - if (foundToken != string::npos) { - stringstream st; - st << globDouble->second; - string doubleVal = st.str(); - if (config.replaceDecPoint) { - if (doubleVal.find_first_of('.') != string::npos) { - std::replace( doubleVal.begin(), doubleVal.end(), '.', config.decPoint); - } - } - parsedValue = parsedValue.replace(foundToken, token.size(), doubleVal); - } - } + globals->ReplaceIntVars(parsedValue); + globals->ReplaceDoubleVars(parsedValue); } if (IsNumber(parsedValue)) { @@ -339,15 +313,12 @@ bool cConditionalParameter::Evaluate(map < string, int > *intTokens, map < strin int cConditionalParameter::EvaluateParameter(string token, map < string, int > *intTokens, map < string, string > *stringTokens) { //first check globals - map < string, int >::iterator hitGlobals = globals->intVars.find(token); - if (hitGlobals != globals->intVars.end()) { - return hitGlobals->second; - } + int result = 0; + if (globals->GetInt(token, result)) + return result; //then check custom tokens - map < string, int >::iterator hitCustomTokens = globals->customIntTokens.find(token); - if (hitCustomTokens != globals->customIntTokens.end()) { - return hitCustomTokens->second; - } + if (globals->GetCustomInt(token, result)) + return result; //then check tokens if (intTokens) { map < string, int >::iterator hit = intTokens->find(token); diff --git a/libtemplate/templatefunction.c b/libtemplate/templatefunction.c index 80cf762..0b3de8a 100644 --- a/libtemplate/templatefunction.c +++ b/libtemplate/templatefunction.c @@ -777,16 +777,11 @@ bool cTemplateFunction::SetAlign(eParamType type, string value) { bool cTemplateFunction::SetFont(eParamType type, string value) { //check if token - if ((value.find("{") == 0) && (value.find("}") == (value.size()-1))) { - value = value.substr(1, value.size()-2); - map::iterator hit = globals->fonts.find(value); - if (hit != globals->fonts.end()) { - fontName = hit->second; - } else { - map::iterator def = globals->fonts.find("vdrOsd"); - if (def == globals->fonts.end()) + if (IsToken(value)) { + if (!globals->GetFont(value, fontName)) { + if (!globals->GetFont("{vdrOsd}", fontName)) { return false; - fontName = def->second; + } } } else { //if no token, directly use input @@ -820,15 +815,10 @@ bool cTemplateFunction::SetImageType(eParamType type, string value) { bool cTemplateFunction::SetColor(eParamType type, string value) { if (globals) { - for (map::iterator col = globals->colors.begin(); col != globals->colors.end(); col++) { - stringstream sColName; - sColName << "{" << col->first << "}"; - string colName = sColName.str(); - if (!colName.compare(value)) { - tColor colVal = col->second; - colorParameters.insert(pair(type, colVal)); - return true; - } + tColor colVal = 0x00000000; + if (globals->GetColor(value, colVal)) { + colorParameters.insert(pair(type, colVal)); + return true; } } if (value.size() != 8) @@ -844,15 +834,7 @@ bool cTemplateFunction::SetColor(eParamType type, string value) { bool cTemplateFunction::SetTextTokens(string value) { textTokens.clear(); //first replace globals - for (map::iterator globStr = globals->stringVars.begin(); globStr != globals->stringVars.end(); globStr++) { - stringstream sToken; - sToken << "{" << globStr->first << "}"; - string token = sToken.str(); - size_t foundToken = value.find(token); - if (foundToken != string::npos) { - value = value.replace(foundToken, token.size(), globStr->second); - } - } + globals->ReplaceStringVars(value); //now tokenize bool tokenFound = true; while (tokenFound) { diff --git a/libtemplate/templateview.h b/libtemplate/templateview.h index 1ad5734..1cd4289 100644 --- a/libtemplate/templateview.h +++ b/libtemplate/templateview.h @@ -105,8 +105,8 @@ public: int GetNumPixmapsViewElement(eViewElement ve); int GetNumListViewMenuItems(void); bool GetScalingWindow(cRect &scalingWindow); - map GetCustomStringTokens(void) { return globals->customStringTokens; }; - map GetCustomIntTokens(void) { return globals->customIntTokens; }; + map GetCustomStringTokens(void) { return globals->GetCustomStringTokens(); }; + map GetCustomIntTokens(void) { return globals->GetCustomIntTokens(); }; //Checks for parsing template XML files bool ValidSubView(const char *subView); bool ValidViewElement(const char *viewElement); diff --git a/libtemplate/templateviewlist.c b/libtemplate/templateviewlist.c index e75c528..0a6cabc 100644 --- a/libtemplate/templateviewlist.c +++ b/libtemplate/templateviewlist.c @@ -1,5 +1,6 @@ #include "templateviewlist.h" #include "../config.h" +#include "../libcore/helpers.h" cTemplateViewList::cTemplateViewList(void) : cTemplateViewElement() { listElement = NULL; @@ -87,16 +88,11 @@ int cTemplateViewList::GetAverageFontWidth(void) { string paramFontSize = fontFunc->GetParameter(ptFontSize); string fontName = ""; - if ((fontNameToken.find("{") == 0) && (fontNameToken.find("}") == (fontNameToken.size()-1))) { - fontNameToken = fontNameToken.substr(1, fontNameToken.size()-2); - map::iterator hit = globals->fonts.find(fontNameToken); - if (hit != globals->fonts.end()) { - fontName = hit->second; - } else { - map::iterator def = globals->fonts.find("vdrOsd"); - if (def == globals->fonts.end()) + if (IsToken(fontNameToken)) { + if (!globals->GetFont(fontNameToken, fontName)) { + if (!globals->GetFont("{vdrOsd}", fontName)) { return defaultAverageFontWidth; - fontName = def->second; + } } } else { //if no token, directly use input @@ -135,16 +131,11 @@ cFont *cTemplateViewList::GetTextAreaFont(void) { string paramFontSize = fontFunc->GetParameter(ptFontSize); string fontName = ""; - if ((fontNameToken.find("{") == 0) && (fontNameToken.find("}") == (fontNameToken.size()-1))) { - fontNameToken = fontNameToken.substr(1, fontNameToken.size()-2); - map::iterator hit = globals->fonts.find(fontNameToken); - if (hit != globals->fonts.end()) { - fontName = hit->second; - } else { - map::iterator def = globals->fonts.find("vdrOsd"); - if (def == globals->fonts.end()) + if (IsToken(fontNameToken)) { + if (!globals->GetFont(fontNameToken, fontName)) { + if (!globals->GetFont("{vdrOsd}", fontName)) { return NULL; - fontName = def->second; + } } } else { //if no token, directly use input diff --git a/libtemplate/xmlparser.c b/libtemplate/xmlparser.c index 01b48a6..9e095a4 100644 --- a/libtemplate/xmlparser.c +++ b/libtemplate/xmlparser.c @@ -89,7 +89,7 @@ bool cXmlParser::ReadPluginView(string plugName, int templateNumber, string temp return true; } -bool cXmlParser::ReadGlobals(cGlobals *globals, string xmlFile) { +bool cXmlParser::ReadGlobals(cGlobals *globals, string xmlFile, bool mandatory) { this->globals = globals; string xmlPath = GetPath(xmlFile); @@ -101,20 +101,30 @@ bool cXmlParser::ReadGlobals(cGlobals *globals, string xmlFile) { doc = xmlCtxtReadFile(ctxt, xmlPath.c_str(), NULL, XML_PARSE_NOENT | XML_PARSE_DTDVALID); - if (doc == NULL ) { - esyslog("skindesigner: ERROR: Globals %s not parsed successfully.", xmlPath.c_str()); + if (doc == NULL) { + if (mandatory) { + esyslog("skindesigner: ERROR: Globals %s not parsed successfully.", xmlPath.c_str()); + } else { + dsyslog("skindesigner: Globals %s not parsed successfully.", xmlPath.c_str()); + } return false; } root = xmlDocGetRootElement(doc); if (ctxt->valid == 0) { - esyslog("skindesigner: Failed to validate %s", xmlPath.c_str()); + if (mandatory) { + esyslog("skindesigner: ERROR: Failed to validate %s", xmlPath.c_str()); + } else { + dsyslog("skindesigner: Failed to validate %s", xmlPath.c_str()); + } return false; } if (root == NULL) { - esyslog("skindesigner: ERROR: Globals %s is empty", xmlPath.c_str()); + if (mandatory) { + esyslog("skindesigner: ERROR: Globals %s is empty", xmlPath.c_str()); + } return false; } @@ -234,7 +244,6 @@ bool cXmlParser::ParsePluginView(string plugName, int templateNumber) { bool cXmlParser::ParseGlobals(void) { xmlNodePtr node = root->xmlChildrenNode; - while (node != NULL) { if (node->type != XML_ELEMENT_NODE) { node = node->next; @@ -304,6 +313,8 @@ string cXmlParser::GetPath(string xmlFile) { string activeTheme = Setup.OSDTheme; string path = ""; if (!xmlFile.compare("globals.xml")) { + path = *cString::sprintf("%s%s/%s", *config.skinPath, activeSkin.c_str(), xmlFile.c_str()); + } else if (!xmlFile.compare("theme.xml")) { path = *cString::sprintf("%s%s/themes/%s/%s", *config.skinPath, activeSkin.c_str(), activeTheme.c_str(), xmlFile.c_str()); } else if (!xmlFile.compare("setup.xml")) { path = *cString::sprintf("%s%s/%s", *config.skinPath, activeSkin.c_str(), xmlFile.c_str()); @@ -424,7 +435,7 @@ void cXmlParser::InsertColor(string name, string value) { str << value; tColor colVal; str >> std::hex >> colVal; - globals->colors.insert(pair(name, colVal)); + globals->AddColor(name, colVal); } void cXmlParser::ParseGlobalVariables(xmlNodePtr node) { @@ -476,17 +487,11 @@ void cXmlParser::ParseGlobalVariables(xmlNodePtr node) { void cXmlParser::InsertVariable(string name, string type, string value) { if (!type.compare("int")) { int val = atoi(value.c_str()); - globals->intVars.insert(pair(name, val)); + globals->AddInt(name, val); } else if (!type.compare("double")) { - if (config.replaceDecPoint) { - if (value.find_first_of('.') != string::npos) { - std::replace( value.begin(), value.end(), '.', config.decPoint); - } - } - double val = atof(value.c_str()); - globals->doubleVars.insert(pair(name, val)); + globals->AddDouble(name, value); } else if (!type.compare("string")) { - globals->stringVars.insert(pair(name, value)); + globals->AddString(name, value); } } @@ -523,8 +528,11 @@ void cXmlParser::ParseGlobalFonts(xmlNodePtr node) { } if (ok) { fontValue = xmlNodeListGetString(doc, node->xmlChildrenNode, 1); - if (fontName && fontValue) - globals->fonts.insert(pair((const char*)fontName, (const char*)fontValue)); + if (fontName && fontValue) { + string fN = (const char*)fontName; + string fV = (const char*)fontValue; + globals->AddFont(fN, fV); + } } if (fontName) xmlFree(fontName); @@ -607,7 +615,7 @@ void cXmlParser::ParseTranslations(xmlNodePtr node) { nodeTrans = nodeTrans->next; } if (globals) { - globals->translations.insert(pair >((const char*)tokenName, tokenTranslations)); + globals->AddTranslation((const char*)tokenName, tokenTranslations); } else if (skinSetup) { skinSetup->SetTranslation((const char*)tokenName, tokenTranslations); } diff --git a/libtemplate/xmlparser.h b/libtemplate/xmlparser.h index 0369622..27399bd 100644 --- a/libtemplate/xmlparser.h +++ b/libtemplate/xmlparser.h @@ -50,7 +50,7 @@ public: virtual ~cXmlParser(void); bool ReadView(cTemplateView *view, string xmlFile); bool ReadPluginView(string plugName, int templateNumber, string templateName); - bool ReadGlobals(cGlobals *globals, string xmlFile); + bool ReadGlobals(cGlobals *globals, string xmlFile, bool mandatory); bool ReadSkinSetup(cSkinSetup *skinSetup, string skin, string xmlFile); bool ParseView(void); bool ParsePluginView(string plugName, int templateNumber); diff --git a/skins/blackhole/themes/default/globals.xml b/skins/blackhole/globals.xml similarity index 92% rename from skins/blackhole/themes/default/globals.xml rename to skins/blackhole/globals.xml index 3f09c26..9096212 100644 --- a/skins/blackhole/themes/default/globals.xml +++ b/skins/blackhole/globals.xml @@ -1,20 +1,11 @@ - + - 00000000 - FFFF0000 - FF5FE200 - FFE2DA00 - FF007FE2 - FFFFFFFF - FF999999 - 55FF0000 - 99000000 - Source Sans Pro:Light - Source Sans Pro:Bold - Source Sans Pro:Semibold - Source Sans Pro:Regular - DS-Digital:Normal diff --git a/skins/blackhole/themes/default/theme.xml b/skins/blackhole/themes/default/theme.xml new file mode 100644 index 0000000..753336b --- /dev/null +++ b/skins/blackhole/themes/default/theme.xml @@ -0,0 +1,46 @@ + + + + + + + 00000000 + FFFF0000 + FF5FE200 + FFE2DA00 + FF007FE2 + FFFFFFFF + FF999999 + 55FF0000 + 99000000 + + + + + + + Source Sans Pro:Light + Source Sans Pro:Bold + Source Sans Pro:Semibold + Source Sans Pro:Regular + DS-Digital:Normal + + diff --git a/skins/metrixhd/themes/default/globals.xml b/skins/metrixhd/globals.xml similarity index 91% rename from skins/metrixhd/themes/default/globals.xml rename to skins/metrixhd/globals.xml index 1ce4251..1b2386c 100644 --- a/skins/metrixhd/themes/default/globals.xml +++ b/skins/metrixhd/globals.xml @@ -1,23 +1,11 @@ - + - FFFF0000 - FF5FE200 - FFE2DA00 - FF007FE2 - C0000000 - D0000000 - FF1E8BD7 - C01E8BD7 - C0FFFFFF - FFFFFFFF - FF14141E - 00000000 - hützligrütz - 3.14 - VDROpen Sans Light:Light - VDROpen Sans Semibold:Semibold diff --git a/skins/metrixhd/themes/default/theme.xml b/skins/metrixhd/themes/default/theme.xml new file mode 100644 index 0000000..9c65d2a --- /dev/null +++ b/skins/metrixhd/themes/default/theme.xml @@ -0,0 +1,53 @@ + + + + + + + FFFF0000 + FF5FE200 + FFE2DA00 + FF007FE2 + C0000000 + D0000000 + FF1E8BD7 + C01E8BD7 + C0FFFFFF + FFFFFFFF + FF14141E + 00000000 + + + + hützligrütz + 3.14 + + + + + + + VDROpen Sans Light:Light + VDROpen Sans Semibold:Semibold + + diff --git a/skins/nopacity/themes/darkred/globals.xml b/skins/nopacity/globals.xml similarity index 90% rename from skins/nopacity/themes/darkred/globals.xml rename to skins/nopacity/globals.xml index d31c181..0a6e473 100644 --- a/skins/nopacity/themes/darkred/globals.xml +++ b/skins/nopacity/globals.xml @@ -1,29 +1,11 @@ - + - FFFF0000 - FF5FE200 - FFE2DA00 - FF007FE2 - FFFFFFFF - 99FFFFFF - FF000000 - FF3D0000 - FF2B0000 - FF858585 - B0000000 - 99000000 - DF000000 - 99FF0000 - FFFFFFFF - FFFFFFFF - FF858585 - 00000000 - 300 - - FFFF0000 - FF5FE200 - FFE2DA00 - FF007FE2 - FFFFFFFF - 99FFFFFF - FF000000 - FF8EAB21 - FF4C5C11 - FF858585 - B012273F - 99000000 - CC000000 - 99FF0000 - FFFFFFFF - FF363636 - FF858585 - 00000000 - - - - 300 - - - - - free - frei - - - Transponder - Transponder - - - Now - Jetzt - - - Next - Nachfolgend - - - Next Schedules - Nachfolgende Sendungen - - - Reruns - Wiederholungen - - - Reruns of - Wiederholungen von - - - Actors - Schauspieler - - - Episode - Folge - - - Season - Staffel - - - Guest Stars - Gaststars - - - Series First Aired - Erstausstrahlung der Serie - - - Episode First Aired - Erstausstrahlung der Episode - - - Network - TV Station - - - Genre - Genre - - - Status - Status - - - Rating - Bewertung - - - Episode Rating - Bewertung der Folge - - - Recording Information - Aufnahme Informationen - - - Series Galery - Serien Galerie - - - Movie Galery - Spielfilm Galerie - - - Original Title - Originaltitel - - - Budget - Budget - - - Revenue - Einnahmen - - - Adult - Nur für Erwachsene - - - Release Date - Erscheinungsdatum - - - Runtime - Laufzeit - - - Popularity - Popularität - - - Vote Average - Durchschnittliche Wertung - - - Homepage - Homepage - - - Recording size - Größe der Aufnahme - - - Cutted Recording Size - Größe der geschnittenen Aufnahme - - - Recording Length - Länge der Aufnahme - - - Cutted Recording Length - Länge der geschnittenen Aufnahme - - - Bit Rate - Bitrate - - - Format - Format - - - Searchtimer - Suchtimer - - - Volume - Lautstärke - - - Pause - Pause - - - Felt Temperature - Gefühlte Temperatur - - - minimum today - heutiges Minimum - - - maximum today - heutiges Maximum - - - Precipitation Prob. - Regenwahrsch. - - - Precipitation Intensity - Regenmenge - - - Humidity - Luftfeuchtigkeit - - - Felt Temperature - Gefühlte Temperatur - - - Wind Bearing - Windrichtung - - - Wind Speed - Windgeschwindigkeit - - - Cloud Cover - Bewölkung - - - Pressure - Luftdruck - - - Ozone - Ozon - - - visibility - Sicht - - - Weather Conditions - Wetterlage - - - from - aus - - - felt - gefühlt - - - min - min - - - max - max - - - for - für - - - - - - diff --git a/skins/nopacity/themes/default/theme.xml b/skins/nopacity/themes/default/theme.xml new file mode 100644 index 0000000..ec3898e --- /dev/null +++ b/skins/nopacity/themes/default/theme.xml @@ -0,0 +1,28 @@ + + + + + + FFFF0000 + FF5FE200 + FFE2DA00 + FF007FE2 + FFFFFFFF + 99FFFFFF + FF000000 + FF8EAB21 + FF4C5C11 + FF858585 + B012273F + 99000000 + CC000000 + 99FF0000 + FFFFFFFF + FF363636 + FF858585 + 00000000 + + + 300 + + diff --git a/views/displaymenuview.c b/views/displaymenuview.c index 0b9c5a8..32a00ba 100644 --- a/views/displaymenuview.c +++ b/views/displaymenuview.c @@ -419,7 +419,6 @@ void cDisplayMenuMainView::DrawTemperatures(void) { if (!ViewElementImplemented(veTemperatures)) { return; } - cString execCommand = cString::sprintf("cd \"%s/\"; \"%s/temperatures\"", SCRIPTFOLDER, SCRIPTFOLDER); system(*execCommand);