diff options
author | louis <louis.braun@gmx.de> | 2015-01-19 10:50:22 +0100 |
---|---|---|
committer | louis <louis.braun@gmx.de> | 2015-01-19 10:50:22 +0100 |
commit | f72a1856cb51db1efa3c799c1e489a152026566b (patch) | |
tree | 7c833bede9ec33629cd1a7ecc3ab0925cc7fcf71 /config.c | |
parent | f2f7246c0b02f37a47ebf888c4d7aa1eadd77662 (diff) | |
download | vdr-plugin-skindesigner-f72a1856cb51db1efa3c799c1e489a152026566b.tar.gz vdr-plugin-skindesigner-f72a1856cb51db1efa3c799c1e489a152026566b.tar.bz2 |
added skinsetup to globals
Diffstat (limited to 'config.c')
-rw-r--r-- | config.c | 19 |
1 files changed, 16 insertions, 3 deletions
@@ -27,7 +27,9 @@ cDesignerConfig::cDesignerConfig() { } cDesignerConfig::~cDesignerConfig() { - esyslog("skindesigner: config destruktor"); + for (map < string, cSkinSetup* >::iterator it = skinSetups.begin(); it != skinSetups.end(); it++) { + delete it->second; + } } void cDesignerConfig::SetPathes(void) { @@ -78,8 +80,10 @@ void cDesignerConfig::ReadSkins(void) { void cDesignerConfig::ReadSkinSetup(string skin) { cSkinSetup *skinSetup = new cSkinSetup(skin); - skinSetup->ReadFromXML(); - skinSetup->Debug(); + if (skinSetup->ReadFromXML()) { + //skinSetup->Debug(); + skinSetups.insert(pair<string, cSkinSetup* >(skin, skinSetup)); + } } bool cDesignerConfig::GetSkin(string &skin) { @@ -91,6 +95,15 @@ bool cDesignerConfig::GetSkin(string &skin) { return true; } +cSkinSetup* cDesignerConfig::GetSkinSetup(string &skin) { + map< string, cSkinSetup* >::iterator hit = skinSetups.find(skin); + if (hit != skinSetups.end()) { + return hit->second; + } + return NULL; +} + + void cDesignerConfig::CheckDecimalPoint(void) { struct lconv *pLocInfo; pLocInfo = localeconv(); |