summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlordjaxom <lordjaxom>2005-01-02 16:54:41 +0000
committerlordjaxom <lordjaxom>2005-01-02 16:54:41 +0000
commit7c9181bf95fedb7a4b4ab40c31aaa841ead074ed (patch)
tree8ea4f4368674465ec7263028340585501060e5a5
parent6e98a71ded769f729a0cbd865ece36a7334f6404 (diff)
downloadvdr-plugin-text2skin-7c9181bf95fedb7a4b4ab40c31aaa841ead074ed.tar.gz
vdr-plugin-text2skin-7c9181bf95fedb7a4b4ab40c31aaa841ead074ed.tar.bz2
*** empty log message ***
-rw-r--r--status.c12
-rw-r--r--status.h4
-rw-r--r--xml/string.c21
-rw-r--r--xml/string.h8
4 files changed, 40 insertions, 5 deletions
diff --git a/status.c b/status.c
index 8d83072..5df11ee 100644
--- a/status.c
+++ b/status.c
@@ -1,5 +1,5 @@
/*
- * $Id: status.c,v 1.3 2004/12/21 20:26:25 lordjaxom Exp $
+ * $Id: status.c,v 1.4 2005/01/02 16:54:41 lordjaxom Exp $
*/
#include "status.h"
@@ -16,7 +16,8 @@ cText2SkinStatus::cText2SkinStatus(void):
mReplayMode(replayNone),
mRecordings(),
mCurrentRecording(0),
- mNextRecording(0)
+ mNextRecording(0),
+ mLastLanguage(Setup.OSDLanguage)
{
mStatus = this;
}
@@ -139,3 +140,10 @@ cxType cText2SkinStatus::GetTokenData(const txToken &Token)
return cxType::False;
}
+
+void cText2SkinStatus::OsdClear(void) {
+ if (Setup.OSDLanguage != mLastLanguage) {
+ mLastLanguage = Setup.OSDLanguage;
+ cxString::Reparse();
+ }
+}
diff --git a/status.h b/status.h
index d17fdd1..6ab5fee 100644
--- a/status.h
+++ b/status.h
@@ -1,5 +1,5 @@
/*
- * $Id: status.h,v 1.2 2004/12/21 18:35:54 lordjaxom Exp $
+ * $Id: status.h,v 1.3 2005/01/02 16:54:41 lordjaxom Exp $
*/
#ifndef VDR_TEXT2SKIN_STATUS_H
@@ -40,10 +40,12 @@ private:
tRecordings mRecordings;
uint mCurrentRecording;
uint mNextRecording;
+ int mLastLanguage;
protected:
virtual void Replaying(const cControl *Control, const char *Name);
virtual void Recording(const cDevice *Device, const char *Name);
+ virtual void OsdClear(void);
public:
cText2SkinStatus(void);
diff --git a/xml/string.c b/xml/string.c
index 594b4b6..e0b1303 100644
--- a/xml/string.c
+++ b/xml/string.c
@@ -1,5 +1,5 @@
/*
- * $Id: string.c,v 1.4 2005/01/01 23:44:36 lordjaxom Exp $
+ * $Id: string.c,v 1.5 2005/01/02 16:54:41 lordjaxom Exp $
*/
#include "xml/string.h"
@@ -49,6 +49,25 @@ std::string txToken::Token(const txToken &Token)
cxString::cxString(cxSkin *Skin):
mSkin(Skin)
{
+ mStrings.push_back(this);
+}
+
+cxString::~cxString()
+{
+ tStringList::iterator it = mStrings.begin();
+ while (it != mStrings.end()) {
+ if ((*it) == this) {
+ mStrings.erase(it);
+ break;
+ }
+ }
+}
+
+void cxString::Reparse(void)
+{
+ tStringList::iterator it = mStrings.begin();
+ while (it != mStrings.end())
+ (*it)->Parse();
}
bool cxString::Parse(const std::string &Text)
diff --git a/xml/string.h b/xml/string.h
index e97b5d4..fe7149c 100644
--- a/xml/string.h
+++ b/xml/string.h
@@ -1,5 +1,5 @@
/*
- * $Id: string.h,v 1.5 2005/01/01 23:44:36 lordjaxom Exp $
+ * $Id: string.h,v 1.6 2005/01/02 16:54:41 lordjaxom Exp $
*/
#ifndef VDR_TEXT2SKIN_XML_STRING_H
@@ -168,13 +168,19 @@ class cxSkin;
class cxString {
private:
+ typedef std::vector<cxString*> tStringList;
+ static tStringList mStrings;
+
std::string mText;
std::string mOriginal;
std::vector<txToken> mTokens;
cxSkin *mSkin;
public:
+ static void Reparse(void);
+
cxString(cxSkin *Skin);
+ ~cxString();
bool Parse(const std::string &Text);
bool Parse(void) { return Parse(mOriginal); }