diff options
author | lordjaxom <lordjaxom> | 2004-06-16 18:50:57 +0000 |
---|---|---|
committer | lordjaxom <lordjaxom> | 2004-06-16 18:50:57 +0000 |
commit | 1d3cd38e88ae97dd6906f9818d52b9ef07bf057d (patch) | |
tree | 925b1ff6a76c29178ba6fd4bf1c5516848ab9ab3 /data.c | |
parent | 3d738f9c8a5d48bb22b3330c036b6887b0f9d6c1 (diff) | |
download | vdr-plugin-text2skin-1d3cd38e88ae97dd6906f9818d52b9ef07bf057d.tar.gz vdr-plugin-text2skin-1d3cd38e88ae97dd6906f9818d52b9ef07bf057d.tar.bz2 |
- fixed disappearing Scrolltext when Message was displayedv0.0.5
- fixed display-items "MenuScrollUp" and "MenuScrollDown" which didn't display
any other items than "Symbol"
- fixed the above for all replay- and channel-symbols
(for all display-items that can be symbols there must be path, altpath or
both to tell the plugin if that item is to be drawn if the symbol is on,
off or in both cases)
- fixed various memory leaks and missing destructions (valgrind rox)
- fixed the image loaders to respect the alpha value and palette properly
(this hopefully also fixes the phenomenon that images "get lost" after some
time)
- added display-item "Scrollbar"
- SKINS and SKINS.de are now generated during the make
Diffstat (limited to 'data.c')
-rw-r--r-- | data.c | 29 |
1 files changed, 14 insertions, 15 deletions
@@ -1,5 +1,5 @@ /* - * $Id: data.c,v 1.18 2004/06/12 18:00:05 lordjaxom Exp $ + * $Id: data.c,v 1.19 2004/06/16 18:46:50 lordjaxom Exp $ */ #include "data.h" @@ -23,27 +23,21 @@ cText2SkinItem::~cText2SkinItem() { } bool cText2SkinItem::Parse(const char *Text) { - char *text = strdup(Text); - char *ptr = text; + const char *text = Text; + const char *ptr = text; + bool res = false; // check if this is an item if (ParseVar(ptr, "Item", &mItem)) { - if (mItem == itemSkin) { // the Skin item - if (!ParseVar(ptr, "name", mName) || !ParseVar(ptr, "version", mVersion)){ - esyslog("ERROR: text2skin: Item=Skin is missing the name and/or version parameter(s)"); - return false; - } - } - - if (mItem != itemUnknown) { + if (mItem == itemSkin && (!ParseVar(ptr, "name", mName) || !ParseVar(ptr, "version", mVersion))) + esyslog("ERROR: text2skin: Item=Skin is missing the name and/or version parameter(s)"); + else if (mItem != itemUnknown) { ParseItem(ptr); - return true; + res = true; } } else esyslog("ERROR: text2skin: unknown item in skin"); - - // fall through - return false; + return res; } bool cText2SkinItem::ParseItem(const char *Text) { @@ -74,6 +68,11 @@ cText2SkinData::cText2SkinData(const char *Skin): cText2SkinFile(Skin) { } cText2SkinData::~cText2SkinData() { + for (int i = 0; i < __SECTION_COUNT__; ++i) { + for (int j = 0; j < (int)mSections[i].size(); ++j) + delete mSections[i][j]; + mSections[i].clear(); + } } bool cText2SkinData::Parse(const char *Text) { |