diff options
author | louis <louis.braun@gmx.de> | 2014-10-11 16:31:39 +0200 |
---|---|---|
committer | louis <louis.braun@gmx.de> | 2014-10-11 16:31:39 +0200 |
commit | 0e0f05cfcb72e9d679a6681b9fcabd732856f942 (patch) | |
tree | e79b1772dbdd7fcb116f2298f4ac2f190aefff2d /libtemplate | |
parent | 04340d11c9c0efb908cce138edde535bc07636d7 (diff) | |
download | vdr-plugin-skindesigner-0e0f05cfcb72e9d679a6681b9fcabd732856f942.tar.gz vdr-plugin-skindesigner-0e0f05cfcb72e9d679a6681b9fcabd732856f942.tar.bz2 |
added support for custom tokens in dislaychannel
Diffstat (limited to 'libtemplate')
-rw-r--r-- | libtemplate/globals.h | 1 | ||||
-rw-r--r-- | libtemplate/templateview.c | 6 | ||||
-rw-r--r-- | libtemplate/templateview.h | 1 | ||||
-rw-r--r-- | libtemplate/templateviewelement.h | 1 |
4 files changed, 9 insertions, 0 deletions
diff --git a/libtemplate/globals.h b/libtemplate/globals.h index eda9ec9..09c9756 100644 --- a/libtemplate/globals.h +++ b/libtemplate/globals.h @@ -31,6 +31,7 @@ public: map <string, string> stringVars; map <string, string> fonts; map <string, map< string, string > > translations; + map <string, string> customTokens; bool ReadFromXML(void); bool Translate(string text, string &translation); void Debug(void); diff --git a/libtemplate/templateview.c b/libtemplate/templateview.c index abaedc8..f1704f8 100644 --- a/libtemplate/templateview.c +++ b/libtemplate/templateview.c @@ -593,6 +593,7 @@ void cTemplateViewChannel::SetViewElements(void) { viewElementsAllowed.insert("scrapercontent"); viewElementsAllowed.insert("datetime"); viewElementsAllowed.insert("message"); + viewElementsAllowed.insert("customtokens"); } string cTemplateViewChannel::GetViewElementName(eViewElement ve) { @@ -637,6 +638,9 @@ string cTemplateViewChannel::GetViewElementName(eViewElement ve) { case veMessage: name = "Message"; break; + case veCustomTokens: + name = "Custom Tokens"; + break; default: name = "Unknown"; break; @@ -673,6 +677,8 @@ void cTemplateViewChannel::AddPixmap(string sViewElement, cTemplatePixmap *pix, ve = veDateTime; } else if (!sViewElement.compare("message")) { ve = veMessage; + } else if (!sViewElement.compare("customtokens")) { + ve = veCustomTokens; } if (ve == veUndefined) { diff --git a/libtemplate/templateview.h b/libtemplate/templateview.h index 414deaa..6603275 100644 --- a/libtemplate/templateview.h +++ b/libtemplate/templateview.h @@ -99,6 +99,7 @@ public: int GetNumPixmapsViewElement(eViewElement ve); int GetNumListViewMenuItems(void); bool GetScalingWindow(cRect &scalingWindow); + map<string,string> GetCustomTokens(void) { return globals->customTokens; }; //Checks for parsing template XML files bool ValidSubView(const char *subView); bool ValidViewElement(const char *viewElement); diff --git a/libtemplate/templateviewelement.h b/libtemplate/templateviewelement.h index 84db627..9c32a4c 100644 --- a/libtemplate/templateviewelement.h +++ b/libtemplate/templateviewelement.h @@ -24,6 +24,7 @@ enum eViewElement { veBackground,
veDateTime,
veMessage,
+ veCustomTokens,
//DisplayChannel ViewElements
veChannelInfo,
veChannelGroup,
|