From dba0a8ba5a62412dd97ee048be0b1fb03a8a35f0 Mon Sep 17 00:00:00 2001 From: lordjaxom Date: Tue, 11 Jan 2005 18:02:11 +0000 Subject: - added attribute "clean" for ReplayTitle (remove [LS] in mp3 playback) - implemented AudioTrack and AudioChannel tokens for non-audioTracks-displays --- render.c | 26 +++++++++++++++++++++----- 1 file changed, 21 insertions(+), 5 deletions(-) diff --git a/render.c b/render.c index bdae6e8..6c14332 100644 --- a/render.c +++ b/render.c @@ -1,5 +1,5 @@ /* - * $Id: render.c,v 1.19 2005/01/07 23:57:17 lordjaxom Exp $ + * $Id: render.c,v 1.20 2005/01/11 18:02:11 lordjaxom Exp $ */ #include "render.h" @@ -9,6 +9,7 @@ #include "bitmap.h" #include "status.h" #include "screen.h" +#include "display.h" #include "scroller.h" #include "xml/display.h" #include @@ -555,6 +556,13 @@ cxType cText2SkinRender::GetToken(const txToken &Token) } Dprintf("MenuTitle result: |%s|\n", res.String().c_str()); } + else if (Token.Type == tReplayTitle) { + if (Text2SkinStatus.ReplayMode() == cText2SkinStatus::replayMP3) { + str.erase(0, 4); + res = str; + } + Dprintf("ReplayTitle result: |%s|\n", res.String().c_str()); + } } if (res.UpdateIn() > 0) { Dprintf("Passing token without cacheing\n"); @@ -590,9 +598,17 @@ cxType cText2SkinRender::GetTokenData(const txToken &Token) case tCanScrollDown: return mScroller != NULL && mScroller->CanScrollDown(); - //default: return txToken::Token(Token); // return literal token - default: break; - } + case tAudioTrack: { + cDevice *dev = cDevice::PrimaryDevice(); + const tTrackId *Track = dev->GetTrack(dev->GetCurrentAudioTrack()); + return Track + ? (cxType)Track->description + : (cxType)false; + } + + case tAudioChannel: + return cText2SkinDisplayTracks::ChannelName(cDevice::PrimaryDevice()->GetAudioChannel()); - return Text2SkinStatus.GetTokenData(Token); + default: return Text2SkinStatus.GetTokenData(Token); + } } -- cgit v1.2.3