diff options
| author | root <root@elwms02.(none)> | 2010-04-06 16:13:08 +0200 |
|---|---|---|
| committer | root <root@elwms02.(none)> | 2010-04-06 16:13:08 +0200 |
| commit | 0e7005fcc7483c01aa102fbea358c5ac65a48d62 (patch) | |
| tree | 11517ce0d3d2977c6732b3aa583b0008083e0bd3 /plugins/text2skin | |
| download | x-vdr-0e7005fcc7483c01aa102fbea358c5ac65a48d62.tar.gz x-vdr-0e7005fcc7483c01aa102fbea358c5ac65a48d62.tar.bz2 | |
hello world
Diffstat (limited to 'plugins/text2skin')
| -rw-r--r-- | plugins/text2skin/patches/p1/text2skin-1.1-cvs_ext-0.10_vdr154.diff | 63 | ||||
| -rw-r--r-- | plugins/text2skin/patches/text2skin-1.1-cvs_ext-0.10-20070620.3-vdr-1.5.7-1.diff | 94 | ||||
| -rw-r--r-- | plugins/text2skin/patches/text2skin_gcc43.diff | 36 | ||||
| -rw-r--r-- | plugins/text2skin/plugin.sh | 74 | ||||
| -rw-r--r-- | plugins/text2skin/skins/DeepBlue-0.1.3-extra-logos.tar.gz | bin | 0 -> 1903 bytes | |||
| -rw-r--r-- | plugins/text2skin/skins/install-skins.sh | 57 | ||||
| -rw-r--r-- | plugins/text2skin/text2skin-1.1-cvs-locale.diff | 377 |
7 files changed, 701 insertions, 0 deletions
diff --git a/plugins/text2skin/patches/p1/text2skin-1.1-cvs_ext-0.10_vdr154.diff b/plugins/text2skin/patches/p1/text2skin-1.1-cvs_ext-0.10_vdr154.diff new file mode 100644 index 0000000..c01f9d0 --- /dev/null +++ b/plugins/text2skin/patches/p1/text2skin-1.1-cvs_ext-0.10_vdr154.diff @@ -0,0 +1,63 @@ +diff -ruN text2skin-1.1-cvs_ext-0.10.orig/graphtft/font.c text2skin-1.1-cvs_ext-0.10/graphtft/font.c +--- text2skin-1.1-cvs_ext-0.10.orig/graphtft/font.c 2007-06-19 19:56:34.000000000 -0700 ++++ text2skin-1.1-cvs_ext-0.10/graphtft/font.c 2007-06-19 19:49:59.000000000 -0700 +@@ -38,6 +38,7 @@ + + bool cGraphtftFont::Load(string Filename, string CacheName, int Size, int Language, int Width, int format) + { ++#if VDRVERSNUM < 10503 + if ( _cache.find(CacheName) != _cache.end() ) + return true; + +@@ -187,6 +188,15 @@ + delete(font_data); + // Something went wrong! + return false; ++#else ++ if ( _cache.find(CacheName) != _cache.end() ) ++ return true; ++ cFont* newFont = cFont::CreateFont(Filename.c_str(), Size); ++ if ( newFont == NULL ) ++ return false; ++ _cache[CacheName] = newFont; ++ return true; ++#endif + } + + const cFont* cGraphtftFont::GetFont(string CacheName){ +@@ -210,10 +220,12 @@ + 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 -ruN text2skin-1.1-cvs_ext-0.10.orig/graphtft/font.h text2skin-1.1-cvs_ext-0.10/graphtft/font.h +--- text2skin-1.1-cvs_ext-0.10.orig/graphtft/font.h 2007-06-19 19:56:34.000000000 -0700 ++++ text2skin-1.1-cvs_ext-0.10/graphtft/font.h 2007-06-11 17:43:26.000000000 -0700 +@@ -24,7 +24,9 @@ + { + private: + typedef map<string,cFont*> cache_map; ++#if VDRVERSNUM < 10503 + typedef map<string,cFont::tPixelData*> del_map; ++#endif + + public: + cGraphtftFont(); +@@ -40,7 +42,9 @@ + FT_Face _face; + FT_GlyphSlot _slot; + cache_map _cache; ++#if VDRVERSNUM < 10503 + del_map _del; ++#endif + + }; + diff --git a/plugins/text2skin/patches/text2skin-1.1-cvs_ext-0.10-20070620.3-vdr-1.5.7-1.diff b/plugins/text2skin/patches/text2skin-1.1-cvs_ext-0.10-20070620.3-vdr-1.5.7-1.diff new file mode 100644 index 0000000..7728fa3 --- /dev/null +++ b/plugins/text2skin/patches/text2skin-1.1-cvs_ext-0.10-20070620.3-vdr-1.5.7-1.diff @@ -0,0 +1,94 @@ +--- text2skin-1.1-cvs_ext-0.10-20070620.3/font.c.orig 2007-08-13 08:54:41.000000000 -0700 ++++ text2skin-1.1-cvs_ext-0.10-20070620.3/font.c 2007-08-13 09:17:43.000000000 -0700 +@@ -31,8 +31,13 @@ + 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); +--- text2skin-1.1-cvs_ext-0.10-20070620.3/i18n.c.orig 2007-08-13 07:34:10.000000000 -0700 ++++ text2skin-1.1-cvs_ext-0.10-20070620.3/i18n.c 2007-08-13 08:53:31.000000000 -0700 +@@ -491,7 +491,11 @@ + + cText2SkinI18n::~cText2SkinI18n() { + for (int i = 0; mPhrases[i][0]; ++i) { ++#if VDRVERSNUM >= 10507 ++ for (int j = 0; j < I18nLanguages()->Size(); ++j) ++#else + for (int j = 0; j < I18nNumLanguages; ++j) ++#endif + free((void*)mPhrases[i][j]); + } + free(mPhrases); +@@ -507,7 +511,11 @@ + memset(&p, 0, sizeof(tI18nPhrase)); + Text += 17; + ++#if VDRVERSNUM >= 10507 ++ for (i = 0; i < I18nLanguages()->Size(); ++i) { ++#else + for (i = 0; i < I18nNumLanguages; ++i) { ++#endif + char *langs = strdup(I18nLanguageCode(i)); + char *ptr = langs, *ep; + std::string text; +@@ -525,7 +533,11 @@ + } + + int idx = mNumPhrases++; ++#if VDRVERSNUM >= 10507 ++ for (i = 0; i < I18nLanguages()->Size(); ++i) ++#else + for (i = 0; i < I18nNumLanguages; ++i) ++#endif + if (!p[i]) p[i] = ""; + mPhrases = (tI18nPhrase*)realloc(mPhrases, (mNumPhrases + 1) * sizeof(tI18nPhrase)); + memcpy(mPhrases[idx], p, sizeof(tI18nPhrase)); +@@ -539,7 +551,9 @@ + + bool cText2SkinI18n::Load(const std::string &Filename) { + if (cText2SkinFile::Load(Filename)) { ++#if VDRVERSNUM <= 10506 + I18nRegister(mPhrases, mIdentity.c_str()); ++#endif + return true; + } + return false; +--- text2skin-1.1-cvs_ext-0.10-20070620.3/status.c.orig 2007-08-13 09:54:04.000000000 -0700 ++++ text2skin-1.1-cvs_ext-0.10-20070620.3/status.c 2007-08-13 09:57:10.000000000 -0700 +@@ -130,8 +130,13 @@ + + void cText2SkinStatus::OsdClear(void) + { ++#if VDRVERSNUM >= 10507 ++ if (I18nCurrentLanguage() != mLastLanguage) { ++ mLastLanguage = I18nCurrentLanguage(); ++#else + if (Setup.OSDLanguage != mLastLanguage) { + mLastLanguage = Setup.OSDLanguage; ++#endif + cxString::Reparse(); + } + +--- text2skin-1.1-cvs_ext-0.10-20070620.3/text2skin.c.orig 2007-08-13 09:46:25.000000000 -0700 ++++ text2skin-1.1-cvs_ext-0.10-20070620.3/text2skin.c 2007-08-13 10:30:11.000000000 -0700 +@@ -49,7 +49,11 @@ + + bool cText2SkinPlugin::Start(void) { + RegisterI18n(Phrases); ++#if VDRVERSNUM >= 10507 ++ Text2SkinStatus.SetLanguage(I18nCurrentLanguage()); ++#else + Text2SkinStatus.SetLanguage(Setup.OSDLanguage); ++#endif + cText2SkinLoader::Start(); + return true; + } diff --git a/plugins/text2skin/patches/text2skin_gcc43.diff b/plugins/text2skin/patches/text2skin_gcc43.diff new file mode 100644 index 0000000..def7543 --- /dev/null +++ b/plugins/text2skin/patches/text2skin_gcc43.diff @@ -0,0 +1,36 @@ +--- text2skin/cache.h~ 2009-02-15 21:37:23.000000000 +0100 ++++ text2skin/cache.h 2009-02-15 21:40:19.000000000 +0100 +@@ -19,21 +19,21 @@ + + item_map mItems; + usage_list mUsage; +- uint mMaxItems; ++ unsigned mMaxItems; + + protected: + virtual void DeleteObject(const key_type &Key, data_type &Data) = 0; + virtual void ResetObject(data_type &Data) = 0; + + public: +- cxCache(uint MaxItems); ++ cxCache(unsigned MaxItems); + virtual ~cxCache(); + + void Reset(void); + void Flush(void); + bool Contains(const key_type &Key); + data_type &operator[](const key_type &Key); +- uint Count(void) { return mUsage.size(); } ++ unsigned Count(void) { return mUsage.size(); } + }; + + template<class key_type, class data_type> +@@ -43,7 +43,7 @@ + } + + template<class key_type, class data_type> +-cxCache<key_type, data_type>::cxCache(uint MaxItems) ++cxCache<key_type, data_type>::cxCache(unsigned MaxItems) + { + mMaxItems = MaxItems; + } diff --git a/plugins/text2skin/plugin.sh b/plugins/text2skin/plugin.sh new file mode 100644 index 0000000..86a1173 --- /dev/null +++ b/plugins/text2skin/plugin.sh @@ -0,0 +1,74 @@ +#!/bin/sh + +# x-vdr (Installations-Skript fuer einen VDR mit Debian als Basis) +# von Marc Wernecke - www.zulu-entertainment.de +# 27.06.2007 +# +# vdr-text2skin + +# defaults +source ./../../x-vdr.conf +source ./../../setup.conf +source ./../../functions +WEB="http://brougs78.vdr-developer.org/tmp/vdr-text2skin-1.1-cvs_ext-0.10.tgz" +#WEB="http://www.zulu-entertainment.de/files/vdr-text2skin/vdr-text2skin-1.1-cvs_ext-0.10-patched-20070513.tar.bz2" +VERSION="text2skin-1.1-cvs_ext-0.10" +LINK="text2skin" +CVS="0" + +VAR=`basename $WEB` +DIR=`pwd` + +# plugin entfernen +function clean_plugin() { + cd $SOURCEDIR/VDR/PLUGINS/src + rm -rf $LINK* + rm -f $VDRLIBDIR/libvdr-$LINK* + rm -rf $VDRCONFDIR/plugins/text2skin + log "cleaning $LINK" +} + +# plugin installieren +function install_plugin() { + if [ "$CVS" = "1" ] ; then + rm -rf text2skin text2skin-cvs + echo "CVS password: [Just press enter]" + cvs -d:pserver:anoncvs@vdr-developer.org:/var/cvsroot login + cvs -d:pserver:anoncvs@vdr-developer.org:/var/cvsroot -z3 co text2skin + mv -f text2skin text2skin-cvs + cp -R text2skin-cvs $SOURCEDIR/VDR/PLUGINS/src + else + download_plugin + extract_plugin + fi + cd $SOURCEDIR/VDR/PLUGINS/src + rm -f $LINK + ln -vfs $VERSION $LINK + patch_plugin + patch_p1_plugin + + ## plugin specials - start ## +# install skins + log "*******************************" + log "Installation der Skins ..." + log "*******************************" + cd $DIR/skins + chmod 0744 ./install-skins.sh + if ./install-skins.sh; then + log "*******************************" + log "... der Skins ist abgeschlossen" + log "*******************************" + fi + ## plugin specials - ende ## +} + +# plugin commands +if [ $# \> 0 ]; then + cmd=$1 + cmd_plugin +else + install_plugin + log "install-plugin fuer $VERSION ist fertig" +fi + +exit 0 diff --git a/plugins/text2skin/skins/DeepBlue-0.1.3-extra-logos.tar.gz b/plugins/text2skin/skins/DeepBlue-0.1.3-extra-logos.tar.gz Binary files differnew file mode 100644 index 0000000..c6250e0 --- /dev/null +++ b/plugins/text2skin/skins/DeepBlue-0.1.3-extra-logos.tar.gz diff --git a/plugins/text2skin/skins/install-skins.sh b/plugins/text2skin/skins/install-skins.sh new file mode 100644 index 0000000..96f1f74 --- /dev/null +++ b/plugins/text2skin/skins/install-skins.sh @@ -0,0 +1,57 @@ +#!/bin/sh + +# x-vdr (Installations-Skript fuer einen VDR mit Debian als Basis) +# von Marc Wernecke - www.zulu-entertainment.de +# 08.12.2006 + +# skins fuer text2skin + +source ./../../../x-vdr.conf +source ./../../../setup.conf +source ./../../../functions + +# remove old skins +if [ -d "$VDRCONFDIR/plugins/text2skin" ]; then + rm -rf "$VDRCONFDIR/plugins/text2skin" +fi + +if [ ! -d "$VDRCONFDIR/plugins/text2skin/fonts" ]; then + mkdir -p "$VDRCONFDIR/plugins/text2skin/fonts" && log "Erstelle \"$VDRCONFDIR/plugins/text2skin/fonts\"" +fi + +if [ -n "$SKINS" ]; then + echo "$SKINS" | sed '/^[ ]*$/d' | while read i; do + VAR=`basename $i` + if [ -f "$FILES/plugins/$VAR" ]; then + log "$VAR gefunden" + elif [ -f "$VAR" ]; then + log "$VAR gefunden" + cp "$VAR" "$FILES/plugins" + else + log "$VAR nicht gefunden" + log "starte download" + if wget --tries=2 "$i" --directory-prefix="$FILES/plugins" &>/dev/null; then + log "Download von $VAR erfolgreich" + else + log "Download von $VAR nicht erfolgreich" + fi + fi + + if [ -f "$FILES/plugins/$VAR" ]; then + if echo "$FILES/plugins/$VAR" | grep ".bz2$" &>/dev/null; then + tar xjf "$FILES/plugins/$VAR" -C "$VDRCONFDIR/plugins/text2skin" && log "Extrahiere $VAR" + else + tar xzf "$FILES/plugins/$VAR" -C "$VDRCONFDIR/plugins/text2skin" && log "Extrahiere $VAR" + fi + else + log "Installation von $VAR nicht erfolgreich" + fi + done + + # rechte setzen + chown -R $VDRUSER:$VDRGROUP "$VDRCONFDIR/plugins/text2skin" +fi + +exit 0 + + diff --git a/plugins/text2skin/text2skin-1.1-cvs-locale.diff b/plugins/text2skin/text2skin-1.1-cvs-locale.diff new file mode 100644 index 0000000..22ff48c --- /dev/null +++ b/plugins/text2skin/text2skin-1.1-cvs-locale.diff @@ -0,0 +1,377 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 95_text2skin-1.1-cvs-locale.dpatch by Thomas Günther <tom@toms-cafe.de> +## http://toms-cafe.de/vdr/download/text2skin-1.1-cvs-locale.diff +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: Locales for text2skin plug-in (VDR >= 1.5.7, skins + locale patch). +## DP: Bases on cvs snapshot from 2008-01-22 22:30:00Z + 2 patches: +## DP: - libfreetype6-2.2.1.diff by Jerome <jlacvdr@jlac.dyndns.org> +## DP: http://vdrportal.de/board/thread.php?postid=489175#post489175 +## DP: - text2skin-1.1-cvs_ext-0.10-vdr-1.5.4.diff by Stone <syphyr@gmail.com> +## DP: http://vdrportal.de/board/thread.php?postid=621984#post621984 +## DP: The skins have to be patched, too: +## DP: - DeepBlue (http://vdr.pfroen.de) +## DP: http://toms-cafe.de/vdr/download/deepblue-0.1.4-locale.diff +## DP: - Enigma (http://home.pages.at/brougs78/vdr_enigma.htm) +## DP: http://toms-cafe.de/vdr/download/enigma-0.3a-locale.diff +## DP: - enElchi (http://www.saunalahti.fi/~rahrenbe/vdr/soppalusikka/files/) +## DP: http://toms-cafe.de/vdr/download/enelchi-0.7.2-locale.diff +## DP: - to patch other skins the Makefile from these patches could be used +## DP: without any changes, missing translation entries should be added to +## DP: the *.skin file (e.g. as comments <!-- trans('Volume') -->) + +@DPATCH@ +--- text2skin-1.0+cvs20080122.2311/Makefile ++++ text2skin-1.0+cvs20080122.2311/Makefile +@@ -19,6 +19,8 @@ + # The official name of this plugin. + # This name will be used in the '-P...' option of VDR to load the plugin. + # By default the main source file also carries this name. ++# IMPORTANT: the presence of this macro is important for the Make.config ++# file. So it must be defined, even if it is not used here! + # + PLUGIN = text2skin + +@@ -29,28 +31,28 @@ + ### The C++ compiler and options: + + CXX ?= g++ +-CXXFLAGS ?= -Wall -Woverloaded-virtual ++CXXFLAGS ?= -fPIC -Wall -Woverloaded-virtual + + ### The directory environment: + +-DVBDIR = ../../../../DVB + VDRDIR = ../../.. + LIBDIR = ../../lib + TMPDIR = /tmp + +-### The version number of VDR (taken from VDR's "config.h"): ++### Allow user defined options to overwrite defaults: ++ ++-include $(VDRDIR)/Make.config ++ ++### The version number of VDR's plugin API (taken from VDR's "config.h"): + +-VDRVERSION = $(shell grep 'define VDRVERSION ' $(VDRDIR)/config.h | awk '{ print $$3 }' | sed -e 's/"//g') ++APIVERSION = $(shell sed -ne '/define APIVERSION/s/^.*"\(.*\)".*$$/\1/p' \ ++ $(VDRDIR)/config.h) + + ### The name of the distribution archive: + + ARCHIVE = $(PLUGIN)-$(VERSION) + PACKAGE = vdr-$(ARCHIVE) + +-### Allow user defined options to overwrite defaults: +- +--include $(VDRDIR)/Make.config +- + ### The object files (add further files here): + + OBJS = $(PLUGIN).o loader.o display.o render.o common.o bitmap.o \ +@@ -95,43 +97,67 @@ + endif + endif + +-INCLUDES += -I$(VDRDIR)/include -I$(DVBDIR)/linux/include -I$(DVBDIR)/include -I. ++INCLUDES += -I$(VDRDIR)/include -I. + + DEFINES += -D_GNU_SOURCE -DPLUGIN_NAME_I18N='"$(PLUGIN)"' + ++### The main target: ++ ++all: libvdr-$(PLUGIN).so i18n ++ + ### Implicit rules: + + %.o: %.c + $(CXX) $(CXXFLAGS) -c $(DEFINES) $(INCLUDES) -o $@ $< + +-# Dependencies: ++### Dependencies: + +-MAKEDEP = g++ -MM -MG ++MAKEDEP = $(CXX) -MM -MG + DEPFILE = .dependencies + $(DEPFILE): Makefile + @$(MAKEDEP) $(DEFINES) $(INCLUDES) $(OBJS:%.o=%.c) > $@ + + -include $(DEPFILE) + +-### Targets: ++### Internationalization (I18N): ++ ++PODIR = po ++LOCALEDIR = $(VDRDIR)/locale ++I18Npo = $(notdir $(wildcard $(PODIR)/*.po)) ++I18Npot = $(PODIR)/$(PLUGIN).pot ++ ++$(I18Npot): $(wildcard *.c) ++ xgettext -C -cTRANSLATORS --no-wrap --no-location -k -ktr -ktrNOOP \ ++ --msgid-bugs-address='<sascha@akv-soft.de>' -o $@ $^ ++ ++%.po: $(I18Npot) ++ msgmerge -U --no-wrap --no-location --backup=none -q $@ $< ++ @touch $@ ++ ++$(LOCALEDIR)/%/LC_MESSAGES/vdr-$(PLUGIN).mo: $(PODIR)/%.po ++ @mkdir -p $(dir $@) ++ msgfmt -c -o $@ $< + +-all: libvdr-$(PLUGIN).so ++.PHONY: i18n ++i18n: $(I18Npo:%.po=$(LOCALEDIR)/%/LC_MESSAGES/vdr-$(PLUGIN).mo) ++ ++### Targets: + + libvdr-$(PLUGIN).so: $(OBJS) + $(CXX) $(CXXFLAGS) -shared $(OBJS) $(LIBS) -o $@ +- @cp $@ $(LIBDIR)/$@.$(VDRVERSION) ++ @cp --remove-destination $@ $(LIBDIR)/$@.$(APIVERSION) + ifndef DEBUG +- strip $(LIBDIR)/$@.$(VDRVERSION) ++ strip $(LIBDIR)/$@.$(APIVERSION) + endif + + dist: clean + @-rm -rf $(TMPDIR)/$(ARCHIVE) + @mkdir $(TMPDIR)/$(ARCHIVE) + @cp -a * $(TMPDIR)/$(ARCHIVE) +- @ln -s $(ARCHIVE) $(TMPDIR)/$(PLUGIN) +- @tar czf $(PACKAGE).tgz -C $(TMPDIR) $(ARCHIVE) $(PLUGIN) +- @-rm -rf $(TMPDIR)/$(ARCHIVE) $(TMPDIR)/$(PLUGIN) ++ @tar czf $(PACKAGE).tgz -C $(TMPDIR) \ ++ --exclude debian --exclude CVS --exclude .svn $(ARCHIVE) ++ @-rm -rf $(TMPDIR)/$(ARCHIVE) + @echo Distribution package created as $(PACKAGE).tgz + + clean: +- @-rm -f $(OBJS) $(DEPFILE) *.so *.tgz core* *~ SKINS SKINS.de ++ @-rm -f $(OBJS) $(DEPFILE) *.so $(I18Npot) *.tgz core* *~ SKINS SKINS.de +--- text2skin-1.0+cvs20080122.2311/font.c ++++ text2skin-1.0+cvs20080122.2311/font.c +@@ -31,8 +31,13 @@ + 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); +--- text2skin-1.0+cvs20080122.2311/i18n.c ++++ text2skin-1.0+cvs20080122.2311/i18n.c +@@ -5,6 +5,7 @@ + #include "i18n.h" + #include <vdr/config.h> + ++#if VDRVERSNUM < 10507 + const tI18nPhrase Phrases[] = { + /* + { "English", +@@ -156,14 +157,22 @@ + }, + { NULL } + }; ++#endif + ++#if VDRVERSNUM >= 10507 ++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) +@@ -219,3 +228,4 @@ + } + return false; + } ++#endif +--- text2skin-1.0+cvs20080122.2311/i18n.h ++++ text2skin-1.0+cvs20080122.2311/i18n.h +@@ -9,22 +9,32 @@ + #include "file.h" + #include <vdr/i18n.h> + ++#if VDRVERSNUM < 10507 ++#define trNOOP(s) (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()); } + }; + +--- text2skin-1.0+cvs20080122.2311/loader.c ++++ text2skin-1.0+cvs20080122.2311/loader.c +@@ -34,6 +34,9 @@ + } + + 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) { +@@ -41,6 +44,7 @@ + if (!translations->Load(transfile)) + DELETENULL(translations); + } ++#endif + + cText2SkinTheme *theme = new cText2SkinTheme(Skin); + std::string themefile = SkinPath() + "/" + Skin + "/" + Skin + ".colors"; +--- text2skin-1.0+cvs20080122.2311/status.c ++++ text2skin-1.0+cvs20080122.2311/status.c +@@ -109,8 +109,13 @@ + + void cText2SkinStatus::OsdClear(void) + { ++#if VDRVERSNUM >= 10507 ++ if (I18nCurrentLanguage() != mLastLanguage) { ++ mLastLanguage = I18nCurrentLanguage(); ++#else + if (Setup.OSDLanguage != mLastLanguage) { + mLastLanguage = Setup.OSDLanguage; ++#endif + cxString::Reparse(); + } + } +--- text2skin-1.0+cvs20080122.2311/text2skin.c ++++ text2skin-1.0+cvs20080122.2311/text2skin.c +@@ -15,7 +15,7 @@ + + const char *cText2SkinPlugin::VERSION = "1.1-cvs"; + const char *cText2SkinPlugin::SKINVERSION = "1.0"; +-const char *cText2SkinPlugin::DESCRIPTION = "Loader for text-based skins"; ++const char *cText2SkinPlugin::DESCRIPTION = trNOOP("Loader for text-based skins"); + + cText2SkinPlugin::cText2SkinPlugin(void) { + } +@@ -24,8 +24,12 @@ + } + + bool cText2SkinPlugin::Start(void) { ++#if VDRVERSNUM < 10507 + RegisterI18n(Phrases); + Text2SkinStatus.SetLanguage(Setup.OSDLanguage); ++#else ++ Text2SkinStatus.SetLanguage(I18nCurrentLanguage()); ++#endif + cText2SkinLoader::Start(); + return true; + } +--- text2skin-1.0+cvs20080122.2311/po/de_DE.po 1970-01-01 00:00:00.000000000 +0000 ++++ text2skin-1.0+cvs20080122.2311/po/de_DE.po +@@ -0,0 +1,36 @@ ++# German translations for vdr-text2skin package. ++# Copyright (C) Sascha Volkenandt <sascha@akv-soft.de> ++# This file is distributed under the same license as the vdr-text2skin package. ++# Sascha Volkenandt <sascha@akv-soft.de>, 2004, 2005. ++# ++# $Id$ ++# ++msgid "" ++msgstr "" ++"Project-Id-Version: vdr-text2skin 1.0\n" ++"Report-Msgid-Bugs-To: <sascha@akv-soft.de>\n" ++"POT-Creation-Date: 2008-01-26 14:59+0100\n" ++"PO-Revision-Date: 2008-01-26 12:38+0100\n" ++"Last-Translator: Sascha Volkenandt <sascha@akv-soft.de>\n" ++"Language-Team: <vdr@linuxtv.org>\n" ++"MIME-Version: 1.0\n" ++"Content-Type: text/plain; charset=iso-8859-15\n" ++"Content-Transfer-Encoding: 8bit\n" ++ ++msgid "*** Invalid Channel ***" ++msgstr "" ++ ++msgid "Skin too large or incorrectly aligned" ++msgstr "Skin zu groß oder nicht korrekt ausgerichtet" ++ ++msgid "Flush image cache" ++msgstr "Bildspeicher leeren" ++ ++msgid "Max. image cache size" ++msgstr "Max. Größe des Bildspeichers" ++ ++msgid "Flushing image cache..." ++msgstr "Bildspeicher wird geleert..." ++ ++msgid "Loader for text-based skins" ++msgstr "Lader für textbasierte Skins" +--- text2skin-1.0+cvs20080122.2311/po/fi_FI.po 1970-01-01 00:00:00.000000000 +0000 ++++ text2skin-1.0+cvs20080122.2311/po/fi_FI.po +@@ -0,0 +1,36 @@ ++# Finnish translations for vdr-text2skin package. ++# Copyright (C) Sascha Volkenandt <sascha@akv-soft.de> ++# This file is distributed under the same license as the vdr-text2skin package. ++# Rolf Ahrenberg <rahrenbe@cc.hut.fi>, 2004, 2005. ++# ++# $Id$ ++# ++msgid "" ++msgstr "" ++"Project-Id-Version: vdr-text2skin 1.0\n" ++"Report-Msgid-Bugs-To: <sascha@akv-soft.de>\n" ++"POT-Creation-Date: 2008-01-26 14:59+0100\n" ++"PO-Revision-Date: 2008-01-26 12:38+0100\n" ++"Last-Translator: Rolf Ahrenberg <rahrenbe@cc.hut.fi>\n" ++"Language-Team: <vdr@linuxtv.org>\n" ++"MIME-Version: 1.0\n" ++"Content-Type: text/plain; charset=iso-8859-15\n" ++"Content-Transfer-Encoding: 8bit\n" ++ ++msgid "*** Invalid Channel ***" ++msgstr "" ++ ++msgid "Skin too large or incorrectly aligned" ++msgstr "Ulkoasu on liian suuri tai väärin asemoitu" ++ ++msgid "Flush image cache" ++msgstr "Tyhjennä kuvat välimuistista" ++ ++msgid "Max. image cache size" ++msgstr "Välimuistin maksimikoko" ++ ++msgid "Flushing image cache..." ++msgstr "Tyhjennetään välimuistia..." ++ ++msgid "Loader for text-based skins" ++msgstr "Helposti muokattavat ulkoasut" |
