diff options
author | Christian Tusche <chr13@gmx.net> | 2007-05-06 17:26:51 +0200 |
---|---|---|
committer | Thomas Günther <tom@toms-cafe.de> | 2009-06-04 00:46:32 +0200 |
commit | b32f1eaf9ae246f656ebd27c2fbb5d29d2bec34c (patch) | |
tree | bcecfb3d782d7b0c3690403276be18ab8f76717e /xml/skin.c | |
parent | 0b3f86344a87940d324695e0bc9449c35cbf60d4 (diff) | |
download | vdr-plugin-text2skin-b32f1eaf9ae246f656ebd27c2fbb5d29d2bec34c.tar.gz vdr-plugin-text2skin-b32f1eaf9ae246f656ebd27c2fbb5d29d2bec34c.tar.bz2 |
2007-05-06: Version 1.1-cvs_ext-0.10b (text2skin-1.1-cvs_ext-0.10b.diff)
- increase skin file version to 1.1
- the position of list items is interpreted relative to the "list" container
when file version >= 1.1
- when a position is specified for "block" elements, the position of all
contained elements is interpreted relative to the container position
Diffstat (limited to 'xml/skin.c')
-rw-r--r-- | xml/skin.c | 34 |
1 files changed, 34 insertions, 0 deletions
@@ -9,6 +9,40 @@ const std::string ScreenBases[] = { "relative", "absolute" }; +cxVersion::cxVersion(int ma, int min): + mMajor(ma), + mMinor(min) +{ +} + +bool cxVersion::Parse(const std::string &Text) +{ + int dot = Text.find("."); + std::string ma(Text, 0, dot), min(Text, dot+1); + char *e = NULL; + const char *t = NULL; + long l=0; + + t = ma.c_str(); + l = strtol(t, &e, 10); + if (e ==t || *e != '\0') { + return false; + } else { + mMajor = l; + } + + t = min.c_str(); + l = strtol(t, &e, 10); + if (e ==t || *e != '\0') { + return false; + } else { + mMinor = l; + } + + return true; +} + + cxSkin::cxSkin(const std::string &Name, cText2SkinI18n *I18n, cText2SkinTheme *Theme): mName(Name), mI18n(I18n), |