summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Günther <tom@toms-cafe.de>2009-06-21 03:04:34 +0200
committerThomas Günther <tom@toms-cafe.de>2009-06-21 03:04:34 +0200
commitea25399458d35ca25e3477200baa1b393a577b37 (patch)
tree93d9b12177384e6aff92adb36342f02291444473
parentc51a331d720c7e2fb5252c6cf4c1ddd4b4b8a8a1 (diff)
downloadvdr-plugin-text2skin-ea25399458d35ca25e3477200baa1b393a577b37.tar.gz
vdr-plugin-text2skin-ea25399458d35ca25e3477200baa1b393a577b37.tar.bz2
Removed backward compatibility to VDR < 1.6.0 (closes #137)
-rw-r--r--HISTORY1
-rw-r--r--Makefile2
-rw-r--r--README22
-rw-r--r--README.de17
-rw-r--r--common.c95
-rw-r--r--common.h16
-rw-r--r--display.c51
-rw-r--r--display.h2
-rw-r--r--font.c5
-rw-r--r--graphtft/font.c163
-rw-r--r--graphtft/font.h9
-rw-r--r--i18n.c523
-rw-r--r--i18n.h21
-rw-r--r--loader.c13
-rw-r--r--loader.h2
-rw-r--r--menu.c8
-rw-r--r--patches/vdr-1.3.17-dvbplayer-buttons.diff10
-rw-r--r--patches/vdr-1.3.17-osdbase-maxitems.diff20
-rw-r--r--patches/vdr-1.3.9-osd.diff106
-rw-r--r--render.c6
-rw-r--r--setup.c8
-rw-r--r--setup.h4
-rw-r--r--status.c32
-rw-r--r--text2skin.c11
-rw-r--r--text2skin.h2
25 files changed, 27 insertions, 1122 deletions
diff --git a/HISTORY b/HISTORY
index 38c7aa5..0eb9483 100644
--- a/HISTORY
+++ b/HISTORY
@@ -72,6 +72,7 @@ ____-__-__: Version 1.3
- Corrected implementation of ReplayLanguageCode
- Updated FSF address in the license information
- Updated gettext language files
+- Removed backward compatibility to VDR < 1.6.0 (closes #137)
2009-06-01: Version 1.2
diff --git a/Makefile b/Makefile
index d4ba55c..382595f 100644
--- a/Makefile
+++ b/Makefile
@@ -170,4 +170,4 @@ dist: clean
@echo Distribution package created as $(PACKAGE).tgz
clean:
- @-rm -f $(OBJS) $(DEPFILE) *.so $(I18Npot) *.tgz core* *~ SKINS SKINS.de
+ @-rm -f $(OBJS) $(DEPFILE) *.so $(I18Npot) *.tgz core* *~
diff --git a/README b/README
index 54f72fc..ef4ad30 100644
--- a/README
+++ b/README
@@ -33,7 +33,7 @@ No library
- you can only load XPM files
- XPMs don't support partial transparency / alpha channels
-ImageMagick
+ImageMagick
+ you can load many different image types including animations
Imlib2
@@ -56,28 +56,16 @@ Installation:
Install text2skin like any other plugin. In this example I assume that you have
changed to the folder where the VDR sourcecode is located, and that it is
-version 0.0.1 of the plugin you wish to install. During the build process,
-there will be generated two files called SKINS and SKINS.de, the skin format
-documentation.
+version 1.2 of the plugin you wish to install.
root@linux # cd PLUGINS/src
-root@linux # wget http://www.magoa.net/linux/contrib/vdr-text2skin-1.0.tgz
-root@linux # tar -xfz vdr-text2skin-1.0.tgz
+root@linux # wget http://projects.vdr-developer.org/attachments/download/112/vdr-text2skin-1.2.tgz
+root@linux # tar -xzf vdr-text2skin-1.2.tgz
+root@linux # ln -s text2skin-1.2 text2skin
root@linux # cd ../..
root@linux # make plugins
root@linux # ./vdr -P text2skin
-There are several patches included, which can be applied to VDR, but all of
-them are considered optional.
-
-vdr-1.3.17-dvbplayer-buttons.diff
- - demonstration on how to use the colorbuttons in replay mode (no skin makes
- use of that so far)
-
-vdr-1.3.17-osdbase-maxitems.diff
- - allows dynamic height menu lists, i.e. when some part of the list is
- overpainted with a special message
-
Where to put the skins:
-----------------------
diff --git a/README.de b/README.de
index c3e3f9a..934695f 100644
--- a/README.de
+++ b/README.de
@@ -35,7 +35,7 @@ Nachteile jeder möglichen Lösung:
Keine Bibliothek
- Sie können nur XPM Dateien laden
- XPMs haben weder Teiltransparenzen noch Alphakanäle
-
+
ImageMagick
+ Sie können viele verschiedene Bildformate laden
- ist aber etwas langsamer als Imlib2
@@ -56,23 +56,16 @@ Installation:
Installieren Sie text2skin wie jedes andere Plugin. In diesem Beispiel nehme
ich an Sie sind in den Ordner gewechselt, in dem VDR's Quelltext liegt, und
-Sie wollen Version 0.0.1 des Plugins installieren.
+Sie wollen Version 1.2 des Plugins installieren.
root@linux # cd PLUGINS/src
-root@linux # wget http://www.magoa.net/linux/contrib/vdr-text2skin-0.0.1.tgz
-root@linux # tar -xfz vdr-text2skin-0.0.1.tgz
-root@linux # ln -s text2skin-0.0.1 text2skin
+root@linux # wget http://projects.vdr-developer.org/attachments/download/112/vdr-text2skin-1.2.tgz
+root@linux # tar -xzf vdr-text2skin-1.2.tgz
+root@linux # ln -s text2skin-1.2 text2skin
root@linux # cd ../..
root@linux # make plugins
root@linux # ./vdr -P text2skin
-Wenn Sie VDR 1.3.9 benutzen, müssen Sie auch noch einen Patch anwenden. Dieser
-Patch wird in VDR 1.3.10 aber enthalten sein.
-
-root@linux # patch -p1 < PLUGINS/src/text2skin/patches/vdr-1.3.9-osd.diff
-root@linux # make vdr
-root@linux # ./vdr -P text2skin
-
Wo die Skins hingehören:
------------------------
diff --git a/common.c b/common.c
index 728dedb..a536ffd 100644
--- a/common.c
+++ b/common.c
@@ -39,13 +39,6 @@ const char *ChannelName(const cChannel *Channel, int Number)
snprintf(buffer, sizeof(buffer), "%s", Channel->Name());
else if (!Number)
snprintf(buffer, sizeof(buffer), "%s", trVDR("*** Invalid Channel ***"));
-
-#if VDRVERSNUM < 10315
- char *ptr;
- if ((ptr = strchr(buffer, ',')) != NULL
- || (ptr = strchr(buffer, ';')) != NULL)
- *ptr = '\0';
-#endif
return buffer;
}
@@ -54,25 +47,9 @@ const char *ChannelShortName(const cChannel *Channel, int Number)
static char buffer[256];
buffer[0] = '\0';
if (Channel)
-#if VDRVERSNUM < 10315
- snprintf(buffer, sizeof(buffer), "%s", Channel->Name());
-#else
snprintf(buffer, sizeof(buffer), "%s", Channel->ShortName(true));
-#endif
else if (!Number)
snprintf(buffer, sizeof(buffer), "%s", trVDR("*** Invalid Channel ***"));
-
-#if VDRVERSNUM < 10315
- char *ptr;
- if ((ptr = strchr(buffer, ',')) != NULL) {
- char *start = ptr + 1;
- if ((ptr = strchr(start, ';')) != NULL)
- *ptr = '\0';
- return start;
- } else if ((ptr = strchr(buffer, ';')) != NULL)
- *ptr = '\0';
-#endif
-
return buffer;
}
@@ -83,30 +60,6 @@ const char *EventType(uint Number)
snprintf(buffer, sizeof(buffer), "%d", Number);
return buffer;
}
-/*
-const char *ChannelBouquet(const cChannel *Channel, int Number) {
- static char buffer[256];
- buffer[0] = '\0';
- if (Channel)
-#if VDRVERSNUM < 10315
- snprintf(buffer, sizeof(buffer), "%s", Channel->Name());
-#else
- snprintf(buffer, sizeof(buffer), "%s", Channel->Provider());
-#endif
- else if (!Number)
- snprintf(buffer, sizeof(buffer), "%s", tr("*** Invalid Channel ***"));
-
-#if VDRVERSNUM < 10315
- char *ptr;
- if ((ptr = strchr(buffer, ';')) != NULL)
- return ptr + 1;
- else
- return "";
-#else
- return buffer;
-#endif
-}
-*/
bool StoppedTimer(const char *Name)
{
@@ -269,54 +222,10 @@ std::string AddExtInfoToDescription(const char *Title, const char *ShortText, co
}
int GetRecordingSize(const char *FileName)
-#if VDRVERSNUM >= 10338
-// use VDR's routine
{
const cRecording *rec = GetRecordingByFileName(FileName);
return (rec) ? DirSizeMB(FileName) : 0;
}
-#else
-// use our own approach
-{
- if (FileName != NULL) {
- bool bRet = false;
- long long size = 0;
- 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");
- int ret = 0;
- if (p) {
- char *s;
-
-#if VDRVERSNUM >= 10318
- while ((s = reader.Read(p)) != NULL) {
-#else
- while ((s = readline(p)) != NULL) {
-#endif
- if ((ret=stat(s, &fileinfo)) != -1) {
- size += (long long)fileinfo.st_size;
- nFiles++;
- }
- }
-
- bRet = true;
- }
-
- pclose(p);
- delete cmd;
-
- return (int)(size / 1024 / 1024); // [MB]
- }
- else
- return 0;
-}
-#endif
int GetRecordingLength(const char *FileName)
{
@@ -346,11 +255,7 @@ 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);
diff --git a/common.h b/common.h
index f596a01..c5f0645 100644
--- a/common.h
+++ b/common.h
@@ -20,24 +20,16 @@
# else
# define Dprintf(x...)
# endif
-# define Dbench(x) uint64_t bench_##x = time_ms()
-# define Ddiff(t,x) fprintf(stderr, "%s took %llu ms\n", t, time_ms() - bench_##x)
+# define Dbench(x) uint64_t bench_##x = cTimeMs::Now()
+# define Ddiff(t,x) fprintf(stderr, "%s took %llu ms\n", t, cTimeMs::Now() - bench_##x)
#else
# define Dprintf(x...)
# define Dbench(x)
# define Ddiff(t,x)
#endif
-#define DStartBench(x) uint64_t bench_##x = time_ms()
-#define DShowBench(t,x) fprintf(stderr, "%s took %llu ms\n", t, time_ms() - bench_##x)
-
-#if VDRVERSNUM >= 10318
-# define time_ms() cTimeMs::Now()
-# define Apid1() Apid(0)
-# define Apid2() Apid(1)
-# define Dpid1() Dpid(0)
-# define Dpid2() Dpid(1)
-#endif
+#define DStartBench(x) uint64_t bench_##x = cTimeMs::Now()
+#define DShowBench(t,x) fprintf(stderr, "%s took %llu ms\n", t, cTimeMs::Now() - bench_##x)
/* Check if a channel is a radio station. */
#define ISRADIO(x) ((x)->Vpid()==0||(x)->Vpid()==1||(x)->Vpid()==0x1fff)
diff --git a/display.c b/display.c
index 4bcce4c..15d0de3 100644
--- a/display.c
+++ b/display.c
@@ -130,22 +130,14 @@ cxType cText2SkinDisplayChannel::GetTokenData(const txToken &Token)
: (cxType)false;
case tChannelBouquet:
-#if VDRVERSNUM < 10315
- return false;
-#else
return mChannel != NULL
? (cxType)mChannel->Provider()
: (cxType)false;
-#endif
case tChannelPortal:
-#if VDRVERSNUM < 10315
- return false;
-#else
return mChannel != NULL
? (cxType)mChannel->PortalName()
: (cxType)false;
-#endif
case tChannelSource:
return mChannel != NULL
@@ -241,7 +233,6 @@ cxType cText2SkinDisplayChannel::GetTokenData(const txToken &Token)
: (cxType)false;
case tLanguage: {
-#if VDRVERSNUM >= 10318
cDevice *dev = cDevice::PrimaryDevice();
eTrackType trackType = dev->GetCurrentAudioTrack();
const tTrackId *track = dev->GetTrack(trackType);
@@ -252,17 +243,6 @@ cxType cText2SkinDisplayChannel::GetTokenData(const txToken &Token)
return (cxType)buffer.c_str();
}
return (cxType)false;
-#else
- int cur;
- const char **tracks = cDevice::PrimaryDevice()->GetAudioTracks(&cur);
- if (tracks) {
- int i = 0;
- while (tracks[i] != NULL)
- ++i;
- if (cur < i)
- return tracks[cur];
- }
-#endif
}
return false;
@@ -272,11 +252,11 @@ cxType cText2SkinDisplayChannel::GetTokenData(const txToken &Token)
case tHasMultilang:
case tChannelHasMultilang:
- return mChannel != NULL && mChannel->Apid2() != 0;
+ return mChannel != NULL && mChannel->Apid(1) != 0;
case tHasDolby:
case tChannelHasDolby:
- return mChannel != NULL && mChannel->Dpid1() != 0;
+ return mChannel != NULL && mChannel->Dpid(0) != 0;
case tIsEncrypted:
case tChannelIsEncrypted:
@@ -593,7 +573,6 @@ cxType cText2SkinDisplayReplay::GetTokenData(const txToken &Token)
return false;
case tLanguage: {
-#if VDRVERSNUM >= 10318
cDevice *dev = cDevice::PrimaryDevice();
eTrackType trackType = dev->GetCurrentAudioTrack();
const tTrackId *track = dev->GetTrack(trackType);
@@ -604,17 +583,6 @@ cxType cText2SkinDisplayReplay::GetTokenData(const txToken &Token)
return (cxType)buffer.c_str();
}
return (cxType)false;
-#else
- int cur;
- const char **tracks = cDevice::PrimaryDevice()->GetAudioTracks(&cur);
- if (tracks) {
- int i = 0;
- while (tracks[i] != NULL)
- ++i;
- if (cur < i)
- return tracks[cur];
- }
-#endif
}
return false;
@@ -1120,22 +1088,17 @@ cxType cText2SkinDisplayMenu::GetTokenData(const txToken &Token)
case tPresentDescription:
if (mEvent) {
if (ExtPresentDescription == "") {
-#if VDRVERSNUM >= 10344
// find corresponding timer
const char *aux = NULL;
for (cTimer *tim = Timers.First(); tim; tim = Timers.Next(tim))
if (tim->Event() == mEvent)
aux = tim->Aux();
ExtPresentDescription = AddExtInfoToDescription(mEvent->Title(), mEvent->ShortText(), mEvent->Description(), aux, Text2SkinSetup.StripAux);
-#else
- ExtPresentDescription = AddExtInfoToDescription(mEvent->Title(), mEvent->ShortText(), mEvent->Description());
-#endif
}
return (cxType)ExtPresentDescription;
} else
return (cxType)false;
-#if VDRVERSNUM >= 10318
case tPresentLanguageCode:
if (mEvent) {
const cComponents *components = mEvent->Components();
@@ -1198,7 +1161,6 @@ cxType cText2SkinDisplayMenu::GetTokenData(const txToken &Token)
}
}
return false;
-#endif
case tPresentEventID:
return mEvent != NULL
@@ -1255,7 +1217,6 @@ cxType cText2SkinDisplayMenu::GetTokenData(const txToken &Token)
case tMenuText:
return mText;
-#if VDRVERSNUM >= 10325
case tRecordingName:
return mRecording != NULL
? (cxType)mRecording->Name()
@@ -1294,11 +1255,7 @@ cxType cText2SkinDisplayMenu::GetTokenData(const txToken &Token)
case tRecordingDescription:
if (mRecording) {
if (ExtRecordingDescription == "")
-#if VDRVERSNUM >= 10344
ExtRecordingDescription = AddExtInfoToDescription(mRecording->Info()->Title(), mRecording->Info()->ShortText(), mRecording->Info()->Description(), Text2SkinSetup.ShowAux ? mRecording->Info()->Aux() : NULL, Text2SkinSetup.StripAux);
-#else
- ExtRecordingDescription = AddExtInfoToDescription(mRecording->Info()->Title(), mRecording->Info()->ShortText(), mRecording->Info()->Description());
-#endif
return (cxType)ExtRecordingDescription;
} else
return (cxType)false;
@@ -1365,7 +1322,6 @@ cxType cText2SkinDisplayMenu::GetTokenData(const txToken &Token)
}
}
return false;
-#endif
case tRecordingSize:
return mRecording != NULL
@@ -1387,7 +1343,6 @@ cxType cText2SkinDisplayMenu::GetTokenData(const txToken &Token)
}
}
-#if VDRVERSNUM >= 10318
// --- cText2SkinDisplayTracks ------------------------------------------------
const std::string ChannelNames[] = { "", "stereo", "left", "right" };
@@ -1492,5 +1447,3 @@ cxType cText2SkinDisplayTracks::GetTokenData(const txToken &Token)
return cText2SkinRender::GetTokenData(Token);
}
}
-
-#endif
diff --git a/display.h b/display.h
index 23c8d89..8326962 100644
--- a/display.h
+++ b/display.h
@@ -208,7 +208,6 @@ inline void cText2SkinDisplayMenu::Flush(void)
cText2SkinRender::Flush();
}
-#if VDRVERSNUM >= 10318
class cText2SkinDisplayTracks: public cSkinDisplayTracks, public cText2SkinRender {
private:
int mMaxItems;
@@ -246,6 +245,5 @@ inline bool cText2SkinDisplayTracks::HasTabText(int Index, int n)
return mItems[Index].length() > 0;
return false;
}
-#endif
#endif // VDR_TEXT2SKIN_SKIN_H
diff --git a/font.c b/font.c
index 706ab23..78c5cc7 100644
--- a/font.c
+++ b/font.c
@@ -31,13 +31,8 @@ const cFont *cText2SkinFont::Load(const std::string &Path, const std::string &Fi
const cFont *res = NULL;
#ifdef HAVE_FREETYPE
char *cachename;
-#if VDRVERSNUM >= 10507
asprintf(&cachename, "%s_%d_%d_%d", Filename.c_str(), Size, Width, I18nCurrentLanguage());
if (mFontCache.Load(Path + "/" + Filename, cachename, Size, I18nCurrentLanguage(), Width))
-#else
- asprintf(&cachename, "%s_%d_%d_%d", Filename.c_str(), Size, Width, Setup.OSDLanguage);
- if (mFontCache.Load(Path + "/" + Filename, cachename, Size, Setup.OSDLanguage, Width))
-#endif
res = mFontCache.GetFont(cachename);
else
esyslog("ERROR: Text2Skin: Couldn't load font %s:%d", Filename.c_str(), Size);
diff --git a/graphtft/font.c b/graphtft/font.c
index d61a4b3..278e9dc 100644
--- a/graphtft/font.c
+++ b/graphtft/font.c
@@ -40,165 +40,11 @@ bool cGraphtftFont::Load(string Filename, string CacheName, int Size, int Langua
{
if ( _cache.find(CacheName) != _cache.end() )
return true;
-
-#if VDRVERSNUM < 10503
- int error = FT_New_Face(_library, Filename.c_str(), format, &_face);
-
- // every thing ok?
- if (error == FT_Err_Unknown_File_Format)
- {
- esyslog("ERROR: Font file (%s) could be opened and read, but it appears that its font format is unsupported", Filename.c_str());
- return false;
- }
- else if (error)
- {
- esyslog("ERROR: Font file (%s) could be opened or read, or simply it is broken", Filename.c_str());
- return false;
- }
-
- // set slot
- _slot = _face->glyph;
-
- if (Width > 0)
- Width = Size * Width / 100;
-
- // set Size
- FT_Set_Char_Size
- (
- _face, // handle to face object
- Width*64, // char_width in 1/64th of points
- Size*64, // char_height in 1/64th of points
- 0, // horizontal device resolution (dpi)
- 0 // vertical device resolution (dpi)
- );
-
- iconv_t cd;
- char from_code[255];
- wchar_t utf_buff[256];
-
- // XXX: Get this values from i18n
- switch(Language) {
- case 11:
- strcpy(from_code,"ISO8859-7");
- break;
- case 13:
- case 17:
- strcpy(from_code,"ISO8859-2");
- break;
- case 16:
- strcpy(from_code,"ISO8859-5");
- break;
- default :
- strcpy(from_code,"ISO8859-15");
- break;
- }
-
- if ((cd = iconv_open("WCHAR_T",from_code)) == (iconv_t)-1) {
- esyslog("ERROR: Iconv encoding not supported: %m");
- return false; //encoding no supportet
- }
-
- for (int c = 0; c < 256; c++) {
-
- char char_buff = c;
- wchar_t wchar_buff;
-
- char *in_buff,*out_buff;
- size_t in_len, out_len, count;
-
- in_len=1; out_len=4;
- in_buff=(char*)&char_buff;
- out_buff=(char *)&wchar_buff;
- count = iconv(cd,&in_buff,&in_len,&out_buff,&out_len);
- if ( (size_t)-1 == count ){
- //printf("ERROR - PREPARING TABLE CHAR %d \n", c);
- utf_buff[c] = 0;
- }
- utf_buff[c] = wchar_buff;
- }
- iconv_close(cd);
-
- cFont::tPixelData value;
- int num_rows_global = (_face->size->metrics.height / 64 )+1;
- int num_rows = num_rows_global + 2;
-
- cFont::tPixelData * font_data = new cFont::tPixelData[225 * num_rows];
-
- for (int i = 0; i < 225; i++)
- for (int j = 0; j < num_rows; j++)
- font_data[(i*num_rows)+j]=0x0000000000000000;
-
- // Time to put char 32..255 in font_data
- FT_UInt glyph_index;
- for ( int num_char = 32, num_char_array = 0; num_char < 256; num_char++, num_char_array++ )
- {
-
- //Get FT char index
- glyph_index = FT_Get_Char_Index( _face, utf_buff[num_char] );
-
- //Load the char
- error = FT_Load_Glyph( _face, glyph_index, FT_LOAD_DEFAULT );
- if ( error ) continue; /* ignore errors */
-
- // now, convert to vdr font data
- int width = (_slot->metrics.horiAdvance / 64) + 1;
- int bearingX = (_slot->metrics.horiBearingX / 64) +1;
- width = (width > (int)sizeof(cFont::tPixelData) * 8) ? (((int)sizeof(cFont::tPixelData) * 8)-2) :width ;
-
- font_data[(num_char_array*num_rows)+0]=width;
- font_data[(num_char_array*num_rows)+1]=num_rows_global;
-
- // convert to a mono bitmap
- error = FT_Render_Glyph( _face->glyph, ft_render_mode_mono );
- if ( error ) continue;
-
- int top = _slot->bitmap_top;
- int y_off = Size - top;
-
- unsigned char *bmp = _slot->bitmap.buffer;
-
- for (int y = 0; y < _slot->bitmap.rows; ++y , y_off++) {
- int pos = 0;
- int bit = 0x80;
- value = 0x00;
-
- for (int x = 0; x < _slot->bitmap.width; ++x) {
- if (bmp[pos] & bit && x < width + 1 )
- value = value | (cFont::tPixelData)1 << width - bearingX - x ;
-
- bit >>= 1;
- if (bit == 0) {
- bit = 0x80;
- ++pos;
- }
- }
- bmp += _slot->bitmap.pitch;
- font_data[(num_char_array*num_rows)+y_off+2] = value;
- }
-
- }
- // If all was ok, put the vdr font into the cache and return true
- cFont* newFont = NULL;
- newFont = new cFont(font_data);
- if (newFont) {
- _cache[CacheName] = newFont;
- _del[CacheName] = font_data;
- return true;
- }
- delete(font_data);
- // Something went wrong!
- return false;
-#else
-#if VDRVERSNUM < 10504
- cFont* newFont = new cFreetypeFont(*AddDirectory(FONTDIR, Filename.c_str()), Size);
-#else
cFont* newFont = cFont::CreateFont(Filename.c_str(), Size);
-#endif
if ( newFont == NULL )
return false;
_cache[CacheName] = newFont;
return true;
-#endif
}
const cFont* cGraphtftFont::GetFont(string CacheName){
@@ -221,13 +67,4 @@ void cGraphtftFont::Clear()
for (; it != _cache.end(); ++it)
delete((*it).second);
_cache.clear();
-
-#if VDRVERSNUM < 10503
- del_map::iterator del_it = _del.begin();
- for (; del_it != _del.end(); ++del_it)
- delete((*del_it).second);
- _del.clear();
-#endif
}
-
-cGraphtftFont GraphtftFont;
diff --git a/graphtft/font.h b/graphtft/font.h
index 041baef..d8c804f 100644
--- a/graphtft/font.h
+++ b/graphtft/font.h
@@ -24,9 +24,6 @@ class cGraphtftFont
{
private:
typedef map<string,cFont*> cache_map;
-#if VDRVERSNUM < 10503
- typedef map<string,cFont::tPixelData*> del_map;
-#endif
public:
cGraphtftFont();
@@ -42,12 +39,6 @@ private:
FT_Face _face;
FT_GlyphSlot _slot;
cache_map _cache;
-#if VDRVERSNUM < 10503
- del_map _del;
-#endif
-
};
-extern cGraphtftFont GraphtftFont;
-
#endif
diff --git a/i18n.c b/i18n.c
index c36fb95..a03ecb7 100644
--- a/i18n.c
+++ b/i18n.c
@@ -5,527 +5,8 @@
#include "i18n.h"
#include <vdr/config.h>
-#if VDRVERSNUM < 10507
-const tI18nPhrase Phrases[] = {
- /*
- { "English",
- "Deutsch",
- "Slovenski",
- "Italiano",
- "Nederlands",
- "Português",
- "Français",
- "Norsk",
- "suomi", // this is not a typo - it's really lowercase!
- "Polski",
- "Español",
- "ÅëëçíéêÜ", // Greek
- "Svenska",
- "Românã",
- "Magyar",
- "Català",
- "ÀãááÚØÙ", // Russian
- "Hrvatski",
- "Eesti",
- "Dansk",
- },
- */
- { "Loader for text-based skins",
- "Lader für textbasierte Skins",
- "",
- "",
- "",
- "",
- "",
- "",
- "Helposti muokattavat ulkoasut",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
-#if VDRVERSNUM >= 10313
- "",
-#endif
-#if VDRVERSNUM >= 10316
- "",
-#endif
- },
- { "Flush image cache",
- "Bildspeicher leeren",
- "",
- "",
- "",
- "",
- "",
- "",
- "Tyhjennä kuvat välimuistista",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
-#if VDRVERSNUM >= 10313
- "",
-#endif
-#if VDRVERSNUM >= 10316
- "",
-#endif
- },
- { "Flushing image cache...",
- "Bildspeicher wird geleert...",
- "",
- "",
- "",
- "",
- "",
- "",
- "Tyhjennetään välimuistia...",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
-#if VDRVERSNUM >= 10313
- "",
-#endif
-#if VDRVERSNUM >= 10316
- "",
-#endif
- },
- { "RERUNS OF THIS SHOW",
- "WIEDERHOLUNGEN DIESER SENDUNG",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
-#if VDRVERSNUM >= 10313
- "",
-#endif
-#if VDRVERSNUM >= 10316
- "",
-#endif
- },
- { "Scale factor of the tab-widths [%]",
- "Skalierungsfaktor für die Tabolatorweiten [%]",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
-#if VDRVERSNUM >= 10313
- "",
-#endif
-#if VDRVERSNUM >= 10316
- "",
-#endif
- },
- { "Scrolling behaviour",
- "Scroll-Verhalten",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
-#if VDRVERSNUM >= 10313
- "",
-#endif
-#if VDRVERSNUM >= 10316
- "",
-#endif
- },
- { "Show scrollbar in the menus",
- "Zeige Bildlaufleiste in Menüs",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
-#if VDRVERSNUM >= 10313
- "",
-#endif
-#if VDRVERSNUM >= 10316
- "",
-#endif
- },
- { "Reset Marquee for new item",
- "Marquee für neues Item zurücksetzen",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
-#if VDRVERSNUM >= 10313
- "",
-#endif
-#if VDRVERSNUM >= 10316
- "",
-#endif
- },
- { "Use 'epgsearch' to check timer-conflicts",
- "Timerkonflikte mit 'epgsearch' überprüfen",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
-#if VDRVERSNUM >= 10313
- "",
-#endif
-#if VDRVERSNUM >= 10316
- "",
-#endif
- },
- { "to the left",
- "nach links",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
-#if VDRVERSNUM >= 10313
- "",
-#endif
-#if VDRVERSNUM >= 10316
- "",
-#endif
- },
- { "left and right",
- "links und rechts",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
-#if VDRVERSNUM >= 10313
- "",
-#endif
-#if VDRVERSNUM >= 10316
- "",
-#endif
- },
- { "AUXILIARY INFOS",
- "ZUSATZINFOS",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
-#if VDRVERSNUM >= 10313
- "",
-#endif
-#if VDRVERSNUM >= 10316
- "",
-#endif
- },
- { "Auxiliary infos in recordings/timers",
- "Zusatzinfos bei Aufnahmen/Timer anzeigen",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
-#if VDRVERSNUM >= 10313
- "",
-#endif
-#if VDRVERSNUM >= 10316
- "",
-#endif
- },
- { " Extract known tags",
- " Bekannte Tags extrahieren",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
-#if VDRVERSNUM >= 10313
- "",
-#endif
-#if VDRVERSNUM >= 10316
- "",
-#endif
- },
- { "Search timer",
- "Suchtimer",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
-#if VDRVERSNUM >= 10313
- "",
-#endif
-#if VDRVERSNUM >= 10316
- "",
-#endif
- },
- { "Max. image cache size",
- "Max. Größe des Bildspeichers",
- "",
- "",
- "",
- "",
- "",
- "",
- "Välimuistin maksimikoko",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
-#if VDRVERSNUM >= 10313
- "",
-#endif
-#if VDRVERSNUM >= 10316
- "",
-#endif
- },
- { "Skin too large or incorrectly aligned",
- "Skin zu groß oder nicht korrekt ausgerichtet",
- "",
- "",
- "",
- "",
- "",
- "",
- "Ulkoasu on liian suuri tai väärin asemoitu",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
-#if VDRVERSNUM >= 10313
- "",
-#endif
-#if VDRVERSNUM >= 10316
- "",
-#endif
- },
- { NULL }
-};
-#endif
-
-#if VDRVERSNUM >= 10507
-cText2SkinI18n::cText2SkinI18n(const char *Skin) {
+cText2SkinI18n::cText2SkinI18n(const char *Skin)
+{
mIdentity = std::string("vdr-"PLUGIN_NAME_I18N"-") + Skin;
I18nRegister(mIdentity.substr(mIdentity.find('-') + 1).c_str());
-#else
-cText2SkinI18n::cText2SkinI18n(const char *Skin): cText2SkinFile(Skin) {
- mIdentity = (std::string)"text2skin_" + Skin;
- mNumPhrases = 0;
- mPhrases = (tI18nPhrase*)malloc(sizeof(tI18nPhrase));
- memset(mPhrases[mNumPhrases], 0, sizeof(tI18nPhrase));
-#endif
-}
-
-#if VDRVERSNUM < 10507
-cText2SkinI18n::~cText2SkinI18n() {
- for (int i = 0; mPhrases[i][0]; ++i) {
- for (int j = 0; j < I18nNumLanguages; ++j)
- free((void*)mPhrases[i][j]);
- }
- free(mPhrases);
-}
-
-bool cText2SkinI18n::Parse(const char *Text) {
- int l = strlen(Text);
- bool result = false;
- if (l) {
- if (strncmp(Text, "Item=Translation,", 17) == 0) {
- int i;
- tI18nPhrase p;
- memset(&p, 0, sizeof(tI18nPhrase));
- Text += 17;
-
- for (i = 0; i < I18nNumLanguages; ++i) {
- char *langs = strdup(I18nLanguageCode(i));
- char *ptr = langs, *ep;
- std::string text;
- p[i] = strdup("");
- do {
- if ((ep = strchr(ptr, ',')) != NULL)
- *ep = '\0';
- if (ParseVar(Text, ptr, text)) {
- free((void*)p[i]);
- p[i] = strdup(text.c_str());
- }
- ptr = ep + 1;
- } while (ep != NULL);
- free(langs);
- }
-
- int idx = mNumPhrases++;
- for (i = 0; i < I18nNumLanguages; ++i)
- if (!p[i]) p[i] = "";
- mPhrases = (tI18nPhrase*)realloc(mPhrases, (mNumPhrases + 1) * sizeof(tI18nPhrase));
- memcpy(mPhrases[idx], p, sizeof(tI18nPhrase));
- memset(mPhrases[mNumPhrases], 0, sizeof(tI18nPhrase));
- result = true;
- } else
- esyslog("ERROR: text2skin: syntax error");
- }
- return result;
-}
-
-bool cText2SkinI18n::Load(const std::string &Filename) {
- if (cText2SkinFile::Load(Filename)) {
- I18nRegister(mPhrases, mIdentity.c_str());
- return true;
- }
- return false;
}
-#endif
diff --git a/i18n.h b/i18n.h
index 821e7c1..21b4457 100644
--- a/i18n.h
+++ b/i18n.h
@@ -9,33 +9,12 @@
#include "file.h"
#include <vdr/i18n.h>
-#if VDRVERSNUM < 10507
-#define trNOOP(s) (s)
-#define trVDR(s) tr(s)
-
-extern const tI18nPhrase Phrases[];
-
-class cText2SkinI18n: public cText2SkinFile {
-#else
class cText2SkinI18n {
-#endif
private:
std::string mIdentity;
-#if VDRVERSNUM < 10507
- tI18nPhrase *mPhrases;
- int mNumPhrases;
-
-protected:
- virtual bool Parse(const char *Text);
-#endif
public:
cText2SkinI18n(const char *Skin);
-#if VDRVERSNUM < 10507
- virtual ~cText2SkinI18n();
-
- virtual bool Load(const std::string &Filename);
-#endif
std::string Translate(const std::string &Text) { return I18nTranslate(Text.c_str(), mIdentity.c_str()); }
};
diff --git a/loader.c b/loader.c
index c8888c5..5084faf 100644
--- a/loader.c
+++ b/loader.c
@@ -34,18 +34,7 @@ void cText2SkinLoader::Start(void) {
}
void cText2SkinLoader::Load(const char *Skin) {
-#if VDRVERSNUM >= 10507
cText2SkinI18n *translations = new cText2SkinI18n(Skin);
-#else
- cText2SkinI18n *translations = NULL;
- std::string transfile = SkinPath() + "/" + Skin + "/" + Skin + ".trans";
- if (access(transfile.c_str(), F_OK) == 0) {
- translations = new cText2SkinI18n(Skin);
- if (!translations->Load(transfile))
- DELETENULL(translations);
- }
-#endif
-
cText2SkinTheme *theme = new cText2SkinTheme(Skin);
std::string themefile = SkinPath() + "/" + Skin + "/" + Skin + ".colors";
theme->Load(themefile);
@@ -111,10 +100,8 @@ cSkinDisplayMessage *cText2SkinLoader::DisplayMessage(void)
return new cText2SkinDisplayMessage(this);
}
-#if VDRVERSNUM >= 10318
cSkinDisplayTracks *cText2SkinLoader::DisplayTracks(const char *Title, int NumTracks,
const char * const *Tracks)
{
return new cText2SkinDisplayTracks(this, Title, NumTracks, Tracks);
}
-#endif
diff --git a/loader.h b/loader.h
index 16743af..08334cb 100644
--- a/loader.h
+++ b/loader.h
@@ -32,10 +32,8 @@ public:
virtual cSkinDisplayMenu *DisplayMenu(void);
virtual cSkinDisplayReplay *DisplayReplay(bool ModeOnly);
virtual cSkinDisplayVolume *DisplayVolume(void);
-#if VDRVERSNUM >= 10318
virtual cSkinDisplayTracks *DisplayTracks(const char *Title, int NumTracks,
const char * const *Tracks);
-#endif
virtual cSkinDisplayMessage *DisplayMessage(void);
cxSkin *Data(void) const { return mData; }
diff --git a/menu.c b/menu.c
index 067ff7b..7a80281 100644
--- a/menu.c
+++ b/menu.c
@@ -19,15 +19,11 @@ void cText2SkinSetupPage::Setup(void) {
Add(new cMenuEditBoolItem(tr("Show scrollbar in the menus"), &mData.MenuScrollbar));
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));
-#if VDRVERSNUM >= 10344
Add(new cMenuEditBoolItem(tr("Show auxiliary infos of recordings"), &mData.ShowAux));
if (mData.ShowAux)
// TRANSLATORS: note the leading blanks!
Add(new cMenuEditBoolItem(tr(" Extract known tags"), &mData.StripAux));
-#endif
-#if VDRVERSNUM >= 10330
Add(new cMenuEditBoolItem(tr("Use 'epgsearch' to check timer-conflicts"), &mData.CheckTimerConflict));
-#endif
Add(new cOsdItem(tr("Flush image cache"), osUser1));
Add(new cMenuEditIntItem(tr("Max. image cache size"), &mData.MaxCacheFill));
@@ -42,13 +38,9 @@ void cText2SkinSetupPage::Store(void) {
SetupStore("MenuScrollbar", mData.MenuScrollbar);
SetupStore("MarqueeLeftRight", mData.MarqueeLeftRight);
SetupStore("MarqueeReset", mData.MarqueeReset);
-#if VDRVERSNUM >= 10344
SetupStore("ShowAux", mData.ShowAux);
SetupStore("StripAux", mData.StripAux);
-#endif
-#if VDRVERSNUM >= 10330
SetupStore("CheckTimerConflict", mData.CheckTimerConflict);
-#endif
SetupStore("MaxCacheFill", mData.MaxCacheFill);
Text2SkinSetup = mData;
}
diff --git a/patches/vdr-1.3.17-dvbplayer-buttons.diff b/patches/vdr-1.3.17-dvbplayer-buttons.diff
deleted file mode 100644
index dc72164..0000000
--- a/patches/vdr-1.3.17-dvbplayer-buttons.diff
+++ /dev/null
@@ -1,10 +0,0 @@
---- menu.c.orig Fri Dec 17 18:31:27 2004
-+++ menu.c Fri Dec 17 18:37:18 2004
-@@ -3331,6 +3331,7 @@
- if (Initial) {
- if (title)
- displayReplay->SetTitle(title);
-+ displayReplay->SetButtons(tr("Jump"), tr("Skip +60s"), tr("Skip -60s"), tr("Button$Stop"));
- lastCurrent = lastTotal = -1;
- }
- if (Total != lastTotal) {
diff --git a/patches/vdr-1.3.17-osdbase-maxitems.diff b/patches/vdr-1.3.17-osdbase-maxitems.diff
deleted file mode 100644
index 93534f7..0000000
--- a/patches/vdr-1.3.17-osdbase-maxitems.diff
+++ /dev/null
@@ -1,20 +0,0 @@
-diff -Nru vdr-1.3.18/osdbase.c vdr-1.3.18-maxitems/osdbase.c
---- vdr-1.3.18/osdbase.c Fri Jan 7 17:16:41 2005
-+++ vdr-1.3.18-maxitems/osdbase.c Thu Jan 20 15:44:43 2005
-@@ -180,6 +180,7 @@
- subMenu->Display();
- return;
- }
-+ displayMenuItems = displayMenu->MaxItems();
- displayMenu->SetMessage(mtStatus, NULL);
- displayMenu->Clear();
- cStatus::MsgOsdClear();
-@@ -279,6 +280,8 @@
- {
- int last = Count() - 1;
- int lastOnScreen = first + displayMenuItems - 1;
-+
-+ displayMenuItems = displayMenu->MaxItems();
-
- if (current < last) {
- int tmpCurrent = current;
diff --git a/patches/vdr-1.3.9-osd.diff b/patches/vdr-1.3.9-osd.diff
deleted file mode 100644
index 0da295b..0000000
--- a/patches/vdr-1.3.9-osd.diff
+++ /dev/null
@@ -1,106 +0,0 @@
-diff -Nru -x PLUGINS o/vdr-1.3.9/osd.c vdr-1.3.9/osd.c
---- o/vdr-1.3.9/osd.c 2004-05-28 17:33:22.000000000 +0200
-+++ vdr-1.3.9/osd.c 2004-06-05 17:25:33.036994648 +0200
-@@ -244,7 +246,7 @@
- return Result;
- }
-
--bool cBitmap::SetXpm(char *Xpm[])
-+bool cBitmap::SetXpm(char *Xpm[], bool IgnoreNone)
- {
- char **p = Xpm;
- int w, h, n, c;
-@@ -257,10 +259,11 @@
- return false;
- }
- int b = 0;
-- while (1 << (1 << b) < n)
-+ while (1 << (1 << b) < (IgnoreNone ? n - 1 : n))
- b++;
- SetBpp(1 << b);
- SetSize(w, h);
-+ int NoneColorIndex = MAXNUMCOLORS;
- for (int i = 0; i < n; i++) {
- const char *s = *++p;
- if (int(strlen(s)) < c) {
-@@ -273,14 +276,18 @@
- return false;
- }
- s = skipspace(s + 1);
-- if (strcasecmp(s, "none") == 0)
-- s = "#00000000";
-+ if (strcasecmp(s, "none") == 0) {
-+ s = "#00000000";
-+ NoneColorIndex = i;
-+ if (IgnoreNone)
-+ continue;
-+ }
- if (*s != '#') {
- esyslog("ERROR: unknown color code in XPM: '%c'", *s);
- return false;
- }
- tColor color = strtoul(++s, NULL, 16) | 0xFF000000;
-- SetColor(i, color);
-+ SetColor((IgnoreNone && i > NoneColorIndex) ? i - 1 : i, color);
- }
- for (int y = 0; y < h; y++) {
- const char *s = *++p;
-@@ -295,13 +302,17 @@
- return false;
- }
- if (strncmp(Xpm[i + 1], s, c) == 0) {
-- SetIndex(x, y, i);
-+ if (i == NoneColorIndex)
-+ NoneColorIndex = MAXNUMCOLORS;
-+ SetIndex(x, y, (IgnoreNone && i > NoneColorIndex) ? i - 1 : i);
- break;
- }
- }
- s += c;
- }
- }
-+ if (NoneColorIndex < MAXNUMCOLORS && !IgnoreNone)
-+ return SetXpm(Xpm, true);
- return true;
- }
-
-@@ -354,7 +365,8 @@
- int ch = Height ? Height : h;
- if (!Intersects(x, y, x + cw - 1, y + ch - 1))
- return;
-- DrawRectangle(x, y, x + cw - 1, y + ch - 1, ColorBg);
-+ if (ColorBg != clrTransparent)
-+ DrawRectangle(x, y, x + cw - 1, y + ch - 1, ColorBg);
- limit = x + cw - x0;
- if (Width) {
- if ((Alignment & taLeft) != 0)
-@@ -395,7 +408,8 @@
- for (int row = 0; row < h; row++) {
- cFont::tPixelData PixelData = CharData->lines[row];
- for (int col = CharData->width; col-- > 0; ) {
-- SetIndex(x + col, y + row, (PixelData & 1) ? fg : bg);
-+ if (ColorBg != clrTransparent || (PixelData & 1))
-+ SetIndex(x + col, y + row, (PixelData & 1) ? fg : bg);
- PixelData >>= 1;
- }
- }
-diff -Nru -x PLUGINS o/vdr-1.3.9/osd.h vdr-1.3.9/osd.h
---- o/vdr-1.3.9/osd.h 2004-05-29 16:02:47.000000000 +0200
-+++ vdr-1.3.9/osd.h 2004-06-05 17:15:17.809523440 +0200
-@@ -136,9 +136,15 @@
- bool LoadXpm(const char *FileName);
- ///< Calls SetXpm() with the data from the file FileName.
- ///< Returns true if the operation was successful.
-- bool SetXpm(char *Xpm[]);
-+ bool SetXpm(char *Xpm[], bool IgnoreNone = false);
- ///< Sets this bitmap to the given XPM data. Any previous bitmap or
- ///< palette data will be overwritten with the new data.
-+ ///< If IgnoreNone is true, a "none" color entry will be ignored.
-+ ///< Only set IgnoreNone to true if you know that there is a "none"
-+ ///< color entry in the XPM data and that this entry is not used!
-+ ///< If SetXpm() is called with IgnoreNone set to false and the XPM
-+ ///< data contains an unused "none" entry, it will be automatically
-+ ///< called again with IgnoreNone set to true.
- ///< Returns true if the operation was successful.
- void SetIndex(int x, int y, tIndex Index);
- ///< Sets the index at the given coordinates to Index.
diff --git a/render.c b/render.c
index 65b0ce7..80a83a2 100644
--- a/render.c
+++ b/render.c
@@ -131,7 +131,7 @@ cText2SkinRender::~cText2SkinRender()
void cText2SkinRender::Action(void)
{
bool to = true;
- uint start_time = time_ms();
+ uint start_time = cTimeMs::Now();
mActive = true;
UpdateLock();
mStarted.Broadcast();
@@ -143,7 +143,7 @@ void cText2SkinRender::Action(void)
else mDoUpdate.Wait(mDoUpdateMutex);
if (!mActive) break; // fall out if thread to be stopped
- mNow = time_ms();
+ mNow = cTimeMs::Now();
if (mUpdateIn) {
if (!to || mNow >= start_time + mUpdateIn) {
@@ -843,7 +843,6 @@ cxType cText2SkinRender::GetTokenData(const txToken &Token)
case tOsdHeight: return (cxType)mBaseSize.h;
-#if VDRVERSNUM >=10318
case tAudioTrack: {
cDevice *dev = cDevice::PrimaryDevice();
const tTrackId *Track = dev->GetTrack(dev->GetCurrentAudioTrack());
@@ -854,7 +853,6 @@ cxType cText2SkinRender::GetTokenData(const txToken &Token)
case tAudioChannel:
return cText2SkinDisplayTracks::ChannelName(cDevice::PrimaryDevice()->GetAudioChannel());
-#endif
default: return Text2SkinStatus.GetTokenData(Token);
}
diff --git a/setup.c b/setup.c
index 9abc238..8d959eb 100644
--- a/setup.c
+++ b/setup.c
@@ -12,13 +12,9 @@ cText2SkinSetup::cText2SkinSetup(void) {
MenuScrollbar = false;
MarqueeLeftRight = true;
MarqueeReset = false;
-#if VDRVERSNUM >= 10344
ShowAux = true;
StripAux = true;
-#endif
-#if VDRVERSNUM >= 10330
CheckTimerConflict = false;
-#endif
MaxCacheFill = 25;
}
@@ -26,13 +22,9 @@ bool cText2SkinSetup::SetupParse(const char *Name, const char *Value) {
if (strcmp(Name, "MenuScrollbar") == 0) MenuScrollbar = atoi(Value);
else if (strcmp(Name, "MarqueeLeftRight") == 0) MarqueeLeftRight = atoi(Value);
else if (strcmp(Name, "MarqueeReset") == 0) MarqueeReset = atoi(Value);
-#if VDRVERSNUM >= 10344
else if (strcmp(Name, "ShowAux") == 0) ShowAux = atoi(Value);
else if (strcmp(Name, "StripAux") == 0) StripAux = atoi(Value);
-#endif
-#if VDRVERSNUM >= 10330
else if (strcmp(Name, "CheckTimerConflict") == 0) CheckTimerConflict = atoi(Value);
-#endif
else if (strcmp(Name, "MaxCacheFill") == 0) MaxCacheFill = atoi(Value);
else return false;
return true;
diff --git a/setup.h b/setup.h
index ae77b1c..2fa90d0 100644
--- a/setup.h
+++ b/setup.h
@@ -16,13 +16,9 @@ public:
int MenuScrollbar;
int MarqueeLeftRight;
int MarqueeReset;
-#if VDRVERSNUM >= 10344
int ShowAux;
int StripAux;
-#endif
-#if VDRVERSNUM >= 10330
int CheckTimerConflict;
-#endif
int MaxCacheFill;
};
diff --git a/status.c b/status.c
index 7fb4dde..25dae2d 100644
--- a/status.c
+++ b/status.c
@@ -56,17 +56,10 @@ void cText2SkinStatus::Replaying(const cControl* /*Control*/, const char *Name,
mReplayIsShuffle = Name[2] == 'S';
}
}
-#if VDRVERSNUM >= 10338
else if (const cRecording *rec = GetRecordingByFileName(FileName)) {
mReplay = rec;
mReplayMode = replayNormal;
}
-#else
- else if (const cRecording *rec = GetRecordingByName(Name)) {
- mReplay = rec;
- mReplayMode = replayNormal;
- }
-#endif
else if (strcmp(Name, "DVD") == 0)
mReplayMode = replayDVD;
else if (strcmp(Name, "VCD") == 0)
@@ -122,13 +115,8 @@ void cText2SkinStatus::Recording(const cDevice *Device, const char *Name,
void cText2SkinStatus::OsdClear(void)
{
-#if VDRVERSNUM >= 10507
if (I18nCurrentLanguage() != mLastLanguage) {
mLastLanguage = I18nCurrentLanguage();
-#else
- if (Setup.OSDLanguage != mLastLanguage) {
- mLastLanguage = Setup.OSDLanguage;
-#endif
cxString::Reparse();
}
@@ -296,7 +284,6 @@ cxType cText2SkinStatus::GetTokenData(const txToken &Token)
: (cxType)false;
case tTimerConflicts:
-#if VDRVERSNUM >= 10330
if (Text2SkinSetup.CheckTimerConflict) {
if (mRender->mUpdate.timerConflict) {
Epgsearch_lastconflictinfo_v1_0 conflict;
@@ -309,11 +296,8 @@ cxType cText2SkinStatus::GetTokenData(const txToken &Token)
}
return mTimerConflicts;
} else
-#endif
return 0;
-#if VDRVERSNUM >= 10325
-#if VDRVERSNUM >= 10338
case tReplayName:
return mReplay != NULL
? (cxType)mReplay->Name()
@@ -333,19 +317,6 @@ cxType cText2SkinStatus::GetTokenData(const txToken &Token)
return mReplay != NULL
? (cxType)mReplay->Info()->Description()
: (cxType)false;
-#else
- case tReplayName:
- return (cxType)false;
-
- case tReplayDateTime:
- return (cxType)false;
-
- case tReplayShortText:
- return (cxType)false;
-
- case tReplayDescription:
- return (cxType)false;
-#endif
case tReplayLanguageCode:
if (mReplay) {
@@ -409,7 +380,6 @@ 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);
@@ -419,7 +389,7 @@ cxType cText2SkinStatus::GetTokenData(const txToken &Token)
: (cxType)false;
} else if (mRecordings.size() > 0) {
mRecordingsLock.Lock();
- uint now = time_ms();
+ uint now = cTimeMs::Now();
if (mNextRecording == 0)
mNextRecording = now + 2000;
else if (now >= mNextRecording) {
diff --git a/text2skin.c b/text2skin.c
index bd53f17..3ae6cc7 100644
--- a/text2skin.c
+++ b/text2skin.c
@@ -14,6 +14,10 @@
#include "loader.h"
#include "status.h"
+#if APIVERSNUM < 10600
+#error "VDR-1.6.0 API version or greater is required!"
+#endif
+
const char *cText2SkinPlugin::VERSION = "1.2";
const char *cText2SkinPlugin::SKINVERSION = "1.1";
const char *cText2SkinPlugin::DESCRIPTION = trNOOP("Loader for text-based skins");
@@ -24,7 +28,6 @@ cText2SkinPlugin::cText2SkinPlugin(void) {
cText2SkinPlugin::~cText2SkinPlugin() {
}
-#if VDRVERSNUM >= 10331
const char **cText2SkinPlugin::SVDRPHelpPages(void)
{
static const char *HelpPages[] = {
@@ -45,15 +48,9 @@ cString cText2SkinPlugin::SVDRPCommand(const char *Command, const char *Option,
}
return NULL;
}
-#endif
bool cText2SkinPlugin::Start(void) {
-#if VDRVERSNUM < 10507
- RegisterI18n(Phrases);
- Text2SkinStatus.SetLanguage(Setup.OSDLanguage);
-#else
Text2SkinStatus.SetLanguage(I18nCurrentLanguage());
-#endif
cText2SkinLoader::Start();
return true;
}
diff --git a/text2skin.h b/text2skin.h
index 19fa341..b239bfd 100644
--- a/text2skin.h
+++ b/text2skin.h
@@ -21,10 +21,8 @@ public:
virtual ~cText2SkinPlugin();
virtual const char *Version(void) { return VERSION; }
virtual const char *Description(void) { return tr(DESCRIPTION); }
-#if VDRVERSNUM >= 10331
virtual const char **SVDRPHelpPages(void);
virtual cString SVDRPCommand(const char *Command, const char *Option, int &ReplyCode);
-#endif
virtual bool Start(void);
virtual cMenuSetupPage *SetupMenu(void);
virtual bool SetupParse(const char *Name, const char *Value);