summaryrefslogtreecommitdiff
path: root/theme.c
diff options
context:
space:
mode:
authorlordjaxom <lordjaxom>2004-06-02 19:56:58 +0000
committerlordjaxom <lordjaxom>2004-06-02 19:56:58 +0000
commite0c2ee1d37c0f213f22a04df71710bebe3526f85 (patch)
tree8bfd3a4fa065abeb016134466523a1152202e597 /theme.c
parente535cdbe09d9c13d79cd6722aafca5798b7d1e35 (diff)
downloadvdr-plugin-text2skin-e0c2ee1d37c0f213f22a04df71710bebe3526f85.tar.gz
vdr-plugin-text2skin-e0c2ee1d37c0f213f22a04df71710bebe3526f85.tar.bz2
- implemented image loading through ImageMagick (fixes crashes when runningv0.0.1-rc4
together with GraphTFT) - implemented Theme support (see file demo.colors in the demo skin) - implemented translations for texts used in skins (see file demo.trans in the demo skin)
Diffstat (limited to 'theme.c')
-rw-r--r--theme.c31
1 files changed, 31 insertions, 0 deletions
diff --git a/theme.c b/theme.c
new file mode 100644
index 0000000..c76166d
--- /dev/null
+++ b/theme.c
@@ -0,0 +1,31 @@
+/*
+ * $Id: theme.c,v 1.1 2004/06/02 20:43:05 lordjaxom Exp $
+ */
+#include "theme.h"
+#include <vdr/osd.h>
+
+cText2SkinTheme::cText2SkinTheme(const char *Skin): cText2SkinFile(Skin) {
+}
+
+cText2SkinTheme::~cText2SkinTheme() {
+}
+
+bool cText2SkinTheme::Parse(const char *Text) {
+ int l = strlen(Text);
+ bool result = false;
+ if (l) {
+ if (strncmp(Text, "Item=Color,", 11) == 0) {
+ Text += 11;
+ string name;
+ tColor *value;
+ if (ParseVar(Text, "name", name) && ParseVar(Text, "default", &value)) {
+ mMap[name] = mTheme.AddColor(name.c_str(), *value);
+ result = true;
+ } else
+ esyslog("ERROR: text2skin: Parameters name and default must be present\n");
+ } else
+ esyslog("ERROR: text2skin: syntax error");
+ }
+ return result;
+}
+