diff options
author | Andreas Brugger <brougs78@gmx.net> | 2006-01-07 12:00:00 +0100 |
---|---|---|
committer | Thomas Günther <tom@toms-cafe.de> | 2009-06-03 01:37:19 +0200 |
commit | eb6eaf285edd82c212810f066313f93dc4a8a129 (patch) | |
tree | ccd809304ccfaf710db31e5ba765b92961a821ca | |
parent | eeda27b9d069161db0261f6e2f51ac9463bde910 (diff) | |
download | vdr-plugin-text2skin-eb6eaf285edd82c212810f066313f93dc4a8a129.tar.gz vdr-plugin-text2skin-eb6eaf285edd82c212810f066313f93dc4a8a129.tar.bz2 |
2006-01-07: Version 1.1-cvs_ext-0.5 (vdr-text2skin-1.1-cvs_ext-0.5.diff)
- modifications to compile with vdr-versions >= 1.3.18
- added tokens:
OsdWidth, OsdHeight
- activating the token ReplayVideoAR
-rw-r--r-- | HISTORY | 7 | ||||
-rw-r--r-- | common.c | 10 | ||||
-rw-r--r-- | display.c | 8 | ||||
-rw-r--r-- | menu.c | 4 | ||||
-rw-r--r-- | render.c | 6 | ||||
-rw-r--r-- | status.c | 8 | ||||
-rw-r--r-- | status.h | 9 | ||||
-rw-r--r-- | text2skin.c | 2 | ||||
-rw-r--r-- | text2skin.h | 2 | ||||
-rw-r--r-- | xml/string.c | 2 | ||||
-rw-r--r-- | xml/string.h | 4 |
11 files changed, 48 insertions, 14 deletions
@@ -1,6 +1,13 @@ VDR Plugin 'text2skin' Revision History --------------------------------------- +2006-01-07: Version 1.1-cvs_ext-0.5 (vdr-text2skin-1.1-cvs_ext-0.5.diff) + +- modifications to compile with vdr-versions >= 1.3.18 +- added tokens: + OsdWidth, OsdHeight +- activating the token ReplayVideoAR + 2005-12-18: Version 1.1-cvs_ext-0.4 (vdr-text2skin-1.1-cvs_ext-0.4.diff) - modified the way, the current replayed recording is determined (status.c: @@ -128,7 +128,9 @@ int GetRecordingSize(const char *FileName) int nFiles; struct stat fileinfo; // Holds file information structure char *cmd = NULL; +#if VDRVERSNUM >= 10318 cReadLine reader; +#endif asprintf(&cmd, "find '%s' -follow -type f -name '*.*'|sort ", FileName); FILE *p = popen(cmd, "r"); @@ -137,7 +139,11 @@ int GetRecordingSize(const char *FileName) { char *s; +#if VDRVERSNUM >= 10318 while ((s = reader.Read(p)) != NULL) +#else + while ((s = readline(p)) != NULL) +#endif { if ((ret=stat(s, &fileinfo)) != -1) { @@ -188,7 +194,11 @@ int GetRecordingLength(const char *FileName) } last = (buf.st_size + delta) / sizeof(tIndex) - 1; char hour[2], min[3]; +#if VDRVERSNUM >= 10318 snprintf(RecLength, sizeof(RecLength), "%s", *IndexToHMSF(last, true)); +#else + snprintf(RecLength, sizeof(RecLength), "%s", IndexToHMSF(last, true)); +#endif snprintf(hour, sizeof(hour), "%c", RecLength[0]); snprintf(min, sizeof(min), "%c%c", RecLength[2], RecLength[3]); return (atoi(hour) * 60) + atoi(min); @@ -16,7 +16,7 @@ cText2SkinDisplayChannel::cText2SkinDisplayChannel(cText2SkinLoader *Loader, bool WithInfo): cText2SkinRender(Loader, WithInfo ? cxDisplay::channelInfo : cxDisplay::channelSmall), mFallbackDisplay(NULL), - mChannel(NULL), + mChannel(NULL), mNumber(0), mPresent(NULL), mFollowing(NULL), @@ -116,7 +116,9 @@ cxType cText2SkinDisplayChannel::GetTokenData(const txToken &Token) { switch (Token.Type) { case tChannelNumber: - return (cxType)ChannelNumber(mChannel, mNumber); + return mChannel != NULL + ? (cxType)ChannelNumber(mChannel, mNumber) + : (cxType)false; case tChannelName: return mChannel != NULL @@ -1088,6 +1090,7 @@ cxType cText2SkinDisplayMenu::GetTokenData(const txToken &Token) ? (cxType)mEvent->Description() : (cxType)false; +#if VDRVERSNUM >= 10318 case tPresentLanguageCode: if (mEvent) { @@ -1154,6 +1157,7 @@ cxType cText2SkinDisplayMenu::GetTokenData(const txToken &Token) } } return false; +#endif case tHasVPS: case tChannelHasVPS: @@ -11,7 +11,9 @@ cText2SkinSetupPage::cText2SkinSetupPage(void) { mData = Text2SkinSetup; Add(new cMenuEditBoolItem(tr("Scrolling behaviour"), &mData.MarqueeLeftRight, tr("to the left"), tr("left and right"))); Add(new cMenuEditBoolItem(tr("Reset Marquee for new item"), &mData.MarqueeReset, tr("no"), tr("yes"))); +#if VDRVERSNUM >= 10330 Add(new cMenuEditBoolItem(tr("Use 'timeline' to check timer-conflicts"), &mData.CheckTimerConflict, tr("no"), tr("yes"))); +#endif Add(new cOsdItem(tr("Flush image cache"), osUser1)); Add(new cMenuEditIntItem(tr("Max. image cache size"), &mData.MaxCacheFill)); } @@ -22,7 +24,9 @@ cText2SkinSetupPage::~cText2SkinSetupPage() { void cText2SkinSetupPage::Store(void) { SetupStore("MarqueeLeftRight", mData.MarqueeLeftRight); SetupStore("MarqueeReset", mData.MarqueeReset); +#if VDRVERSNUM >= 10330 SetupStore("CheckTimerConflict", mData.CheckTimerConflict); +#endif SetupStore("MaxCacheFill", mData.MaxCacheFill); Text2SkinSetup = mData; } @@ -679,7 +679,11 @@ cxType cText2SkinRender::GetTokenData(const txToken &Token) case tCanScrollDown: return mScroller != NULL && mScroller->CanScrollDown(); case tIsRecording: return cRecordControls::Active(); - + + case tOsdWidth: return (cxType)mBaseSize.w; + + case tOsdHeight: return (cxType)mBaseSize.h; + #if VDRVERSNUM >=10318 case tAudioTrack: { cDevice *dev = cDevice::PrimaryDevice(); @@ -267,6 +267,7 @@ cxType cText2SkinStatus::GetTokenData(const txToken &Token) : (cxType)false; case tTimerConflict: +#if VDRVERSNUM >= 10330 if (Text2SkinSetup.CheckTimerConflict) { bool conflict; @@ -291,7 +292,9 @@ cxType cText2SkinStatus::GetTokenData(const txToken &Token) { return false; } - +#endif + +#if VDRVERSNUM >= 10325 case tReplayName: return mReplay != NULL ? (cxType)mReplay->Name() @@ -356,7 +359,6 @@ cxType cText2SkinStatus::GetTokenData(const txToken &Token) } return false; - /* case tReplayVideoAR: if (mReplay) { @@ -378,7 +380,7 @@ cxType cText2SkinStatus::GetTokenData(const txToken &Token) } } return false; - */ +#endif case tCurrentRecording: Dprintf("token attrib type is: %d, number: %d\n", Token.Attrib.Type, Token.Attrib.Number); @@ -5,14 +5,11 @@ #ifndef VDR_TEXT2SKIN_STATUS_H #define VDR_TEXT2SKIN_STATUS_H -#ifndef __STL_CONFIG_H -#define __STL_CONFIG_H -#endif - -#include "common.h" -#include <vdr/status.h> #include <algorithm> #include <vector> +#include "common.h" +#include <vdr/status.h> + class cText2SkinRender; diff --git a/text2skin.c b/text2skin.c index 6ca80d0..cf4f618 100644 --- a/text2skin.c +++ b/text2skin.c @@ -24,6 +24,7 @@ cText2SkinPlugin::cText2SkinPlugin(void) { cText2SkinPlugin::~cText2SkinPlugin() { } +#if VDRVERSNUM >= 10330 bool cText2SkinPlugin::Service(const char *Id, void *Data) { if (strcmp(Id,"Text2Skin-TTF") == 0) { @@ -34,6 +35,7 @@ bool cText2SkinPlugin::Service(const char *Id, void *Data) } return false; } +#endif bool cText2SkinPlugin::Start(void) { RegisterI18n(Phrases); diff --git a/text2skin.h b/text2skin.h index e67366c..cdd95ca 100644 --- a/text2skin.h +++ b/text2skin.h @@ -21,7 +21,9 @@ public: virtual ~cText2SkinPlugin(); virtual const char *Version(void) { return VERSION; } virtual const char *Description(void) { return tr(DESCRIPTION); } +#if VDRVERSNUM >= 10330 virtual bool Service(const char *Id, void *Data); +#endif virtual bool Start(void); virtual cMenuSetupPage *SetupMenu(void); virtual bool SetupParse(const char *Name, const char *Value); diff --git a/xml/string.c b/xml/string.c index 76aa317..b8fc1f9 100644 --- a/xml/string.c +++ b/xml/string.c @@ -46,7 +46,7 @@ static const char *Tokens[__COUNT_TOKEN__] = { "MenuTitle", "MenuGroup", "IsMenuGroup", "MenuItem", "IsMenuItem", "MenuCurrent", "IsMenuCurrent", "MenuText", "RecordingName", "RecordingDateTime", "RecordingTitle", "RecordingShortText", "RecordingDescription", "RecordingLanguageCode", - "RecordingVideoAR", "RecordingSize", "RecordingLength", "RecordingCuttedLength", + "RecordingVideoAR", "RecordingSize", "RecordingLength", "RecordingCuttedLength", "OsdWidth", "OsdHeight", "RecordingLanguageDescription", "ButtonRed", "ButtonGreen", "ButtonYellow", "ButtonBlue", "CanScrollUp", "CanScrollDown" }; diff --git a/xml/string.h b/xml/string.h index 098e43b..68cd8fa 100644 --- a/xml/string.h +++ b/xml/string.h @@ -153,6 +153,8 @@ enum exToken { tRecordingSize, tRecordingLength, tRecordingCuttedLength, + tOsdWidth, + tOsdHeight, tRecordingLanguageDescription, // next four also in Channel and Replay display (if supported by vdr/plugin) tButtonRed, @@ -161,7 +163,7 @@ enum exToken { tButtonBlue, tCanScrollUp, tCanScrollDown, - + #define __COUNT_TOKEN__ (tCanScrollDown + 1) }; |