diff options
author | lordjaxom <lordjaxom> | 2005-01-11 18:10:39 +0000 |
---|---|---|
committer | lordjaxom <lordjaxom> | 2005-01-11 18:10:39 +0000 |
commit | ae9409091e078744ecc57468e8438990f6dea625 (patch) | |
tree | 375d50390d477f93aae63fca0acb108fc1c20818 | |
parent | cbaec15384bf747fd64cdbc08b3925cdbed4a31a (diff) | |
download | vdr-plugin-text2skin-ae9409091e078744ecc57468e8438990f6dea625.tar.gz vdr-plugin-text2skin-ae9409091e078744ecc57468e8438990f6dea625.tar.bz2 |
- implemented ReplayShuffle and ReplayLoop items
- moved OsdClear() for cosmetic reasons
-rw-r--r-- | status.c | 37 | ||||
-rw-r--r-- | status.h | 6 |
2 files changed, 31 insertions, 12 deletions
@@ -1,5 +1,5 @@ /* - * $Id: status.c,v 1.5 2005/01/07 21:49:23 lordjaxom Exp $ + * $Id: status.c,v 1.6 2005/01/11 18:10:39 lordjaxom Exp $ */ #include "status.h" @@ -14,6 +14,8 @@ cText2SkinStatus Text2SkinStatus; cText2SkinStatus::cText2SkinStatus(void): mRender(NULL), mReplayMode(replayNone), + mReplayIsLoop(false), + mReplayIsShuffle(false), mRecordings(), mCurrentRecording(0), mNextRecording(0), @@ -44,8 +46,11 @@ void cText2SkinStatus::Replaying(const cControl* /*Control*/, const char *Name) if (Name[i] == ' ' && Name[i-1] == ')') break; } - if (Name[i]) // replaying mp3 - mReplayMode = replayMP3; + if (Name[i]) { // replaying mp3 + mReplayMode = replayMP3; + mReplayIsLoop = Name[1] == 'L'; + mReplayIsShuffle = Name[2] == 'S'; + } } else if (GetRecordingByName(Name) != NULL) mReplayMode = replayNormal; @@ -67,8 +72,11 @@ void cText2SkinStatus::Replaying(const cControl* /*Control*/, const char *Name) mReplayMode = replayDVD; } } - } else + } else { mReplayMode = replayNone; + mReplayIsLoop = false; + mReplayIsShuffle = false; + } if (mRender != NULL) { if (mReplayMode != oldMode) @@ -101,6 +109,14 @@ void cText2SkinStatus::Recording(const cDevice *Device, const char *Name) } } +void cText2SkinStatus::OsdClear(void) +{ + if (Setup.OSDLanguage != mLastLanguage) { + mLastLanguage = Setup.OSDLanguage; + cxString::Reparse(); + } +} + cxType cText2SkinStatus::GetTokenData(const txToken &Token) { switch (Token.Type) { @@ -134,16 +150,15 @@ cxType cText2SkinStatus::GetTokenData(const txToken &Token) } return false; + case tReplayIsLoop: + return mReplayIsLoop; + + case tReplayIsShuffle: + return mReplayIsShuffle; + default: break; }; return false; } - -void cText2SkinStatus::OsdClear(void) { - if (Setup.OSDLanguage != mLastLanguage) { - mLastLanguage = Setup.OSDLanguage; - cxString::Reparse(); - } -} @@ -1,5 +1,5 @@ /* - * $Id: status.h,v 1.3 2005/01/02 16:54:41 lordjaxom Exp $ + * $Id: status.h,v 1.4 2005/01/11 18:10:39 lordjaxom Exp $ */ #ifndef VDR_TEXT2SKIN_STATUS_H @@ -37,6 +37,8 @@ private: cText2SkinRender *mRender; eReplayMode mReplayMode; + bool mReplayIsLoop; + bool mReplayIsShuffle; tRecordings mRecordings; uint mCurrentRecording; uint mNextRecording; @@ -53,6 +55,8 @@ public: void SetRender(cText2SkinRender *Render); cxType GetTokenData(const txToken &Token); + + eReplayMode ReplayMode(void) const { return mReplayMode; } }; extern cText2SkinStatus Text2SkinStatus; |