From 53c06587dee00deeabdf75b0f124816ce793fc7d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20G=C3=BCnther?= Date: Wed, 22 Jul 2009 01:00:54 +0200 Subject: =?UTF-8?q?Added=20ReplayMode=20"audiocd"=20(thanks=20to=20Bj?= =?UTF-8?q?=C3=B6rn=20Sturzrehm=20-=20closes=20#138)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- HISTORY | 1 + render.c | 3 ++- status.c | 4 +++- status.h | 3 ++- 4 files changed, 8 insertions(+), 3 deletions(-) diff --git a/HISTORY b/HISTORY index 6b0e89a..0384f0f 100644 --- a/HISTORY +++ b/HISTORY @@ -97,6 +97,7 @@ ____-__-__: Version 1.3 closes #150) - Updated Italian language texts (thanks to Diego Pierotto / closes #153) - Fixed resetting of replay information (closes #156) +- Added ReplayMode "audiocd" (thanks to Björn Sturzrehm - closes #138) 2009-06-01: Version 1.2 diff --git a/render.c b/render.c index 6efd473..4cce312 100644 --- a/render.c +++ b/render.c @@ -772,7 +772,8 @@ cxType cText2SkinRender::GetToken(const txToken &Token) Dprintf("MenuTitle 'clean' result: |%s|\n", res.String().c_str()); } else if (Token.Type == tReplayTitle) { - if (Text2SkinStatus.ReplayMode() == cText2SkinStatus::replayMP3) { + if (Text2SkinStatus.ReplayMode() == cText2SkinStatus::replayMP3 + && str[0] == '[' && str[3] == ']') { str.erase(0, 4); res = str; } diff --git a/status.c b/status.c index 63c9f70..e59764e 100644 --- a/status.c +++ b/status.c @@ -10,7 +10,7 @@ #include const std::string ReplayNames[__REPLAY_COUNT__] = - { "", "normal", "mp3", "mplayer", "dvd", "vcd", "image" }; + { "", "normal", "mp3", "mplayer", "dvd", "vcd", "image", "audiocd" }; cText2SkinStatus Text2SkinStatus; @@ -70,6 +70,8 @@ void cText2SkinStatus::Replaying(const cControl* /*Control*/, const char *Name, mReplayMode = replayMPlayer; else if (strncmp(Name, "[image]", 7) == 0) mReplayMode = replayImage; + else if (strncmp(Name, "[cdda]", 6) == 0) + mReplayMode = replayAudioCd; else if (strlen(Name) > 7) { int i, n; for (i = 0, n = 0; Name[i]; ++i) { diff --git a/status.h b/status.h index f759645..07e9b73 100644 --- a/status.h +++ b/status.h @@ -20,8 +20,9 @@ public: replayDVD, replayVCD, replayImage, + replayAudioCd, -#define __REPLAY_COUNT__ (cText2SkinStatus::replayImage+1) +#define __REPLAY_COUNT__ (cText2SkinStatus::replayAudioCd+1) }; typedef std::string tRecordingInfo; -- cgit v1.2.3