Sophie

Sophie

distrib > Mandriva > 2008.0 > i586 > by-pkgid > 6608333f552fe119fd2eff9e8d1b1c56 > files > 2

vdr-plugin-ttxtsubs-0.0.5-10.rre.2mdv2008.0.src.rpm

diff -Nru ttxtsubs-0.0.5/Checkpatch.sh ttxtsubs-0.0.5-raastinrauta-edition/Checkpatch.sh
--- ttxtsubs-0.0.5/Checkpatch.sh	2008-01-13 18:18:53.000000000 +0200
+++ ttxtsubs-0.0.5-raastinrauta-edition/Checkpatch.sh	2008-01-13 18:17:43.000000000 +0200
@@ -23,18 +23,18 @@
     exit 1;
 fi
 
-grep OSD_HOOK_2 "$DIR/../../../osd.c" >> /dev/null;
-if [ $? -ne 0 ]; then
-    echo
-    echo
-    echo "Error while building ttxtsubs plugin:"
-    echo "       You have an older version of the VDR patch installed!"
-    echo "       You need to upgrade it."
-    echo "       Please do:"
-    echo "        cd /path/to/vdr    [ replace with your path ]"
-    echo "        patch -b < PLUGINS/src/ttxtsubs/VDR.upgrade-patch"
-    echo "        make"
-    echo
-    exit 1;
-fi
+#grep OSD_HOOK_2 "$DIR/../../../osd.c" >> /dev/null;
+#if [ $? -ne 0 ]; then
+#    echo
+#    echo
+#    echo "Error while building ttxtsubs plugin:"
+#    echo "       You have an older version of the VDR patch installed!"
+#    echo "       You need to upgrade it."
+#    echo "       Please do:"
+#    echo "        cd /path/to/vdr    [ replace with your path ]"
+#    echo "        patch -b < PLUGINS/src/ttxtsubs/VDR.upgrade-patch"
+#    echo "        make"
+#    echo
+#    exit 1;
+#fi
 
diff -Nru ttxtsubs-0.0.5/Makefile ttxtsubs-0.0.5-raastinrauta-edition/Makefile
--- ttxtsubs-0.0.5/Makefile	2008-01-13 18:18:53.000000000 +0200
+++ ttxtsubs-0.0.5-raastinrauta-edition/Makefile	2008-01-13 18:17:43.000000000 +0200
@@ -16,7 +16,7 @@
 ### The C++ compiler and options:
 
 CXX      ?= g++
-CXXFLAGS ?= -g -O2 -Wall -Woverloaded-virtual
+CXXFLAGS ?= -fPIC -g -O2 -Wall -Woverloaded-virtual
 
 ### The directory environment:
 
@@ -31,7 +31,7 @@
 
 ### The version number of VDR (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:
 
@@ -48,11 +48,14 @@
 ### The object files (add further files here):
 
 OBJS = $(PLUGIN).o ttxtsubsdisplayer.o ttxtsubsdisplay.o teletext.o siinfo.o \
-	ttxtsubsfilter.o ttxtsubsrecorder.o ttxtsubsreceiver.o ttxtsubsi18n.o
+	ttxtsubsfilter.o ttxtsubsrecorder.o ttxtsubsreceiver.o ttxtsubsi18n.o \
+	ttxtsubspagemenu.o ttxtsubschannelsettings.o
 
 SOURCEFILES = *.c *.h [A-Z]???* contrib
 
 ### Implicit rules:
+.PHONY: all all-redirect
+all-redirect: all
 
 %.o: %.c
 	$(CXX) $(CXXFLAGS) -c $(DEFINES) $(INCLUDES) $<
@@ -66,14 +69,39 @@
 
 -include $(DEPFILE)
 
+### Internationalization (I18N):
+
+PODIR     = po
+LOCALEDIR = $(VDRDIR)/locale
+I18Npo    = $(wildcard $(PODIR)/*.po)
+I18Nmo    = $(addsuffix .mo, $(foreach file, $(I18Npo), $(basename $(file))))
+I18Ndirs  = $(notdir $(foreach file, $(I18Npo), $(basename $(file))))
+I18Npot   = $(PODIR)/$(PLUGIN).pot
+
+%.mo: %.po
+	msgfmt -c -o $@ $<
+
+$(I18Npot): $(wildcard *.c)
+	xgettext -C -cTRANSLATORS --no-wrap -F -k -ktr -ktrNOOP --msgid-bugs-address='<author>' -o $@ $(wildcard *.c)
+
+$(I18Npo): $(I18Npot)
+	msgmerge -U --no-wrap -F --backup=none -q $@ $<
+
+i18n: $(I18Nmo)
+	@mkdir -p $(LOCALEDIR)
+	for i in $(I18Ndirs); do\
+	    mkdir -p $(LOCALEDIR)/$$i/LC_MESSAGES;\
+	    cp $(PODIR)/$$i.mo $(LOCALEDIR)/$$i/LC_MESSAGES/vdr-$(PLUGIN).mo;\
+	    done
+
 ### Targets:
 
-all: libvdr-$(PLUGIN).so
+all: libvdr-$(PLUGIN).so i18n
 	@sh ./Checkpatch.sh
 
 libvdr-$(PLUGIN).so: $(OBJS)
 	$(CXX) $(CXXFLAGS) -shared $(OBJS) -o $@
-	@cp $@ $(LIBDIR)/$@.$(VDRVERSION)
+	@cp $@ $(LIBDIR)/$@.$(APIVERSION)
 
 dist: clean
 	@-rm -rf $(TMPDIR)/$(ARCHIVE)
@@ -95,15 +123,8 @@
 	@echo done.
 
 clean:
+	@-rm -f $(PODIR)/*.mo $(PODIR)/*.pot
 	@-rm -f $(OBJS) $(DEPFILE) *.so *.tgz core* *~
 
-#ci: patch	
 ci:
 	ci -u $(SOURCEFILES)
-
-patch:
-	co -l xVDR.patch.temp vdrttxtsubshooks.c vdrttxtsubshooks.h
-	(cd ../../../; diff -upr ./DIST/* .) | grep -v "Only in ." > xVDR.patch.temp
-	cp -p ../../../vdrttxtsubshooks.c .
-	cp -p ../../../vdrttxtsubshooks.h .
-	ci -u xVDR.patch.temp vdrttxtsubshooks.c vdrttxtsubshooks.h
diff -Nru ttxtsubs-0.0.5/po/ca_ES.po ttxtsubs-0.0.5-raastinrauta-edition/po/ca_ES.po
--- ttxtsubs-0.0.5/po/ca_ES.po	1970-01-01 02:00:00.000000000 +0200
+++ ttxtsubs-0.0.5-raastinrauta-edition/po/ca_ES.po	2008-01-13 18:17:43.000000000 +0200
@@ -0,0 +1,242 @@
+# VDR plugin language source file.
+# Copyright (C) 2007 Klaus Schmidinger <kls@cadsoft.de>
+# This file is distributed under the same license as the VDR package.
+# Marc Rovira Vall <tm05462@salleURL.edu>, 2003
+# Ramon Roca <ramon.roca@xcombo.com>, 2003
+# Jordi Vilà <jvila@tinet.org>, 2003
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: VDR 1.5.7\n"
+"Report-Msgid-Bugs-To: <author>\n"
+"POT-Creation-Date: 2007-09-25 21:58+0300\n"
+"PO-Revision-Date: 2007-08-24 23:49+0300\n"
+"Last-Translator: Jordi Vilà <jvila@tinet.org>\n"
+"Language-Team: <vdr@linuxtv.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=ISO-8859-1\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: ttxtsubs.c:51
+msgid "Teletext subtitles"
+msgstr "Subtítols teletext"
+
+#: ttxtsubs.c:302
+msgid "Hide teletext subtitles"
+msgstr "Amaga subtítols teletext"
+
+#: ttxtsubs.c:304
+msgid "Display teletext subtitles"
+msgstr "Visualitza subtítols teletext"
+
+#: ttxtsubs.c:307
+msgid "Position Teletext Subtitles for 4:3/Anamorph"
+msgstr "Posiciona subtítols teletext per a 4:3/anamòrfic"
+
+#: ttxtsubs.c:309
+msgid "Position Teletext Subtitles for Letterbox"
+msgstr "Posiciona subtítols teletext per a Letterbox"
+
+#: ttxtsubs.c:311
+msgid "Page Selection"
+msgstr "Selecció pàgina subtítols"
+
+#: ttxtsubs.c:641
+msgid "Display on/off"
+msgstr "Visualitza si/no"
+
+#: ttxtsubs.c:642
+msgid "4:3/Letterbox"
+msgstr "4:3/Letterbox"
+
+#: ttxtsubs.c:643
+msgid "Page Mode"
+msgstr "Modalitat pàgina"
+
+#: ttxtsubs.c:646
+msgid "Left"
+msgstr "Esquerra"
+
+#: ttxtsubs.c:647
+msgid "Center"
+msgstr "Centre"
+
+#: ttxtsubs.c:648
+msgid "Right"
+msgstr "Dreta"
+
+#: ttxtsubs.c:651
+msgid "All"
+msgstr "Totes"
+
+#: ttxtsubs.c:652
+msgid "Only DVB-S"
+msgstr "Només DVB-S"
+
+#: ttxtsubs.c:653
+msgid "Only DVB-T"
+msgstr "Només DVB-T"
+
+#: ttxtsubs.c:654
+msgid "Only DVB-C"
+msgstr "Només DVB-C"
+
+#: ttxtsubs.c:657
+msgid "Black"
+msgstr "Negre"
+
+#: ttxtsubs.c:658
+msgid "White"
+msgstr "Blanc"
+
+#: ttxtsubs.c:659
+msgid "Red"
+msgstr "Vermell"
+
+#: ttxtsubs.c:660
+msgid "Green"
+msgstr "Verd"
+
+#: ttxtsubs.c:661
+msgid "Yellow"
+msgstr "Groc"
+
+#: ttxtsubs.c:662
+msgid "Magenta"
+msgstr "Magenta"
+
+#: ttxtsubs.c:663
+msgid "Blue"
+msgstr "Blau"
+
+#: ttxtsubs.c:664
+msgid "Cyan"
+msgstr "Cian"
+
+#: ttxtsubs.c:665
+msgid "Custom"
+msgstr "Personalitzat"
+
+#: ttxtsubs.c:666
+msgid "Transparent"
+msgstr "Transparent"
+
+#: ttxtsubs.c:667
+msgid "Grey"
+msgstr "Gris"
+
+#: ttxtsubs.c:691 ttxtsubspagemenu.c:36
+msgid "Display Subtitles"
+msgstr "Visualitza subtítols"
+
+#: ttxtsubs.c:692
+msgid "Record Subtitles"
+msgstr "Grava subtítols"
+
+#: ttxtsubs.c:693
+msgid "Live Delay"
+msgstr "Retard en directe"
+
+#: ttxtsubs.c:694
+msgid "Replay Delay"
+msgstr "Retard en reproducció"
+
+#: ttxtsubs.c:697
+msgid "Main Menu Alternative"
+msgstr "Alternativa del menú principal"
+
+#: ttxtsubs.c:701
+msgid "Text Horizontal Position"
+msgstr "Posició horitzontal del text "
+
+#: ttxtsubs.c:703
+msgid "Text Vertical Position"
+msgstr "Posición vertical del text"
+
+#: ttxtsubs.c:704
+msgid "4:3/Anamorph"
+msgstr "4:3/Anamòrfic"
+
+#: ttxtsubs.c:704
+msgid "Letterbox"
+msgstr "Letterbox"
+
+#: ttxtsubs.c:705
+msgid "Text Vertical Adjust"
+msgstr "Ajustament vertical del text"
+
+#: ttxtsubs.c:707
+msgid "Line Spacing Adjust"
+msgstr "Ajustament distancia entre línies"
+
+#: ttxtsubs.c:709
+msgid "Workaround for some French chns"
+msgstr "Correcció per a canals francesos"
+
+#: ttxtsubs.c:713
+msgid "DVB Source Selection"
+msgstr "Selecció font DVB"
+
+#: ttxtsubs.c:716
+msgid "Font Size (pixel)"
+msgstr ""
+
+#: ttxtsubs.c:720
+msgid "Text Color"
+msgstr "Color del text"
+
+#: ttxtsubs.c:724
+msgid "Background Color"
+msgstr "Color de fons"
+
+#: ttxtsubs.c:736
+msgid "Custom Color"
+msgstr "Color personalitzat"
+
+#: ttxtsubs.c:741
+msgid "Red Value"
+msgstr "Valor vermell"
+
+#: ttxtsubs.c:742
+msgid "Green Value"
+msgstr "Valor vert"
+
+#: ttxtsubs.c:743
+msgid "Blue Value"
+msgstr "Valor blau"
+
+#: ttxtsubs.c:744
+msgid "Transparency Value"
+msgstr "Valor transparència"
+
+#: ttxtsubs.c:754 ttxtsubs.c:762
+msgid "Language"
+msgstr "Idioma"
+
+#: ttxtsubs.c:762
+msgid "Hearing Impaired"
+msgstr "Discapacitats auditius"
+
+#: ttxtsubspagemenu.c:17
+msgid "Subtitle Page Settings"
+msgstr "Opcions pàgina subtítols"
+
+#: ttxtsubspagemenu.c:31
+msgid "Auto"
+msgstr "Automàtic"
+
+#: ttxtsubspagemenu.c:32
+msgid "Manual"
+msgstr "Manual"
+
+#: ttxtsubspagemenu.c:33
+msgid "Disabled"
+msgstr "Desactivats"
+
+#: ttxtsubspagemenu.c:37
+msgid "Subtitle Mode"
+msgstr "Modalitat subtítols"
+
+#: ttxtsubspagemenu.c:38
+msgid "Manual Subtitle Page"
+msgstr "Pàgina manual subtítols"
diff -Nru ttxtsubs-0.0.5/po/de_DE.po ttxtsubs-0.0.5-raastinrauta-edition/po/de_DE.po
--- ttxtsubs-0.0.5/po/de_DE.po	1970-01-01 02:00:00.000000000 +0200
+++ ttxtsubs-0.0.5-raastinrauta-edition/po/de_DE.po	2008-01-13 18:17:43.000000000 +0200
@@ -0,0 +1,240 @@
+# VDR plugin language source file.
+# Copyright (C) 2007 Klaus Schmidinger <kls@cadsoft.de>
+# This file is distributed under the same license as the VDR package.
+# Klaus Schmidinger <kls@cadsoft.de>, 2000
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: VDR 1.5.7\n"
+"Report-Msgid-Bugs-To: <author>\n"
+"POT-Creation-Date: 2007-09-25 21:58+0300\n"
+"PO-Revision-Date: 2007-08-24 23:49+0300\n"
+"Last-Translator: Klaus Schmidinger <kls@cadsoft.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"
+
+#: ttxtsubs.c:51
+msgid "Teletext subtitles"
+msgstr "Videotextuntertitel"
+
+#: ttxtsubs.c:302
+msgid "Hide teletext subtitles"
+msgstr "Verstecke Videotextuntertitel"
+
+#: ttxtsubs.c:304
+msgid "Display teletext subtitles"
+msgstr "Zeige Videotextuntertitel"
+
+#: ttxtsubs.c:307
+msgid "Position Teletext Subtitles for 4:3/Anamorph"
+msgstr "Positioniere Videotext-Untertitel für 4:3/Anamorph"
+
+#: ttxtsubs.c:309
+msgid "Position Teletext Subtitles for Letterbox"
+msgstr "Positioniere Videotext-Untertitel für Letterbox"
+
+#: ttxtsubs.c:311
+msgid "Page Selection"
+msgstr "Seitenauswahl"
+
+#: ttxtsubs.c:641
+msgid "Display on/off"
+msgstr "Anzeige ein/aus"
+
+#: ttxtsubs.c:642
+msgid "4:3/Letterbox"
+msgstr "4:3/Letterbox"
+
+#: ttxtsubs.c:643
+msgid "Page Mode"
+msgstr "Seitenmodus"
+
+#: ttxtsubs.c:646
+msgid "Left"
+msgstr "Links"
+
+#: ttxtsubs.c:647
+msgid "Center"
+msgstr "Mitte"
+
+#: ttxtsubs.c:648
+msgid "Right"
+msgstr "Rechts"
+
+#: ttxtsubs.c:651
+msgid "All"
+msgstr "Alle"
+
+#: ttxtsubs.c:652
+msgid "Only DVB-S"
+msgstr "Nur DVB-S"
+
+#: ttxtsubs.c:653
+msgid "Only DVB-T"
+msgstr "Nur DVB-T"
+
+#: ttxtsubs.c:654
+msgid "Only DVB-C"
+msgstr "Nur DVB-C"
+
+#: ttxtsubs.c:657
+msgid "Black"
+msgstr "Schwarz"
+
+#: ttxtsubs.c:658
+msgid "White"
+msgstr "Weiss"
+
+#: ttxtsubs.c:659
+msgid "Red"
+msgstr "Rot"
+
+#: ttxtsubs.c:660
+msgid "Green"
+msgstr "Grün"
+
+#: ttxtsubs.c:661
+msgid "Yellow"
+msgstr "Gelb"
+
+#: ttxtsubs.c:662
+msgid "Magenta"
+msgstr "Magenta"
+
+#: ttxtsubs.c:663
+msgid "Blue"
+msgstr "Blau"
+
+#: ttxtsubs.c:664
+msgid "Cyan"
+msgstr "Türkis"
+
+#: ttxtsubs.c:665
+msgid "Custom"
+msgstr "Benutzerdefiniert"
+
+#: ttxtsubs.c:666
+msgid "Transparent"
+msgstr "Transparent"
+
+#: ttxtsubs.c:667
+msgid "Grey"
+msgstr "Grau"
+
+#: ttxtsubs.c:691 ttxtsubspagemenu.c:36
+msgid "Display Subtitles"
+msgstr "Zeige Untertitel"
+
+#: ttxtsubs.c:692
+msgid "Record Subtitles"
+msgstr "Nimm Untertitel auf"
+
+#: ttxtsubs.c:693
+msgid "Live Delay"
+msgstr "Live Verzögerung"
+
+#: ttxtsubs.c:694
+msgid "Replay Delay"
+msgstr "Wiedergabe Verzögerung"
+
+#: ttxtsubs.c:697
+msgid "Main Menu Alternative"
+msgstr "Hauptmenu Alternative"
+
+#: ttxtsubs.c:701
+msgid "Text Horizontal Position"
+msgstr "Horizontale Textposition"
+
+#: ttxtsubs.c:703
+msgid "Text Vertical Position"
+msgstr "Vertikale Textposition"
+
+#: ttxtsubs.c:704
+msgid "4:3/Anamorph"
+msgstr "4:3/Anamorph"
+
+#: ttxtsubs.c:704
+msgid "Letterbox"
+msgstr "Letterbox"
+
+#: ttxtsubs.c:705
+msgid "Text Vertical Adjust"
+msgstr "Text vertikal verschieben"
+
+#: ttxtsubs.c:707
+msgid "Line Spacing Adjust"
+msgstr "Zeilenabstand einstellen"
+
+#: ttxtsubs.c:709
+msgid "Workaround for some French chns"
+msgstr "Workaround für französische Kanäle"
+
+#: ttxtsubs.c:713
+msgid "DVB Source Selection"
+msgstr "DVB Quelle Auswahl"
+
+#: ttxtsubs.c:716
+msgid "Font Size (pixel)"
+msgstr ""
+
+#: ttxtsubs.c:720
+msgid "Text Color"
+msgstr "Textfarbe"
+
+#: ttxtsubs.c:724
+msgid "Background Color"
+msgstr "Hintergrundfarbe"
+
+#: ttxtsubs.c:736
+msgid "Custom Color"
+msgstr "Benutzerdefinierte Farbe"
+
+#: ttxtsubs.c:741
+msgid "Red Value"
+msgstr "Roter Wert"
+
+#: ttxtsubs.c:742
+msgid "Green Value"
+msgstr "Grüner Wert"
+
+#: ttxtsubs.c:743
+msgid "Blue Value"
+msgstr "Blauer Wert"
+
+#: ttxtsubs.c:744
+msgid "Transparency Value"
+msgstr "Transparenter Wert"
+
+#: ttxtsubs.c:754 ttxtsubs.c:762
+msgid "Language"
+msgstr "Sprache"
+
+#: ttxtsubs.c:762
+msgid "Hearing Impaired"
+msgstr "Gehörlose"
+
+#: ttxtsubspagemenu.c:17
+msgid "Subtitle Page Settings"
+msgstr "Untertitelseiten Einstellung"
+
+#: ttxtsubspagemenu.c:31
+msgid "Auto"
+msgstr "Automatisch"
+
+#: ttxtsubspagemenu.c:32
+msgid "Manual"
+msgstr "Manuell"
+
+#: ttxtsubspagemenu.c:33
+msgid "Disabled"
+msgstr "Deaktiviert"
+
+#: ttxtsubspagemenu.c:37
+msgid "Subtitle Mode"
+msgstr "Untertitelmodus"
+
+#: ttxtsubspagemenu.c:38
+msgid "Manual Subtitle Page"
+msgstr "Manuelle Untertitelseite"
diff -Nru ttxtsubs-0.0.5/po/es_ES.po ttxtsubs-0.0.5-raastinrauta-edition/po/es_ES.po
--- ttxtsubs-0.0.5/po/es_ES.po	1970-01-01 02:00:00.000000000 +0200
+++ ttxtsubs-0.0.5-raastinrauta-edition/po/es_ES.po	2008-01-13 18:17:43.000000000 +0200
@@ -0,0 +1,240 @@
+# VDR plugin language source file.
+# Copyright (C) 2007 Klaus Schmidinger <kls@cadsoft.de>
+# This file is distributed under the same license as the VDR package.
+# Ruben Nunez Francisco <ruben.nunez@tang-it.com>, 2002
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: VDR 1.5.7\n"
+"Report-Msgid-Bugs-To: <author>\n"
+"POT-Creation-Date: 2007-09-25 21:58+0300\n"
+"PO-Revision-Date: 2007-08-24 23:49+0300\n"
+"Last-Translator: Ruben Nunez Francisco <ruben.nunez@tang-it.com>\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"
+
+#: ttxtsubs.c:51
+msgid "Teletext subtitles"
+msgstr "Subtítulos teletexto"
+
+#: ttxtsubs.c:302
+msgid "Hide teletext subtitles"
+msgstr "Esconde subtítulos teletexto"
+
+#: ttxtsubs.c:304
+msgid "Display teletext subtitles"
+msgstr "Visualiza subtítulos teletexto"
+
+#: ttxtsubs.c:307
+msgid "Position Teletext Subtitles for 4:3/Anamorph"
+msgstr "Posiciona subtítulos teletexto para 4:3/anamórfico"
+
+#: ttxtsubs.c:309
+msgid "Position Teletext Subtitles for Letterbox"
+msgstr "Posicióna subtítulos teletexto para Letterbox"
+
+#: ttxtsubs.c:311
+msgid "Page Selection"
+msgstr "Selección página subtítulos"
+
+#: ttxtsubs.c:641
+msgid "Display on/off"
+msgstr "Visualiza sí/no"
+
+#: ttxtsubs.c:642
+msgid "4:3/Letterbox"
+msgstr "4:3/Letterbox"
+
+#: ttxtsubs.c:643
+msgid "Page Mode"
+msgstr "Modo página"
+
+#: ttxtsubs.c:646
+msgid "Left"
+msgstr "Izquierda"
+
+#: ttxtsubs.c:647
+msgid "Center"
+msgstr "Centro"
+
+#: ttxtsubs.c:648
+msgid "Right"
+msgstr "Derecha"
+
+#: ttxtsubs.c:651
+msgid "All"
+msgstr "Todas"
+
+#: ttxtsubs.c:652
+msgid "Only DVB-S"
+msgstr "Sólo DVB-S"
+
+#: ttxtsubs.c:653
+msgid "Only DVB-T"
+msgstr "Sólo DVB-T"
+
+#: ttxtsubs.c:654
+msgid "Only DVB-C"
+msgstr "Sólo DVB-C"
+
+#: ttxtsubs.c:657
+msgid "Black"
+msgstr "Negro"
+
+#: ttxtsubs.c:658
+msgid "White"
+msgstr "Blanco"
+
+#: ttxtsubs.c:659
+msgid "Red"
+msgstr "Rojo"
+
+#: ttxtsubs.c:660
+msgid "Green"
+msgstr "Verde"
+
+#: ttxtsubs.c:661
+msgid "Yellow"
+msgstr "Amarillo"
+
+#: ttxtsubs.c:662
+msgid "Magenta"
+msgstr "Magenta"
+
+#: ttxtsubs.c:663
+msgid "Blue"
+msgstr "Azul"
+
+#: ttxtsubs.c:664
+msgid "Cyan"
+msgstr "Cian"
+
+#: ttxtsubs.c:665
+msgid "Custom"
+msgstr "Personalizado"
+
+#: ttxtsubs.c:666
+msgid "Transparent"
+msgstr "Transparente"
+
+#: ttxtsubs.c:667
+msgid "Grey"
+msgstr "Gris"
+
+#: ttxtsubs.c:691 ttxtsubspagemenu.c:36
+msgid "Display Subtitles"
+msgstr "Visualiza subtítulos"
+
+#: ttxtsubs.c:692
+msgid "Record Subtitles"
+msgstr "Graba subtítulos"
+
+#: ttxtsubs.c:693
+msgid "Live Delay"
+msgstr "Retardo en directo"
+
+#: ttxtsubs.c:694
+msgid "Replay Delay"
+msgstr "Retardo en reproducción"
+
+#: ttxtsubs.c:697
+msgid "Main Menu Alternative"
+msgstr "Alternativa del menú principal"
+
+#: ttxtsubs.c:701
+msgid "Text Horizontal Position"
+msgstr "´Posición horizontal del texto"
+
+#: ttxtsubs.c:703
+msgid "Text Vertical Position"
+msgstr "Posición vertical del texto"
+
+#: ttxtsubs.c:704
+msgid "4:3/Anamorph"
+msgstr "4:3/Anamórfico"
+
+#: ttxtsubs.c:704
+msgid "Letterbox"
+msgstr "Letterbox"
+
+#: ttxtsubs.c:705
+msgid "Text Vertical Adjust"
+msgstr "Ajuste vertical del texto"
+
+#: ttxtsubs.c:707
+msgid "Line Spacing Adjust"
+msgstr "Ajuste distancia entre líneas"
+
+#: ttxtsubs.c:709
+msgid "Workaround for some French chns"
+msgstr "Corrección para canales franceses"
+
+#: ttxtsubs.c:713
+msgid "DVB Source Selection"
+msgstr "Selección fuente DVB"
+
+#: ttxtsubs.c:716
+msgid "Font Size (pixel)"
+msgstr ""
+
+#: ttxtsubs.c:720
+msgid "Text Color"
+msgstr "Color del texto"
+
+#: ttxtsubs.c:724
+msgid "Background Color"
+msgstr "Color de fondo"
+
+#: ttxtsubs.c:736
+msgid "Custom Color"
+msgstr "Color personalizado"
+
+#: ttxtsubs.c:741
+msgid "Red Value"
+msgstr "Valor rojo"
+
+#: ttxtsubs.c:742
+msgid "Green Value"
+msgstr "Valor verde"
+
+#: ttxtsubs.c:743
+msgid "Blue Value"
+msgstr "Valor azul"
+
+#: ttxtsubs.c:744
+msgid "Transparency Value"
+msgstr "Valor transparencia"
+
+#: ttxtsubs.c:754 ttxtsubs.c:762
+msgid "Language"
+msgstr "Idioma"
+
+#: ttxtsubs.c:762
+msgid "Hearing Impaired"
+msgstr "No oyente"
+
+#: ttxtsubspagemenu.c:17
+msgid "Subtitle Page Settings"
+msgstr "Opciones página subtítulos"
+
+#: ttxtsubspagemenu.c:31
+msgid "Auto"
+msgstr "Automático"
+
+#: ttxtsubspagemenu.c:32
+msgid "Manual"
+msgstr "Manual"
+
+#: ttxtsubspagemenu.c:33
+msgid "Disabled"
+msgstr "Desactivados"
+
+#: ttxtsubspagemenu.c:37
+msgid "Subtitle Mode"
+msgstr "Modo subtítulos"
+
+#: ttxtsubspagemenu.c:38
+msgid "Manual Subtitle Page"
+msgstr "Página manual subtítulos"
diff -Nru ttxtsubs-0.0.5/po/fi_FI.po ttxtsubs-0.0.5-raastinrauta-edition/po/fi_FI.po
--- ttxtsubs-0.0.5/po/fi_FI.po	1970-01-01 02:00:00.000000000 +0200
+++ ttxtsubs-0.0.5-raastinrauta-edition/po/fi_FI.po	2008-01-13 18:17:43.000000000 +0200
@@ -0,0 +1,243 @@
+# VDR plugin language source file.
+# Copyright (C) 2007 Klaus Schmidinger <kls@cadsoft.de>
+# This file is distributed under the same license as the VDR package.
+# Hannu Savolainen <hannu@opensound.com>, 2002
+# Jaakko Hyvätti <jaakko@hyvatti.iki.fi>, 2002
+# Niko Tarnanen <niko.tarnanen@hut.fi>, 2003
+# Rolf Ahrenberg <rahrenbe@cc.hut.fi>, 2003
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: VDR 1.5.7\n"
+"Report-Msgid-Bugs-To: <author>\n"
+"POT-Creation-Date: 2007-09-25 21:58+0300\n"
+"PO-Revision-Date: 2007-08-24 23:49+0300\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"
+
+#: ttxtsubs.c:51
+msgid "Teletext subtitles"
+msgstr "Tekstitys (Teksti-TV)"
+
+#: ttxtsubs.c:302
+msgid "Hide teletext subtitles"
+msgstr "Piilota tekstitys (Teksti-TV)"
+
+#: ttxtsubs.c:304
+msgid "Display teletext subtitles"
+msgstr "Näytä tekstitys (Teksti-TV)"
+
+#: ttxtsubs.c:307
+msgid "Position Teletext Subtitles for 4:3/Anamorph"
+msgstr "4:3/Anamorfinen tekstitys (Teksti-TV)"
+
+#: ttxtsubs.c:309
+msgid "Position Teletext Subtitles for Letterbox"
+msgstr "Letterbox tekstitys (Teksti-TV)"
+
+#: ttxtsubs.c:311
+msgid "Page Selection"
+msgstr "Tekstityssivun valinta"
+
+#: ttxtsubs.c:641
+msgid "Display on/off"
+msgstr "aktivointi"
+
+#: ttxtsubs.c:642
+msgid "4:3/Letterbox"
+msgstr "kuvasuhde"
+
+#: ttxtsubs.c:643
+msgid "Page Mode"
+msgstr "sivun valinta"
+
+#: ttxtsubs.c:646
+msgid "Left"
+msgstr "vasen"
+
+#: ttxtsubs.c:647
+msgid "Center"
+msgstr "keskitä"
+
+#: ttxtsubs.c:648
+msgid "Right"
+msgstr "oikea"
+
+#: ttxtsubs.c:651
+msgid "All"
+msgstr "kaikki"
+
+#: ttxtsubs.c:652
+msgid "Only DVB-S"
+msgstr "vain DVB-S"
+
+#: ttxtsubs.c:653
+msgid "Only DVB-T"
+msgstr "vain DVB-T"
+
+#: ttxtsubs.c:654
+msgid "Only DVB-C"
+msgstr "vain DVB-C"
+
+#: ttxtsubs.c:657
+msgid "Black"
+msgstr "musta"
+
+#: ttxtsubs.c:658
+msgid "White"
+msgstr "valkoinen"
+
+#: ttxtsubs.c:659
+msgid "Red"
+msgstr "punainen"
+
+#: ttxtsubs.c:660
+msgid "Green"
+msgstr "vihreä"
+
+#: ttxtsubs.c:661
+msgid "Yellow"
+msgstr "keltainen"
+
+#: ttxtsubs.c:662
+msgid "Magenta"
+msgstr "magenta"
+
+#: ttxtsubs.c:663
+msgid "Blue"
+msgstr "sininen"
+
+#: ttxtsubs.c:664
+msgid "Cyan"
+msgstr "syaani"
+
+#: ttxtsubs.c:665
+msgid "Custom"
+msgstr "muokattava"
+
+#: ttxtsubs.c:666
+msgid "Transparent"
+msgstr "läpinäkyvä"
+
+#: ttxtsubs.c:667
+msgid "Grey"
+msgstr "harmaa"
+
+#: ttxtsubs.c:691 ttxtsubspagemenu.c:36
+msgid "Display Subtitles"
+msgstr "Näytä tekstitykset"
+
+#: ttxtsubs.c:692
+msgid "Record Subtitles"
+msgstr "Tallenna tekstitykset"
+
+#: ttxtsubs.c:693
+msgid "Live Delay"
+msgstr "Viive Live-lähetyksessä"
+
+#: ttxtsubs.c:694
+msgid "Replay Delay"
+msgstr "Viive toistossa"
+
+#: ttxtsubs.c:697
+msgid "Main Menu Alternative"
+msgstr "Päävalikon toiminnot"
+
+#: ttxtsubs.c:701
+msgid "Text Horizontal Position"
+msgstr "Vaakatasaus"
+
+#: ttxtsubs.c:703
+msgid "Text Vertical Position"
+msgstr "Pystytasaus"
+
+#: ttxtsubs.c:704
+msgid "4:3/Anamorph"
+msgstr "4:3/anamorfinen"
+
+#: ttxtsubs.c:704
+msgid "Letterbox"
+msgstr "letterbox"
+
+#: ttxtsubs.c:705
+msgid "Text Vertical Adjust"
+msgstr "Pystytasauksen hienosäätö"
+
+#: ttxtsubs.c:707
+msgid "Line Spacing Adjust"
+msgstr "Rivivälin hienosäätö"
+
+#: ttxtsubs.c:709
+msgid "Workaround for some French chns"
+msgstr "Ranskalainen silmänkääntötemppu"
+
+#: ttxtsubs.c:713
+msgid "DVB Source Selection"
+msgstr "Tekstityslähteen valinta"
+
+#: ttxtsubs.c:716
+msgid "Font Size (pixel)"
+msgstr "Kirjasintyypin koko (px)"
+
+#: ttxtsubs.c:720
+msgid "Text Color"
+msgstr "Kirjasimen väri"
+
+#: ttxtsubs.c:724
+msgid "Background Color"
+msgstr "Taustaväri"
+
+#: ttxtsubs.c:736
+msgid "Custom Color"
+msgstr "Muokattava väri"
+
+#: ttxtsubs.c:741
+msgid "Red Value"
+msgstr "Punainen"
+
+#: ttxtsubs.c:742
+msgid "Green Value"
+msgstr "Vihreä"
+
+#: ttxtsubs.c:743
+msgid "Blue Value"
+msgstr "Sininen"
+
+#: ttxtsubs.c:744
+msgid "Transparency Value"
+msgstr "Läpinäkyvyys"
+
+#: ttxtsubs.c:754 ttxtsubs.c:762
+msgid "Language"
+msgstr "Tekstityskieli"
+
+#: ttxtsubs.c:762
+msgid "Hearing Impaired"
+msgstr "kuulorajoitteisille"
+
+#: ttxtsubspagemenu.c:17
+msgid "Subtitle Page Settings"
+msgstr "Tekstityssivun asetukset"
+
+#: ttxtsubspagemenu.c:31
+msgid "Auto"
+msgstr "automaattinen"
+
+#: ttxtsubspagemenu.c:32
+msgid "Manual"
+msgstr "manuaalinen"
+
+#: ttxtsubspagemenu.c:33
+msgid "Disabled"
+msgstr "pois"
+
+#: ttxtsubspagemenu.c:37
+msgid "Subtitle Mode"
+msgstr "Tekstitystapa"
+
+#: ttxtsubspagemenu.c:38
+msgid "Manual Subtitle Page"
+msgstr "Asetettu tekstityssivu"
diff -Nru ttxtsubs-0.0.5/po/fr_FR.po ttxtsubs-0.0.5-raastinrauta-edition/po/fr_FR.po
--- ttxtsubs-0.0.5/po/fr_FR.po	1970-01-01 02:00:00.000000000 +0200
+++ ttxtsubs-0.0.5-raastinrauta-edition/po/fr_FR.po	2008-01-22 19:08:58.000000000 +0200
@@ -0,0 +1,243 @@
+# VDR plugin language source file.
+# Copyright (C) 2007 Klaus Schmidinger <kls@cadsoft.de>
+# This file is distributed under the same license as the VDR package.
+# Jean-Claude Repetto <jc@repetto.org>, 2001
+# Olivier Jacques <jacquesolivier@hotmail.com>, 2003
+# Gregoire Favre <greg@magma.unil.ch>, 2003
+# Nicolas Huillard <nhuillard@e-dition.fr>, 2005
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: VDR 1.5.7\n"
+"Report-Msgid-Bugs-To: <author>\n"
+"POT-Creation-Date: 2007-09-25 21:58+0300\n"
+"PO-Revision-Date: 2007-08-24 23:49+0300\n"
+"Last-Translator: Nicolas Huillard <nhuillard@e-dition.fr>\n"
+"Language-Team: <vdr@linuxtv.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=ISO-8859-1\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: ttxtsubs.c:51
+msgid "Teletext subtitles"
+msgstr "Sous-titrage télétexte"
+
+#: ttxtsubs.c:302
+msgid "Hide teletext subtitles"
+msgstr "Masquer le sous-titrage"
+
+#: ttxtsubs.c:304
+msgid "Display teletext subtitles"
+msgstr "Afficher le sous-titrage"
+
+#: ttxtsubs.c:307
+msgid "Position Teletext Subtitles for 4:3/Anamorph"
+msgstr "Position du sous-titrage pour 4:3/Anamorph"
+
+#: ttxtsubs.c:309
+msgid "Position Teletext Subtitles for Letterbox"
+msgstr "Position du sous-titrage pour Letterbox"
+
+#: ttxtsubs.c:311
+msgid "Page Selection"
+msgstr "Page de sélection"
+
+#: ttxtsubs.c:641
+msgid "Display on/off"
+msgstr "Affichage"
+
+#: ttxtsubs.c:642
+msgid "4:3/Letterbox"
+msgstr "4:3/Letterbox"
+
+#: ttxtsubs.c:643
+msgid "Page Mode"
+msgstr "Mode page"
+
+#: ttxtsubs.c:646
+msgid "Left"
+msgstr "Gauche"
+
+#: ttxtsubs.c:647
+msgid "Center"
+msgstr "Centre"
+
+#: ttxtsubs.c:648
+msgid "Right"
+msgstr "Droite"
+
+#: ttxtsubs.c:651
+msgid "All"
+msgstr "Tous"
+
+#: ttxtsubs.c:652
+msgid "Only DVB-S"
+msgstr "Seulement DVB-S"
+
+#: ttxtsubs.c:653
+msgid "Only DVB-T"
+msgstr "Seulement DVB-T"
+
+#: ttxtsubs.c:654
+msgid "Only DVB-C"
+msgstr "Seulement DVB-C"
+
+#: ttxtsubs.c:657
+msgid "Black"
+msgstr "Noir"
+
+#: ttxtsubs.c:658
+msgid "White"
+msgstr "Blanc"
+
+#: ttxtsubs.c:659
+msgid "Red"
+msgstr "Rouge"
+
+#: ttxtsubs.c:660
+msgid "Green"
+msgstr "Vert"
+
+#: ttxtsubs.c:661
+msgid "Yellow"
+msgstr "Jaune"
+
+#: ttxtsubs.c:662
+msgid "Magenta"
+msgstr "Magenta"
+
+#: ttxtsubs.c:663
+msgid "Blue"
+msgstr "Bleu"
+
+#: ttxtsubs.c:664
+msgid "Cyan"
+msgstr "Cyan"
+
+#: ttxtsubs.c:665
+msgid "Custom"
+msgstr "Personnalisé"
+
+#: ttxtsubs.c:666
+msgid "Transparent"
+msgstr "Transparent"
+
+#: ttxtsubs.c:667
+msgid "Grey"
+msgstr "Gris"
+
+#: ttxtsubs.c:691 ttxtsubspagemenu.c:36
+msgid "Display Subtitles"
+msgstr "Afficher le sous-titrage"
+
+#: ttxtsubs.c:692
+msgid "Record Subtitles"
+msgstr "Enregistrer le sous-titrage"
+
+#: ttxtsubs.c:693
+msgid "Live Delay"
+msgstr ""
+
+#: ttxtsubs.c:694
+msgid "Replay Delay"
+msgstr ""
+
+#: ttxtsubs.c:697
+msgid "Main Menu Alternative"
+msgstr "Choix du menu principal"
+
+#: ttxtsubs.c:701
+msgid "Text Horizontal Position"
+msgstr "Position horizontale du texte"
+
+#: ttxtsubs.c:703
+msgid "Text Vertical Position"
+msgstr "Position verticale du texte"
+
+#: ttxtsubs.c:704
+msgid "4:3/Anamorph"
+msgstr "4:3/Anamorph"
+
+#: ttxtsubs.c:704
+msgid "Letterbox"
+msgstr "Letterbox"
+
+#: ttxtsubs.c:705
+msgid "Text Vertical Adjust"
+msgstr "Ajustement vertical du texte"
+
+#: ttxtsubs.c:707
+msgid "Line Spacing Adjust"
+msgstr "Espacement des lignes"
+
+#: ttxtsubs.c:709
+msgid "Workaround for some French chns"
+msgstr "Contournement chaînes françaises"
+
+#: ttxtsubs.c:713
+msgid "DVB Source Selection"
+msgstr "Sélection Source DVB"
+
+#: ttxtsubs.c:716
+msgid "Font Size (pixel)"
+msgstr "Taille Police (pixel)"
+
+#: ttxtsubs.c:720
+msgid "Text Color"
+msgstr "Couleur du texte"
+
+#: ttxtsubs.c:724
+msgid "Background Color"
+msgstr "Couleur du fond"
+
+#: ttxtsubs.c:736
+msgid "Custom Color"
+msgstr "Couleur personnalisée"
+
+#: ttxtsubs.c:741
+msgid "Red Value"
+msgstr "Valeur Rouge"
+
+#: ttxtsubs.c:742
+msgid "Green Value"
+msgstr "Valeur Vert"
+
+#: ttxtsubs.c:743
+msgid "Blue Value"
+msgstr "Valeur Bleu"
+
+#: ttxtsubs.c:744
+msgid "Transparency Value"
+msgstr "Valeur de transparence"
+
+#: ttxtsubs.c:754 ttxtsubs.c:762
+msgid "Language"
+msgstr "Langues"
+
+#: ttxtsubs.c:762
+msgid "Hearing Impaired"
+msgstr "Malentendant"
+
+#: ttxtsubspagemenu.c:17
+msgid "Subtitle Page Settings"
+msgstr "Conf. Page sous-titres TXT"
+
+#: ttxtsubspagemenu.c:31
+msgid "Auto"
+msgstr "Auto"
+
+#: ttxtsubspagemenu.c:32
+msgid "Manual"
+msgstr "Manuel"
+
+#: ttxtsubspagemenu.c:33
+msgid "Disabled"
+msgstr "Désactivé"
+
+#: ttxtsubspagemenu.c:37
+msgid "Subtitle Mode"
+msgstr "Mode de sous-titres TXT"
+
+#: ttxtsubspagemenu.c:38
+msgid "Manual Subtitle Page"
+msgstr "Page des sous-titres"
diff -Nru ttxtsubs-0.0.5/po/it_IT.po ttxtsubs-0.0.5-raastinrauta-edition/po/it_IT.po
--- ttxtsubs-0.0.5/po/it_IT.po	1970-01-01 02:00:00.000000000 +0200
+++ ttxtsubs-0.0.5-raastinrauta-edition/po/it_IT.po	2008-01-13 18:17:43.000000000 +0200
@@ -0,0 +1,242 @@
+# VDR plugin language source file.
+# Copyright (C) 2007 Klaus Schmidinger <kls@cadsoft.de>
+# This file is distributed under the same license as the VDR package.
+# Alberto Carraro <bertocar@tin.it>, 2001
+# Antonio Ospite <ospite@studenti.unina.it>, 2003
+# Sean Carlos <seanc@libero.it>, 2005
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: VDR 1.5.7\n"
+"Report-Msgid-Bugs-To: <author>\n"
+"POT-Creation-Date: 2007-09-25 21:58+0300\n"
+"PO-Revision-Date: 2007-08-24 23:49+0300\n"
+"Last-Translator: Sean Carlos <seanc@libero.it>\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"
+
+#: ttxtsubs.c:51
+msgid "Teletext subtitles"
+msgstr "Sottotitoli televideo"
+
+#: ttxtsubs.c:302
+msgid "Hide teletext subtitles"
+msgstr "Nascondi sottotitoli televideo"
+
+#: ttxtsubs.c:304
+msgid "Display teletext subtitles"
+msgstr "Visualizza sottotitoli televideo"
+
+#: ttxtsubs.c:307
+msgid "Position Teletext Subtitles for 4:3/Anamorph"
+msgstr "Posizionare sottotitoli per 4:3/anamorfico"
+
+#: ttxtsubs.c:309
+msgid "Position Teletext Subtitles for Letterbox"
+msgstr "Posizionare sottotitoli per Letterbox"
+
+#: ttxtsubs.c:311
+msgid "Page Selection"
+msgstr "Selezione pagina"
+
+#: ttxtsubs.c:641
+msgid "Display on/off"
+msgstr "Visualizza sì/no"
+
+#: ttxtsubs.c:642
+msgid "4:3/Letterbox"
+msgstr "4:3/Letterbox"
+
+#: ttxtsubs.c:643
+msgid "Page Mode"
+msgstr "Modo pagina"
+
+#: ttxtsubs.c:646
+msgid "Left"
+msgstr "Sinistra"
+
+#: ttxtsubs.c:647
+msgid "Center"
+msgstr "Centro"
+
+#: ttxtsubs.c:648
+msgid "Right"
+msgstr "Destra"
+
+#: ttxtsubs.c:651
+msgid "All"
+msgstr "Tutte"
+
+#: ttxtsubs.c:652
+msgid "Only DVB-S"
+msgstr "Solo DVB-S"
+
+#: ttxtsubs.c:653
+msgid "Only DVB-T"
+msgstr "Solo DVB-T"
+
+#: ttxtsubs.c:654
+msgid "Only DVB-C"
+msgstr "Solo DVB-C"
+
+#: ttxtsubs.c:657
+msgid "Black"
+msgstr "Nero"
+
+#: ttxtsubs.c:658
+msgid "White"
+msgstr "Bianco"
+
+#: ttxtsubs.c:659
+msgid "Red"
+msgstr "Rosso"
+
+#: ttxtsubs.c:660
+msgid "Green"
+msgstr "Verde"
+
+#: ttxtsubs.c:661
+msgid "Yellow"
+msgstr "Giallo"
+
+#: ttxtsubs.c:662
+msgid "Magenta"
+msgstr "Magenta"
+
+#: ttxtsubs.c:663
+msgid "Blue"
+msgstr "Azzurro"
+
+#: ttxtsubs.c:664
+msgid "Cyan"
+msgstr "Ciano"
+
+#: ttxtsubs.c:665
+msgid "Custom"
+msgstr "Personalizzato"
+
+#: ttxtsubs.c:666
+msgid "Transparent"
+msgstr "Trasparente"
+
+#: ttxtsubs.c:667
+msgid "Grey"
+msgstr "Grigio"
+
+#: ttxtsubs.c:691 ttxtsubspagemenu.c:36
+msgid "Display Subtitles"
+msgstr "Visualizza sottotitoli"
+
+#: ttxtsubs.c:692
+msgid "Record Subtitles"
+msgstr "Registra sottotitoli"
+
+#: ttxtsubs.c:693
+msgid "Live Delay"
+msgstr "Ritardo in diretta"
+
+#: ttxtsubs.c:694
+msgid "Replay Delay"
+msgstr "Ritardo in riproduzione"
+
+#: ttxtsubs.c:697
+msgid "Main Menu Alternative"
+msgstr "Alternativa menù principale"
+
+#: ttxtsubs.c:701
+msgid "Text Horizontal Position"
+msgstr "Posizione testo orizzontale"
+
+#: ttxtsubs.c:703
+msgid "Text Vertical Position"
+msgstr "Posizione testo verticale"
+
+#: ttxtsubs.c:704
+msgid "4:3/Anamorph"
+msgstr "4:3/anamorfico"
+
+#: ttxtsubs.c:704
+msgid "Letterbox"
+msgstr "Letterbox"
+
+#: ttxtsubs.c:705
+msgid "Text Vertical Adjust"
+msgstr "Correzione testo verticale"
+
+#: ttxtsubs.c:707
+msgid "Line Spacing Adjust"
+msgstr "Correzione interlinea"
+
+#: ttxtsubs.c:709
+msgid "Workaround for some French chns"
+msgstr "Correzione per canali francesi"
+
+#: ttxtsubs.c:713
+msgid "DVB Source Selection"
+msgstr "Selezione sorgente DVB"
+
+#: ttxtsubs.c:716
+msgid "Font Size (pixel)"
+msgstr ""
+
+#: ttxtsubs.c:720
+msgid "Text Color"
+msgstr "Colore testo"
+
+#: ttxtsubs.c:724
+msgid "Background Color"
+msgstr "Colore sfondo"
+
+#: ttxtsubs.c:736
+msgid "Custom Color"
+msgstr "Colore personalizzato"
+
+#: ttxtsubs.c:741
+msgid "Red Value"
+msgstr "Valore rosso"
+
+#: ttxtsubs.c:742
+msgid "Green Value"
+msgstr "Valore verde"
+
+#: ttxtsubs.c:743
+msgid "Blue Value"
+msgstr "Valore azzurro"
+
+#: ttxtsubs.c:744
+msgid "Transparency Value"
+msgstr "Valore trasparenza"
+
+#: ttxtsubs.c:754 ttxtsubs.c:762
+msgid "Language"
+msgstr "Lingua"
+
+#: ttxtsubs.c:762
+msgid "Hearing Impaired"
+msgstr "Non udente"
+
+#: ttxtsubspagemenu.c:17
+msgid "Subtitle Page Settings"
+msgstr "Settaggi pagina sottotitoli"
+
+#: ttxtsubspagemenu.c:31
+msgid "Auto"
+msgstr "Automatico"
+
+#: ttxtsubspagemenu.c:32
+msgid "Manual"
+msgstr "Manuale"
+
+#: ttxtsubspagemenu.c:33
+msgid "Disabled"
+msgstr "Disattivati"
+
+#: ttxtsubspagemenu.c:37
+msgid "Subtitle Mode"
+msgstr "Modo sottotitoli"
+
+#: ttxtsubspagemenu.c:38
+msgid "Manual Subtitle Page"
+msgstr "Pagina manuale sottotitoli"
diff -Nru ttxtsubs-0.0.5/po/ru_RU.po ttxtsubs-0.0.5-raastinrauta-edition/po/ru_RU.po
--- ttxtsubs-0.0.5/po/ru_RU.po	1970-01-01 02:00:00.000000000 +0200
+++ ttxtsubs-0.0.5-raastinrauta-edition/po/ru_RU.po	2008-01-13 18:17:43.000000000 +0200
@@ -0,0 +1,240 @@
+# VDR plugin language source file.
+# Copyright (C) 2007 Klaus Schmidinger <kls@cadsoft.de>
+# This file is distributed under the same license as the VDR package.
+# Vyacheslav Dikonov <sdiconov@mail.ru>, 2004
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: VDR 1.5.7\n"
+"Report-Msgid-Bugs-To: <author>\n"
+"POT-Creation-Date: 2007-09-25 21:58+0300\n"
+"PO-Revision-Date: 2007-08-24 23:49+0300\n"
+"Last-Translator: Vyacheslav Dikonov <sdiconov@mail.ru>\n"
+"Language-Team: <vdr@linuxtv.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=ISO-8859-5\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: ttxtsubs.c:51
+msgid "Teletext subtitles"
+msgstr "ÂÕÛÕâÕÚáâ-áãÑâØâàë"
+
+#: ttxtsubs.c:302
+msgid "Hide teletext subtitles"
+msgstr "ÁÚàëâì áãÑâØâàë"
+
+#: ttxtsubs.c:304
+msgid "Display teletext subtitles"
+msgstr "¿ÞÚÐ×ëÒÐâì áãÑâØâàë"
+
+#: ttxtsubs.c:307
+msgid "Position Teletext Subtitles for 4:3/Anamorph"
+msgstr "ÁãÑâØâàë Ò ÚÐÔàÕ 4:3"
+
+#: ttxtsubs.c:309
+msgid "Position Teletext Subtitles for Letterbox"
+msgstr "ÁãÑâØâàë Ò ÚÐÔàÕ èØàÞÚÞíÚàÐÝÝÞÓÞ äØÛìÜÐ"
+
+#: ttxtsubs.c:311
+msgid "Page Selection"
+msgstr ""
+
+#: ttxtsubs.c:641
+msgid "Display on/off"
+msgstr "ÒÚÛîçØâì/ÒëÚÛîçØâì"
+
+#: ttxtsubs.c:642
+msgid "4:3/Letterbox"
+msgstr "4:3/èØàÞÚØÙ íÚàÐÝ"
+
+#: ttxtsubs.c:643
+msgid "Page Mode"
+msgstr ""
+
+#: ttxtsubs.c:646
+msgid "Left"
+msgstr "áÛÕÒÐ"
+
+#: ttxtsubs.c:647
+msgid "Center"
+msgstr "Ò æÕÝâàÕ"
+
+#: ttxtsubs.c:648
+msgid "Right"
+msgstr "áßàÐÒÐ"
+
+#: ttxtsubs.c:651
+msgid "All"
+msgstr ""
+
+#: ttxtsubs.c:652
+msgid "Only DVB-S"
+msgstr ""
+
+#: ttxtsubs.c:653
+msgid "Only DVB-T"
+msgstr ""
+
+#: ttxtsubs.c:654
+msgid "Only DVB-C"
+msgstr ""
+
+#: ttxtsubs.c:657
+msgid "Black"
+msgstr "çñàÝëÙ"
+
+#: ttxtsubs.c:658
+msgid "White"
+msgstr "ÑÕÛëÙ"
+
+#: ttxtsubs.c:659
+msgid "Red"
+msgstr "ÚàÐáÝëÙ"
+
+#: ttxtsubs.c:660
+msgid "Green"
+msgstr "×ÕÛñÝëÙ"
+
+#: ttxtsubs.c:661
+msgid "Yellow"
+msgstr "ÖñÛâëÙ"
+
+#: ttxtsubs.c:662
+msgid "Magenta"
+msgstr "ßãàßãàÝëÙ"
+
+#: ttxtsubs.c:663
+msgid "Blue"
+msgstr "áØÝØÙ"
+
+#: ttxtsubs.c:664
+msgid "Cyan"
+msgstr "ÓÞÛãÑÞÙ"
+
+#: ttxtsubs.c:665
+msgid "Custom"
+msgstr "ÝÐáâàÐØÒÐÕÜëÙ"
+
+#: ttxtsubs.c:666
+msgid "Transparent"
+msgstr "ßàÞ×àÐçÝëÙ"
+
+#: ttxtsubs.c:667
+msgid "Grey"
+msgstr "áÕàëÙ"
+
+#: ttxtsubs.c:691 ttxtsubspagemenu.c:36
+msgid "Display Subtitles"
+msgstr "¿ÞÚÐ×ëÒÐâì áãÑâØâàë"
+
+#: ttxtsubs.c:692
+msgid "Record Subtitles"
+msgstr "·ÐßØáëÒÐâì áãÑâØâàë"
+
+#: ttxtsubs.c:693
+msgid "Live Delay"
+msgstr ""
+
+#: ttxtsubs.c:694
+msgid "Replay Delay"
+msgstr ""
+
+#: ttxtsubs.c:697
+msgid "Main Menu Alternative"
+msgstr "ºÞÜÐÝÔÐ Ò ÓÛÐÒÝÞÜ ÜÕÝî"
+
+#: ttxtsubs.c:701
+msgid "Text Horizontal Position"
+msgstr "ÀÐ×ÜÕéÕÝØÕ âÕÚáâÐ ßÞ ÓÞàØ×ÞÝâÐÛØ"
+
+#: ttxtsubs.c:703
+msgid "Text Vertical Position"
+msgstr "ÀÐ×ÜÕéÕÝØÕ âÕÚáâÐ ßÞ ÒÕàâØÚÐÛØ"
+
+#: ttxtsubs.c:704
+msgid "4:3/Anamorph"
+msgstr "4:3"
+
+#: ttxtsubs.c:704
+msgid "Letterbox"
+msgstr "èØàÞÚØÙ íÚàÐÝ"
+
+#: ttxtsubs.c:705
+msgid "Text Vertical Adjust"
+msgstr "²ÕàâØÚÐÛìÝëÙ áÔÒØÓ âÕÚáâÐ"
+
+#: ttxtsubs.c:707
+msgid "Line Spacing Adjust"
+msgstr "ÀÐááâÞïÝØÕ ÜÕÖÔã áâàÞÚÐÜØ"
+
+#: ttxtsubs.c:709
+msgid "Workaround for some French chns"
+msgstr "ÁßÕæ. ÝÐáâàÞÙÚØ ÔÛï äàÐÝæ. ÚÐÝÐÛÞÒ"
+
+#: ttxtsubs.c:713
+msgid "DVB Source Selection"
+msgstr ""
+
+#: ttxtsubs.c:716
+msgid "Font Size (pixel)"
+msgstr ""
+
+#: ttxtsubs.c:720
+msgid "Text Color"
+msgstr "ÆÒÕâ âÕÚáâÐ"
+
+#: ttxtsubs.c:724
+msgid "Background Color"
+msgstr "ÆÒÕâ äÞÝÐ"
+
+#: ttxtsubs.c:736
+msgid "Custom Color"
+msgstr "½ÐáâàÐØÒÐÕÜëÙ æÒÕâ"
+
+#: ttxtsubs.c:741
+msgid "Red Value"
+msgstr "ÃàÞÒÕÝì ÚàÐáÝÞÓÞ"
+
+#: ttxtsubs.c:742
+msgid "Green Value"
+msgstr "ÃàÞÒÕÝì ×ÕÛñÝÞÓÞ"
+
+#: ttxtsubs.c:743
+msgid "Blue Value"
+msgstr "ÃàÞÒÕÝì áØÝÕÓÞ"
+
+#: ttxtsubs.c:744
+msgid "Transparency Value"
+msgstr "ÁâÕßÕÝì ßàÞ×àÐçÝÞáâØ"
+
+#: ttxtsubs.c:754 ttxtsubs.c:762
+msgid "Language"
+msgstr "Ï×ëÚ"
+
+#: ttxtsubs.c:762
+msgid "Hearing Impaired"
+msgstr "ÔÛï áÛÐÑÞáÛëèÐéØå"
+
+#: ttxtsubspagemenu.c:17
+msgid "Subtitle Page Settings"
+msgstr ""
+
+#: ttxtsubspagemenu.c:31
+msgid "Auto"
+msgstr ""
+
+#: ttxtsubspagemenu.c:32
+msgid "Manual"
+msgstr ""
+
+#: ttxtsubspagemenu.c:33
+msgid "Disabled"
+msgstr ""
+
+#: ttxtsubspagemenu.c:37
+msgid "Subtitle Mode"
+msgstr ""
+
+#: ttxtsubspagemenu.c:38
+msgid "Manual Subtitle Page"
+msgstr ""
diff -Nru ttxtsubs-0.0.5/po/sv_SE.po ttxtsubs-0.0.5-raastinrauta-edition/po/sv_SE.po
--- ttxtsubs-0.0.5/po/sv_SE.po	1970-01-01 02:00:00.000000000 +0200
+++ ttxtsubs-0.0.5-raastinrauta-edition/po/sv_SE.po	2008-01-13 18:17:43.000000000 +0200
@@ -0,0 +1,241 @@
+# VDR plugin language source file.
+# Copyright (C) 2007 Klaus Schmidinger <kls@cadsoft.de>
+# This file is distributed under the same license as the VDR package.
+# Tomas Prybil <tomas@prybil.se>, 2002
+# Jan Ekholm <chakie@infa.abo.fi>, 2003
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: VDR 1.5.7\n"
+"Report-Msgid-Bugs-To: <author>\n"
+"POT-Creation-Date: 2007-09-25 21:58+0300\n"
+"PO-Revision-Date: 2007-08-24 23:49+0300\n"
+"Last-Translator: Tomas Prybil <tomas@prybil.se>\n"
+"Language-Team: <vdr@linuxtv.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=ISO-8859-1\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: ttxtsubs.c:51
+msgid "Teletext subtitles"
+msgstr "Textning (Text-TV)"
+
+#: ttxtsubs.c:302
+msgid "Hide teletext subtitles"
+msgstr "Göm textning (Text-TV)"
+
+#: ttxtsubs.c:304
+msgid "Display teletext subtitles"
+msgstr "Visa textning (Text-TV)"
+
+#: ttxtsubs.c:307
+msgid "Position Teletext Subtitles for 4:3/Anamorph"
+msgstr "Textning för 4:3/anamorf (Text-TV)"
+
+#: ttxtsubs.c:309
+msgid "Position Teletext Subtitles for Letterbox"
+msgstr "Textning för brevlådeformat (Text-TV)"
+
+#: ttxtsubs.c:311
+msgid "Page Selection"
+msgstr ""
+
+#: ttxtsubs.c:641
+msgid "Display on/off"
+msgstr "Visa textning på/av"
+
+#: ttxtsubs.c:642
+msgid "4:3/Letterbox"
+msgstr "4:3/brevlådeformat"
+
+#: ttxtsubs.c:643
+msgid "Page Mode"
+msgstr ""
+
+#: ttxtsubs.c:646
+msgid "Left"
+msgstr "vänster"
+
+#: ttxtsubs.c:647
+msgid "Center"
+msgstr "centrerad"
+
+#: ttxtsubs.c:648
+msgid "Right"
+msgstr "höger"
+
+#: ttxtsubs.c:651
+msgid "All"
+msgstr ""
+
+#: ttxtsubs.c:652
+msgid "Only DVB-S"
+msgstr ""
+
+#: ttxtsubs.c:653
+msgid "Only DVB-T"
+msgstr ""
+
+#: ttxtsubs.c:654
+msgid "Only DVB-C"
+msgstr ""
+
+#: ttxtsubs.c:657
+msgid "Black"
+msgstr "svart"
+
+#: ttxtsubs.c:658
+msgid "White"
+msgstr "vit"
+
+#: ttxtsubs.c:659
+msgid "Red"
+msgstr "röd"
+
+#: ttxtsubs.c:660
+msgid "Green"
+msgstr "grön"
+
+#: ttxtsubs.c:661
+msgid "Yellow"
+msgstr "gul"
+
+#: ttxtsubs.c:662
+msgid "Magenta"
+msgstr "magenta"
+
+#: ttxtsubs.c:663
+msgid "Blue"
+msgstr "blå"
+
+#: ttxtsubs.c:664
+msgid "Cyan"
+msgstr "cyan"
+
+#: ttxtsubs.c:665
+msgid "Custom"
+msgstr ""
+
+#: ttxtsubs.c:666
+msgid "Transparent"
+msgstr "transparent"
+
+#: ttxtsubs.c:667
+msgid "Grey"
+msgstr "grå"
+
+#: ttxtsubs.c:691 ttxtsubspagemenu.c:36
+msgid "Display Subtitles"
+msgstr "Visa textning"
+
+#: ttxtsubs.c:692
+msgid "Record Subtitles"
+msgstr "Spela in textning"
+
+#: ttxtsubs.c:693
+msgid "Live Delay"
+msgstr ""
+
+#: ttxtsubs.c:694
+msgid "Replay Delay"
+msgstr ""
+
+#: ttxtsubs.c:697
+msgid "Main Menu Alternative"
+msgstr "Huvudmenyalternativ"
+
+#: ttxtsubs.c:701
+msgid "Text Horizontal Position"
+msgstr "Horisontell position"
+
+#: ttxtsubs.c:703
+msgid "Text Vertical Position"
+msgstr "Vertikal positon"
+
+#: ttxtsubs.c:704
+msgid "4:3/Anamorph"
+msgstr "4:3/anamorf"
+
+#: ttxtsubs.c:704
+msgid "Letterbox"
+msgstr "brevlådeformat"
+
+#: ttxtsubs.c:705
+msgid "Text Vertical Adjust"
+msgstr "Vertikal justering"
+
+#: ttxtsubs.c:707
+msgid "Line Spacing Adjust"
+msgstr "Radavstånd"
+
+#: ttxtsubs.c:709
+msgid "Workaround for some French chns"
+msgstr "Fix för vissa franska kanaler"
+
+#: ttxtsubs.c:713
+msgid "DVB Source Selection"
+msgstr ""
+
+#: ttxtsubs.c:716
+msgid "Font Size (pixel)"
+msgstr ""
+
+#: ttxtsubs.c:720
+msgid "Text Color"
+msgstr "Färg på text"
+
+#: ttxtsubs.c:724
+msgid "Background Color"
+msgstr "Färg på bakgrund"
+
+#: ttxtsubs.c:736
+msgid "Custom Color"
+msgstr ""
+
+#: ttxtsubs.c:741
+msgid "Red Value"
+msgstr ""
+
+#: ttxtsubs.c:742
+msgid "Green Value"
+msgstr ""
+
+#: ttxtsubs.c:743
+msgid "Blue Value"
+msgstr ""
+
+#: ttxtsubs.c:744
+msgid "Transparency Value"
+msgstr ""
+
+#: ttxtsubs.c:754 ttxtsubs.c:762
+msgid "Language"
+msgstr "Språk"
+
+#: ttxtsubs.c:762
+msgid "Hearing Impaired"
+msgstr "Nedsatt hörsel"
+
+#: ttxtsubspagemenu.c:17
+msgid "Subtitle Page Settings"
+msgstr ""
+
+#: ttxtsubspagemenu.c:31
+msgid "Auto"
+msgstr ""
+
+#: ttxtsubspagemenu.c:32
+msgid "Manual"
+msgstr ""
+
+#: ttxtsubspagemenu.c:33
+msgid "Disabled"
+msgstr ""
+
+#: ttxtsubspagemenu.c:37
+msgid "Subtitle Mode"
+msgstr ""
+
+#: ttxtsubspagemenu.c:38
+msgid "Manual Subtitle Page"
+msgstr ""
diff -Nru ttxtsubs-0.0.5/siinfo.c ttxtsubs-0.0.5-raastinrauta-edition/siinfo.c
--- ttxtsubs-0.0.5/siinfo.c	2008-01-13 18:18:53.000000000 +0200
+++ ttxtsubs-0.0.5-raastinrauta-edition/siinfo.c	2008-01-13 18:17:43.000000000 +0200
@@ -18,11 +18,13 @@
 
 #include <vdr/device.h>
 #include <vdr/dvbdevice.h>
+#include <vdr/channels.h>
 
 #include "linux/dvb/dmx.h"
 #include "siinfo.h"
 
 #include "ttxtsubsglobals.h"
+#include "ttxtsubschannelsettings.h"
 
 #define DESCR_TELETEXT 0x56
 #define DESCR_DVBSUBTITLES 0x59
@@ -32,57 +34,57 @@
 
 
 // ETSI 300468 6.2.40
-struct ttxt_descr {
-  uint8_t tag   PACK;
-  uint8_t length   PACK;
-  struct {
-    uint8_t lang[3]   PACK;
-    uint8_t type_mag   PACK; // 5 bits type, 3 bits mag
-    uint8_t page_no   PACK;
-  } d[1]   PACK;
+struct PACK ttxt_descr {
+  uint8_t tag;
+  uint8_t length;
+  struct PACK {
+    uint8_t lang[3];
+    uint8_t type_mag; // 5 bits type, 3 bits mag
+    uint8_t page_no;
+  } d[1];
 };
 
-struct sect_header {
-  uint8_t table_id   PACK;
-  uint16_t syntax_len   PACK;
-  uint16_t transport_stream_id   PACK;
-  uint8_t ver_cur   PACK;
-  uint8_t section_number   PACK;
-  uint8_t last_section_number   PACK;
+struct PACK sect_header {
+  uint8_t table_id;
+  uint16_t syntax_len;
+  uint16_t transport_stream_id;
+  uint8_t ver_cur;
+  uint8_t section_number;
+  uint8_t last_section_number;
 };
 
 // H.222.0 2.4.4.3, Table 2-25
-struct PAT_sect {
-  uint8_t table_id   PACK;
-  uint16_t syntax_len   PACK;
-  uint16_t transport_stream_id   PACK;
-  uint8_t vers_curr   PACK;
-  uint8_t sect_no   PACK;
-  uint8_t last_sect   PACK;
-  struct {
-    uint16_t program_number   PACK;
-    uint16_t res_PMTPID   PACK;
-  } d[1] PACK;
+struct PACK PAT_sect {
+  uint8_t table_id;
+  uint16_t syntax_len;
+  uint16_t transport_stream_id;
+  uint8_t vers_curr;
+  uint8_t sect_no;
+  uint8_t last_sect;
+  struct PACK {
+    uint16_t program_number;
+    uint16_t res_PMTPID;
+  } d[1];
 };
 
 // H.222.0 2.4.4.8, Table 2-28
-struct PMT_stream {
-  uint8_t stream_type   PACK;
-  uint16_t res_PID   PACK;
-  uint16_t res_ES_info_len   PACK;
-  uint8_t descrs[2]   PACK;
+struct PACK PMT_stream {
+  uint8_t stream_type;
+  uint16_t res_PID;
+  uint16_t res_ES_info_len;
+  uint8_t descrs[2];
 };
 
-struct PMT_sect {
-  uint8_t table_id   PACK;
-  uint16_t syntax_len   PACK;
-  uint16_t program_number   PACK;
-  uint8_t vers_curr   PACK;
-  uint8_t sect_no   PACK;
-  uint8_t last_sect   PACK;
-  uint16_t res_pcr   PACK;
-  uint16_t res_program_info_length   PACK;
-  struct PMT_stream s   PACK;
+struct PACK PMT_sect {
+  uint8_t table_id;
+  uint16_t syntax_len;
+  uint16_t program_number;
+  uint8_t vers_curr;
+  uint8_t sect_no;
+  uint8_t last_sect;
+  uint16_t res_pcr;
+  uint16_t res_program_info_length;
+  struct PMT_stream s;
 };
 
 
@@ -135,7 +137,7 @@
   if(ret < 0)
     return errno;
   if(ret == 0) { // timeout
-    fprintf(stderr, "ttxtsubs: Service Information read: timeout!\n");
+    esyslog("ttxtsubs: Service Information read: timeout!");
     return -1;
   }
 
@@ -187,7 +189,7 @@
     struct sect_header *h;
     int i;
 
-    if((start_time + 5) < time(NULL)) {
+    if((start_time + 1) < time(NULL)) {
       ret = -1;
       done = 1;
       break;
@@ -204,7 +206,7 @@
     h = (struct sect_header *) p;
 
     if(n != ((ntohs(h->syntax_len) & 0xfff) + 3)) {
-      fprintf(stderr, "bad section length: %x / %x!\n", n, ntohs(h->syntax_len) & 0xfff);
+      esyslog("ttxtsubs: bad section length: %x / %x!\n", n, ntohs(h->syntax_len) & 0xfff);
       continue;
     }
 
@@ -354,7 +356,7 @@
       uint8_t mag = pa->mag;
       if(mag == 0)
 	mag = 8;
-      fprintf(stderr, "Warning: Remapped page number %01x%02x to %01x%02x!\n",
+      esyslog("ttxtsubs: Warning: Remapped page number %01x%02x to %01x%02x!\n",
 	      mag, pa->page, mag, newpage);
       pa->page = newpage;
     }
@@ -462,16 +464,12 @@
 }
 
 
-typedef std::map < int, struct ttxtinfo > cCache;
-
-static cCache gCache;
-
 /*
  * find the ttxt_info in the PMT via the PAT, try first with the SID
  * and if that fails with the VPID
  * return <> 0 on error;
  */
-int GetTtxtInfo(int card_no, int channel, uint16_t sid, uint16_t vpid, struct ttxtinfo *info)
+int GetTtxtInfo(int card_no, const cChannel *c, struct ttxtinfo *info)
 {
   int ret = -1;
   char *patsects[256];
@@ -484,13 +482,51 @@
 
   memset((char *) info, 0, sizeof(*info));
 
-  cCache::iterator iter;
-  iter = gCache.find(channel);
-  if(iter != gCache.end()) {
-    DupTtxtInfo(&iter->second, info);
-    ret = 0;
-    return ret;
+#if 1
+  // <manual page selection patch>
+  cTtxtSubsChannelSetting *cs = 
+    TtxtSubsChannelSettings.Get(c);
+    
+  if (cs && cs->PageMode() == PAGE_MODE_MANUAL) {
+    struct ttxt_descr descr;
+ 
+    if (cs->PageNumber() > 0) {
+      int temp = cs->PageNumber();
+      if (temp>=800) temp-=800;
+      char langs[MAXLANGUAGES][2][4];
+      char hi[MAXLANGUAGES][2];
+      //put as the first language the first one configured,
+      //so that FindSubs will later accept it
+      memcpy(langs,globals.languages(),sizeof(langs));
+      memcpy(hi,globals.hearingImpaireds(),sizeof(hi));
+      for (i = 0; i < MAXLANGUAGES; i++) {
+        for (j = 0; j < 2 ; j++) {
+          if (!langs[i][j][0]) continue;
+         
+          descr.d[0].lang[0] = langs[i][j][0];
+          descr.d[0].lang[1] = langs[i][j][1];
+          descr.d[0].lang[2] = langs[i][j][2];
+          if (hi[i][j]) 
+            descr.d[0].type_mag = (TTXT_SUBTITLE_HEARING_IMPAIRED_PAGE << 3) + (temp / 100); 
+          else 
+            descr.d[0].type_mag = (TTXT_SUBTITLE_PAGE << 3) + (temp / 100);
+
+          temp = temp % 100;
+          descr.d[0].page_no = ((temp / 10) << 4) + (temp % 10);
+      
+          addpageinfo(info, c->Tpid(), &descr, 0);
+          return 0;
+        }
+      }
+      //no language configured
+      return -1;       
+    }
   }
+  if (cs && cs->PageMode() == PAGE_MODE_DISABLED) {
+    return -1;
+  }
+  // </manual page selection patch>
+#endif
 
   for(retry = 0; retry <= 1 && !foundinfo; retry++) { // XXX retry two times due to flaky pat scanning with hw_sections=0
 
@@ -505,7 +541,7 @@
     if(ret)
       goto bail;
     
-    if(sid != 0) {
+    if(c->Sid() != 0) {
       int found;
       
       for(i = 0, found = 0; i < numsects && !found; i++) {
@@ -520,7 +556,7 @@
 	  if(pno == 0)
 	    continue; // network pid
 	  
-	  if(pno == sid) {
+	  if(pno == c->Sid()) {
 	    pmt_pid = ntohs(s->d[j].res_PMTPID) & 0x1fff;
 	    found = 1;
 	  }
@@ -533,7 +569,7 @@
       ret = FindTtxtInfoInPMT(card_no, pmt_pid, 0, info, &foundinfo);
     } else {
       // SID not found, try searching VID in all SIDS
-      if(vpid != 0) {
+      if(c->Vpid() != 0) {
 	int done;
 	for(i = 0, done = 0; i < numsects && !done; i++) {
 	  int numdescrs;
@@ -550,7 +586,7 @@
 	    pmt_pid = ntohs(s->d[j].res_PMTPID) & 0x1fff;
 	    
 	    // printf("GetTtxtInfo C pmt_pid: %d, vpid: %d\n", pmt_pid, vpid); // XXXX
-	    ret = FindTtxtInfoInPMT(card_no, pmt_pid, vpid, info, &foundinfo);
+	    ret = FindTtxtInfoInPMT(card_no, pmt_pid, c->Vpid(), info, &foundinfo);
 	    if(ret) {
 	      done = 1;
 	    }
@@ -563,12 +599,6 @@
 
     FreeSects(patsects);
   }
-    
-  if(foundinfo || (ret == 0 && retry == 2)) {
-    struct ttxtinfo info2;
-    DupTtxtInfo(info, &info2);
-    gCache[channel] = info2;
-  }
 
 bail:
   return ret;
@@ -602,7 +632,7 @@
 }
 
 
-struct ttxtpidinfo *FindSubs(struct ttxtinfo *info, int *pid, int *pageno)
+struct ttxtpidinfo *FindSubs(struct ttxtinfo *info, int *pid, int *pageno, char *lang)
 {
   struct ttxtpidinfo *foundPI = NULL;
   int foundChoise = 1000;
@@ -621,6 +651,7 @@
 	  foundChoise = ch;
 	  *pid = info->p[i].pid;
 	  *pageno = info->p[i].i[j].mag * 0x100 + info->p[i].i[j].page;
+	  strncpy(lang, info->p[i].i[j].lang, 3);
 	  foundPI = &(info->p[i]);
 	}
       }
@@ -632,16 +663,16 @@
   }
 
   if(info->pidcount == 0)
-    fprintf(stderr, "ttxtsubs: No teletext subtitles on channel.\n");
+    isyslog("ttxtsubs: No teletext subtitles on channel.");
   else {
-    fprintf(stderr, "ttxtsubs: Wanted subtitle language(s) not found on channel, available languages:\n");
+    isyslog("ttxtsubs: Wanted subtitle language(s) not found on channel, available languages:");
     for(int i = 0; i < info->pidcount; i++) {
       for(int j = 0; j < info->p[i].pagecount; j++) {
 	int page = info->p[i].i[j].mag * 0x100 + info->p[i].i[j].page;
 	int type = info->p[i].i[j].type;
 	if(page < 0x100)
 	  page += 0x800;
-	fprintf(stderr, "          %03x: %c%c%c %s\n", page, info->p[i].i[j].lang[0],
+	isyslog("ttxtsubs:     %03x: %c%c%c %s", page, info->p[i].i[j].lang[0],
 		info->p[i].i[j].lang[1], info->p[i].i[j].lang[2],
 		type == TTXT_INITIAL_PAGE ? "(Initial Page (The teletext start page, not a subtitles page!))" :
 		type == TTXT_SUBTITLE_PAGE ? "(Subtitles)" :
@@ -658,13 +689,6 @@
 }
 
 
-void
-ClearSICache(void)
-{
-  gCache.clear();
-}
-
-
 #if 0
 int XX_GetTtxtSubtitleInfo(uint16_t pid, int card_no, struct ttxtinfo *info)
 {
@@ -683,7 +707,7 @@
     return len;
 
   if(len != ((ntohs(p->syntax_len) & 0xfff) + 3)) {
-    fprintf(stderr, "bad lengt: %x / %x!\n", len, ntohs(p->syntax_len));
+    dprint("bad length: %x / %x!\n", len, ntohs(p->syntax_len));
     return -1;
   }
 
diff -Nru ttxtsubs-0.0.5/siinfo.h ttxtsubs-0.0.5-raastinrauta-edition/siinfo.h
--- ttxtsubs-0.0.5/siinfo.h	2008-01-13 18:18:53.000000000 +0200
+++ ttxtsubs-0.0.5-raastinrauta-edition/siinfo.h	2008-01-13 18:17:43.000000000 +0200
@@ -30,11 +30,9 @@
  * and if that fails with the VPID
  * return <> 0 on error;
  */
-int GetTtxtInfo(int card_no, int channel, uint16_t sid, uint16_t vpid, struct ttxtinfo *info);
+int GetTtxtInfo(int card_no, const cChannel *c, struct ttxtinfo *info);
 
 void FreeTtxtInfoData(struct ttxtinfo *info);
 void DupTtxtInfo(struct ttxtinfo *in, struct ttxtinfo *out);
 
-struct ttxtpidinfo *FindSubs(struct ttxtinfo *info, int *pid, int *pageno);
-
-void ClearSICache(void);
+struct ttxtpidinfo *FindSubs(struct ttxtinfo *info, int *pid, int *pageno, char *lang);
diff -Nru ttxtsubs-0.0.5/teletext-chars.h ttxtsubs-0.0.5-raastinrauta-edition/teletext-chars.h
--- ttxtsubs-0.0.5/teletext-chars.h	2008-01-13 18:18:53.000000000 +0200
+++ ttxtsubs-0.0.5-raastinrauta-edition/teletext-chars.h	2008-01-13 18:17:43.000000000 +0200
@@ -64,6 +64,22 @@
 {0, 'T', 'g', 'I', 'S', 'Ö', 'Ç', 'Ü', 'G', 'i', 's', 'ö', 'ç', 'ü'}  // 12 - Turkish
 };
 
+uint16_t laG0_nat_opts16[13][14] = {
+{0, '#',    'u',    'c',    't',    'z',    0xc3bd, 0xc3ad, 'r',    0xc3a9, 0xc3a1, 'e',    0xc3ba, 's'   }, // 0 - Czech/Slovak
+{0, 0xc2a3, '$',    '@',    '-',    0xc2bd, '-',    '|',    '#',    '-',    0xc2bc, '#',    0xc2be, 0xc3b7}, // 1 - English
+{0, '#',    0xc3b5, 'S',    0xc384, 0xc396, 'Z',    0xc39c, 0xc395, 's',    0xc3a4, 0xc3b6, 'z',    0xc3bc}, // 2 - Estonian
+{0, 0xc3a9, 0xc3af, 0xc3a0, 0xc3ab, 0xc3aa, 0xc3b9, 0xc3ae, '#',    0xc3a8, 0xc3a2, 0xc3b4, 0xc3bb, 0xc3a7}, // 3 - French
+{0, '#',    '$',    0xc2a7, 0xc384, 0xc396, 0xc39c, '^',    '_',    0xc2ba, 0xc3a4, 0xc3b6, 0xc3bc, 0xc39f}, // 4 - German
+{0, 0xc2a3, '$',    0xc3a9, 0xc2ba, 0xc3a7, '-',    '|',    '#',    0xc3b9, 0xc3a0, 0xc3b2, 0xc3a8, 0xc3ac}, // 5 - Italian
+{0, '#',    '$',    'S',    'e',    'e',    'Z',    'c',    'u',    's',    'a',    'u',    'z',    'i'   }, // 6 - Lettish/Lithuanian
+{0, '#',    'n',    'a',    'Z',    'S',    'L',    'c',    0xc3b3, 'e',    'z',    's',    'l',    'z'   }, // 7 - Polish
+{0, 0xc3a7, '$',    'i',    0xc3a1, 0xc3a9, 0xc3ad, 0xc3b3, 0xc3ba, 0xc2bf, 0xc3bc, 0xc3b1, 0xc3a8, 0xc3a0}, // 8 - Portuguese/Spanish
+{0, '#',    0xc2a4, 'T',    0xc382, 'S',    'A',    0xc38e, 'i',    't',    0xc3a2, 's',    'a',    0xc3ae}, // 9 - Rumanian
+{0, '#',    0xc38b, 'C',    'C',    'Z',    'D',    'S',    0xc3ab, 'c',    'c',    'z',    'd',    's'   }, // 10 - Serbian/Croation/Slovenian
+{0, '#',    0xc2a4, 0xc389, 0xc384, 0xc396, 0xc385, 0xc39c, '_',    0xc3a9, 0xc3a4, 0xc3b6, 0xc3a5, 0xc3bc}, // 11 - Swedish/Finnish/Hungarian
+{0, 'T',    'g',    'I',    'S',    0xc396, 0xc387, 0xc39c, 'G',    'i',    's',    0xc3b6, 0xc3a7, 0xc3bc}  // 12 - Turkish
+};
+
 /*
  * Latin G2 Set
  * ETSI EN 300 706 Table 37
@@ -72,9 +88,20 @@
 '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?',
 '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?',
 ' ', '¡', '¢', '£', '$', '¥', '#', '§', '¤', '´', '"', '«', '-', '|', '-', '|',
-'°', '±', '²', '³', '×', 'µ', '¶', '·', '÷', '\'', '"', '»', '¼', '½', '¾', '¿', 
+'°', '±', '²', '³', '×', 'µ', '¶', '·', '÷', '\'', '"', '»', '¼', '½', '¾', '¿',
 ' ', '`', '´', '^', '~', '-', '?', '·', '¨', '.', 'º', '¸', '_', '"', '?', '?',
 '-', '¹', '®', '©', 'T', '?', 'C', 'p', '?', ' ', ' ', ' ', '?', '?', '?', '?',
 '?', 'Æ', 'D', 'a', '?', '?', ' ', 'I', 'L', 'L', 'Ø', 'Ö', 'o', 'P', 'n', 'n',
 'k', 'æ', 'd', 'd', 'h', 'i', 'i', 'l', 'l', 'ø', 'ö', 'ß', 'p', 't', 'n', '?'
 };
+
+uint16_t laG2_la1_table16[] = {
+'?',    '?',    '?',    '?',    '?',    '?',    '?',    '?',    '?',    '?',    '?',    '?',    '?',    '?',    '?',    '?',
+'?',    '?',    '?',    '?',    '?',    '?',    '?',    '?',    '?',    '?',    '?',    '?',    '?',    '?',    '?',    '?',
+0xc2a0, 0xc2a1, 0xc2a2, 0xc2a3, '$',    0xc2a5, '#',    0xc2a7, 0xc2a4, 0xc2b4, '"',    0xc2ab, '-',    '|',    '-',    '|',
+0xc2b0, 0xc2b1, 0xc2b2, 0xc2b3, 0xc397, 0xc2b5, 0xc2b6, 0xc2b7, 0xc3b7, '\'',   '"',    0xc2bb, 0xc2bc, 0xc2bd, 0xc2be, 0xc2bf,
+' ',    '`',    0xc2b4, '^',    '~',    '-',    '?',    0xc2b7, 0xc2a8, '.',    0xc2ba, 0xc2b8, '_',    '"',    '?',    '?',
+'-',    0xc2b9, 0xc2ae, 0xc2a9, 'T',    '?',    'C',    'p',    '?',    ' ',    ' ',    ' ',    '?',    '?',    '?',    '?',
+'?',    0xc386, 'D',    'a',    '?',    '?',    ' ',    'I',    'L',    'L',    0xc398, 0xc396, 'o',    'P',    'n',    'n',
+'k',    0xc3a6, 'd',    'd',    'h',    'i',    'i',    'l',    'l',    0xc3b8, 0xc3b6, 0xc39f, 'p',    't',    'n',    '?'
+};
diff -Nru ttxtsubs-0.0.5/teletext.c ttxtsubs-0.0.5-raastinrauta-edition/teletext.c
--- ttxtsubs-0.0.5/teletext.c	2008-01-13 18:18:53.000000000 +0200
+++ ttxtsubs-0.0.5-raastinrauta-edition/teletext.c	2008-01-13 18:17:43.000000000 +0200
@@ -12,6 +12,7 @@
 
 //#include <linux/dvb/dmx.h>
 //#include <vdr/osd.h>
+#include <vdr/config.h>
 
 #include "teletext.h"
 #include "teletext-tables.h"
@@ -28,7 +29,7 @@
   c1=unhamtab[a];
   c2=unhamtab[b];
 //  if ((c1|c2)&0x40) 
-//      fprintf(stderr,"bad ham!");
+//      dprint("bad ham!");
   return (c2<<4)|(0x0f&c1);
 }
 
@@ -43,17 +44,17 @@
   if (1) { // XXX debug
     int a;
     if(unham(out[0], out[1]) != in) {
-      fprintf(stderr, "ham8_4: 1 - result not correct %02x -> %02x %02x!\n", in, out[0], out[1]);
+      dprint("ham8_4: 1 - result not correct %02x -> %02x %02x!\n", in, out[0], out[1]);
     }
     a = unhamtab[out[0]];
     a ^= 0x80;
     if(a & 0xf0 || (a != (in & 0xF))) {
-      fprintf(stderr, "ham8_4: 2 - result not correct %02x -> %02x %02x, %02x!\n", in, out[0], out[1], a);
+      dprint("ham8_4: 2 - result not correct %02x -> %02x %02x, %02x!\n", in, out[0], out[1], a);
     }
     a = unhamtab[out[1]];
     a ^= 0x80;
     if(a & 0xf0 || (a != (in >> 4))) {
-      fprintf(stderr, "ham8_4: 3 - result not correct %02x -> %02x %02x, %02x!\n", in, out[0], out[1], a);
+      dprint("ham8_4: 3 - result not correct %02x -> %02x %02x, %02x!\n", in, out[0], out[1], a);
     }
   }
 }
@@ -108,7 +109,7 @@
  * Also strips parity
  */
 
-uint8_t ttxt_laG0_la1_char(int Gtriplet, int natopts, uint8_t inchar)
+uint16_t ttxt_laG0_la1_char(int Gtriplet, int natopts, uint8_t inchar)
 {
   int no = laG0_nat_opts_lookup[Gtriplet & 0xf][natopts & 0x7];
   uint8_t c = inchar & 0x7f;
@@ -118,14 +119,21 @@
   if(!laG0_nat_replace_map[c])
     return c;
   else
+#if defined(APIVERSNUM) && APIVERSNUM < 10503
     return laG0_nat_opts[no][laG0_nat_replace_map[c]];
+#else
+    if (cCharSetConv::SystemCharacterTable())
+       return laG0_nat_opts[no][laG0_nat_replace_map[c]];
+    else
+       return laG0_nat_opts16[no][laG0_nat_replace_map[c]];
+#endif
 }
 
 /*
  * Map Latin G2 teletext characters into a ISO-8859-1 approximation.
  * Trying to use similar looking or similar meaning characters.
  */
-uint8_t ttxt_laG2_la1_char(uint8_t inchar)
+uint16_t ttxt_laG2_la1_char(uint8_t inchar)
 {
   return laG2_la1_table[inchar & 0x7f];
 }
diff -Nru ttxtsubs-0.0.5/teletext.h ttxtsubs-0.0.5-raastinrauta-edition/teletext.h
--- ttxtsubs-0.0.5/teletext.h	2008-01-13 18:18:53.000000000 +0200
+++ ttxtsubs-0.0.5-raastinrauta-edition/teletext.h	2008-01-13 18:17:43.000000000 +0200
@@ -5,14 +5,14 @@
 
 #define PACK  __attribute__ ((__packed__))
 
-struct ttxt_pes_header {
+struct PACK ttxt_pes_header {
   uint8_t start[3];
-  uint8_t stream_id  PACK;
-  uint16_t len PACK;
+  uint8_t stream_id;
+  uint16_t len;
 
   // private_stream_1 packets (and others)
-  uint8_t flags[2] PACK;
-  uint8_t header_len PACK;
+  uint8_t flags[2];
+  uint8_t header_len;
 };
 
 
@@ -23,19 +23,19 @@
 };
 
 #define TTXT_LINE_NO(x) ((x).par_loff & 0x1f)
-struct ttxt_data_field {
-  uint8_t data_unit_id PACK;
-  uint8_t data_unit_length PACK;
-  uint8_t par_loff PACK;
-  uint8_t framing_code PACK;
-  uint8_t mag_addr_ham[2] PACK;
-  uint8_t data[40] PACK;
+struct PACK ttxt_data_field {
+  uint8_t data_unit_id;
+  uint8_t data_unit_length;
+  uint8_t par_loff;
+  uint8_t framing_code;
+  uint8_t mag_addr_ham[2];
+  uint8_t data[40];
 };
 
 
-struct ttxt_pes_data_field {
-  uint8_t data_identifier PACK;
-  struct ttxt_data_field d[1] PACK;
+struct PACK ttxt_pes_data_field {
+  uint8_t data_identifier;
+  struct ttxt_data_field d[1];
 };
 
 
@@ -80,13 +80,13 @@
  * inchar - 7 bits = characted to remap
  * Also strips parity
  */
-uint8_t ttxt_laG0_la1_char(int Gtriplet, int natopts, uint8_t inchar);
+uint16_t ttxt_laG0_la1_char(int Gtriplet, int natopts, uint8_t inchar);
 
 /*
  * Map Latin G2 teletext characters into a ISO-8859-1 approximation.
  * Trying to use similar looking or similar meaning characters.
  */
-uint8_t ttxt_laG2_la1_char(uint8_t inchar);
+uint16_t ttxt_laG2_la1_char(uint8_t inchar);
 
 
 
diff -Nru ttxtsubs-0.0.5/ttxtsubs.c ttxtsubs-0.0.5-raastinrauta-edition/ttxtsubs.c
--- ttxtsubs-0.0.5/ttxtsubs.c	2008-01-13 18:18:53.000000000 +0200
+++ ttxtsubs-0.0.5-raastinrauta-edition/ttxtsubs.c	2008-01-22 19:08:58.000000000 +0200
@@ -10,7 +10,9 @@
 #include <vdr/status.h>
 #include <vdr/vdrttxtsubshooks.h>
 #include <vdr/menuitems.h>
+#include <vdr/thread.h>
 #include <vdr/config.h>
+#include <semaphore.h>
 
 #define TIMEMEASURE 0
 #if TIMEMEASURE
@@ -31,39 +33,54 @@
 #include "utils.h"
 #include "siinfo.h"
 #include "ttxtsubs.h"
+#include "ttxtsubspagemenu.h"
+#include "ttxtsubschannelsettings.h"
 
-static const char *VERSION        = "0.0.5";
-static const char *DESCRIPTION    = "Teletext subtitles";
+#if defined(APIVERSNUM) && APIVERSNUM < 10400
+#error "This version of ttxtsubs only works with vdr version >= 1.4.0!"
+#endif
+
+#ifndef trNOOP
+#define trNOOP(s) (s)
+#endif
+#ifndef trVDR
+#define trVDR(s) tr(s)
+#endif
+
+static const char *VERSION        = "0.0.5-RRE";
+static const char *DESCRIPTION    = trNOOP("Teletext subtitles");
 
 cTtxtsubsConf globals;
+cTtxtSubsChannelSettings TtxtSubsChannelSettings;
 
 // ISO 639-2 language codes in VDR order
 // XXX should be replaced with something that allows for other languages and for real language names!
 // <http://www.avio-systems.com/dtvcc/iso639-2.txt>
 // <http://www.loc.gov/standards/iso639-2/englangn_ascii.html>
-char *gLanguages[][2] = { 
-  "","",       //None
-  "eng","",    //English
-  "deu","ger", //Deutsch
-  "slv","",    //Slovenian
-  "ita","",    //Italian
-  "dut","nld", //Dutch
-  "por","",    //Portuguese
-  "fre","fra", //French
-  "nor","",    //Norwegian
-  "fin","suo", //Finnish
-  "pol","",    //Polish
-  "spa","esl", //Spanish
-  "gre","ell", //Greek
-  "swe","sve", //Swedish
-  "ron","rum", //Romanian
-  "hun","",    //Hungarian
-  "cat","",    //Catalanian
-#if VDRVERSNUM >= 10300
-  "rus","",    //Russian
-#endif
-  // Not in translations!
-  "dan","" //Danish
+const char *gLanguages[][2] = { 
+  {"",""},       //None
+  {"eng",""},    //English
+  {"deu","ger"}, //Deutsch
+  {"slv",""},    //Slovenian
+  {"ita",""},    //Italian
+  {"dut","nld"}, //Dutch
+  {"por",""},    //Portuguese
+  {"fre","fra"}, //French
+  {"nor",""},    //Norwegian
+  {"fin","suo"}, //Finnish
+  {"pol",""},    //Polish
+  {"spa","esl"}, //Spanish
+  {"gre","ell"}, //Greek
+  {"swe","sve"}, //Swedish
+  {"ron","rum"}, //Romanian
+  {"hun",""},    //Hungarian
+  {"cat",""},    //Catalanian
+  {"rus",""},    //Russian
+  {"hrv","scr"}, //Croatian
+  {"est",""},    //Estonian
+  {"dan",""},    //Danish
+  {"cze","ces"}, //Czech
+  {"tur",""}     //Turkish
 };
 const char *gLanguageNames[] = {
   "-",
@@ -78,20 +95,21 @@
   "suomi", // this is not a typo - it's really lowercase!
   "Polski",
   "Español",
-  "Ellinika",
+  "ÅëëçíéêÜ",
   "Svenska",
   "Romaneste",
   "Magyar",
   "Català",
-#if VDRVERSNUM >= 10300
   "ÀãááÚØÙ",
-#endif
-  // Not in translations!
-  "Dansk"
+  "Hrvatski",
+  "Eesti",
+  "Dansk",
+  "Èesky",
+  "Türkçe"
 };
 int gNumLanguages = sizeof(gLanguages) / sizeof(gLanguages[0]);
 
-class cPluginTtxtsubs : public cPlugin, public cStatus, public cVDRTtxtsubsHookListener {
+class cPluginTtxtsubs : public cPlugin, public cStatus, public cVDRTtxtsubsHookListener, public cThread {
 public:
   cPluginTtxtsubs(void);
   virtual ~cPluginTtxtsubs();
@@ -102,6 +120,7 @@
   virtual const char *CommandLineHelp(void);
   virtual bool ProcessArgs(int argc, char *argv[]);
   virtual bool Start(void);
+  virtual void Stop(void);
   virtual void Housekeeping(void);
   virtual const char *MainMenuEntry(void);
   virtual cOsdObject *MainMenuAction(void);
@@ -111,11 +130,7 @@
   // -- cStatus
  protected:
   virtual void ChannelSwitch(const cDevice *Device, int ChannelNumber);
-  virtual void Replaying(const cControl *Control, const char *Name);
-               // The given player control has started replaying Name. Name is the name of the
-               // recording, without any directory path. In case of a player that can't provide
-               // a name, Name can be a string that identifies the player type (like, e.g., "DVD").
-               // If Name is NULL, the replay has ended. 
+  virtual void Replaying(const cControl *Control, const char *Name, const char *FileName, bool On);
   //  virtual void OsdClear(void) { ShowTtxt(); }
   //  virtual void OsdTitle(const char *Title) { HideTtxt(); }
   //  virtual void OsdStatusMessage(const char *Message) { HideTtxt(); }
@@ -131,9 +146,12 @@
   virtual void PlayerTeletextData(uint8_t *p, int length);
   virtual cTtxtSubsRecorderBase *NewTtxtSubsRecorder(cDevice *dev, const cChannel *ch);
 
+  // -- cThread
+  void Action(void);
+  
   // -- internal
  private:
-  void StartTtxtLive(const cDevice *Device, int pid, int page);
+  void StartTtxtLive(const cDevice *Device, tChannelID chnid, int pid, int page);
   void StartTtxtPlay(int page);
   void StopTtxt(void);
   void ShowTtxt(void);
@@ -149,6 +167,12 @@
 
   // ugly hack for now
   int mPage;
+  // wait for channel switch
+  sem_t chswitchwait;
+  cMutex getchmutex;
+  int switchChannel;
+  int lastc;
+  const cDevice *switchDevice;
 };
 
 class cMenuSetupTtxtsubs : public cMenuSetupPage {
@@ -163,6 +187,10 @@
   int mLangHI[MAXLANGUAGES];
   int mSavedFrenchSpecial;
   int mDoStore;
+  int mTransparency;
+  int mRed;
+  int mGreen;
+  int mBlue;
   cTtxtsubsConf mConf;
 };
 
@@ -178,6 +206,8 @@
   
   memset(mOldLanguage, 0, 4);
   strncpy(globals.mLanguages[0][0], "unk", 4);
+  sem_init(&chswitchwait,0,0);
+  lastc=0;
 }
 
 cPluginTtxtsubs::~cPluginTtxtsubs()
@@ -201,8 +231,12 @@
 {
   // Start any background activities the plugin shall perform.
 
-  RegisterI18n(Phrases);
+  cThread::Start();
 
+  TtxtSubsChannelSettings.Load(AddDirectory(ConfigDirectory("ttxtsubs"),"channelsettings.dat"));
+#if defined(APIVERSNUM) && APIVERSNUM < 10507
+  RegisterI18n(Phrases);
+#endif
   if(!memcmp(globals.mLanguages[0][0], "unk", 3)) {
     // no language found in setup
     if(strlen(mOldLanguage)) {
@@ -225,6 +259,7 @@
       globals.mHearingImpaireds[0][1] = mOldHearingImpaired;
     } else {
       // get lang from OSD lang
+#if defined(APIVERSNUM) && APIVERSNUM < 10507
       int n = Setup.OSDLanguage + 1;
       if(n > gNumLanguages) {
 	strncpy(globals.mLanguages[0][0], "eng", 4);
@@ -234,6 +269,10 @@
 	strncpy(globals.mLanguages[0][1], gLanguages[n][1], 4);
 	globals.mLanguages[0][1][3] = '\0';
       }
+#else
+      strncpy(globals.mLanguages[0][0], Setup.OSDLanguage, 4);
+      globals.mLanguages[0][0][3] = '\0';
+#endif
     }
   }
 
@@ -244,6 +283,12 @@
   return true;
 }
 
+void cPluginTtxtsubs::Stop(void)
+{
+  cThread::Cancel();
+  StopTtxt();
+}
+
 void cPluginTtxtsubs::Housekeeping(void)
 {
   // Perform any cleanup or other regular tasks.
@@ -253,7 +298,7 @@
 {
   switch(globals.mMainMenuEntry) {
   case 1:
-    if(globals.mDoDisplay)
+    if(globals.mRealDoDisplay)
       return tr("Hide teletext subtitles");
     else
       return tr("Display teletext subtitles");
@@ -263,7 +308,7 @@
     else
       return tr("Position Teletext Subtitles for Letterbox");
   case 3:
-    return tr("Teletext Subtitles");
+    return tr("Page Selection");
   default:
     return NULL;
   }
@@ -277,13 +322,13 @@
 
   switch(globals.mMainMenuEntry) {
   case 1:
-    globals.mDoDisplay = globals.mDoDisplay ? 0 : 1;
+    globals.mRealDoDisplay = globals.mRealDoDisplay ? 0 : 1;
     return NULL;
   case 2:
     globals.mBottomLB = globals.mBottomLB ? 0 : 1;
     return NULL;
   case 3:
-    return new cMenuSetupTtxtsubs(this, 1);
+    return new cTtxtsubsPageMenu();
   default:
     return NULL;
   }
@@ -298,16 +343,23 @@
 
 bool cPluginTtxtsubs::SetupParse(const char *Name, const char *Value)
 {
-  if(!strcasecmp(Name, "Display")) globals.mDoDisplay = atoi(Value);
+  if(!strcasecmp(Name, "Display")) { globals.mDoDisplay = atoi(Value); globals.mRealDoDisplay=globals.mDoDisplay; }
   else if(!strcasecmp(Name, "Record")) globals.mDoRecord = atoi(Value);
+  else if(!strcasecmp(Name, "LiveDelay")) globals.mLiveDelay = atoi(Value);
+  else if(!strcasecmp(Name, "ReplayDelay")) globals.mReplayDelay = atoi(Value);
   else if(!strcasecmp(Name, "MainMenuEntry")) globals.mMainMenuEntry = atoi(Value);
   else if(!strcasecmp(Name, "TextPos")) globals.mTextPos = atoi(Value);
   else if(!strcasecmp(Name, "BottomLB")) globals.mBottomLB = atoi(Value);
   else if(!strcasecmp(Name, "BottomAdj")) globals.mBottomAdj = atoi(Value);
   else if(!strcasecmp(Name, "FrenchSpecial")) globals.mFrenchSpecial = atoi(Value);
   else if(!strcasecmp(Name, "LineSpacing")) globals.mLineSpacing = atoi(Value);
+  else if(!strcasecmp(Name, "DvbSources")) globals.mDvbSources = atoi(Value);
+#if defined(APIVERSNUM) && APIVERSNUM >= 10503
+  else if(!strcasecmp(Name, "FontSize")) globals.mFontSize = atoi(Value);
+#endif
   else if(!strcasecmp(Name, "FgColor")) globals.mFgColor = atoi(Value);
   else if(!strcasecmp(Name, "BgColor")) globals.mBgColor = atoi(Value);
+  else if(!strcasecmp(Name, "CustomColor")) globals.mCustomColor = atoi(Value);
   else if(!strcasecmp(Name, "Languages")) parseLanguages(Value);
   else if(!strcasecmp(Name, "HearingImpaireds")) parseHIs(Value);
   // Handle old settings
@@ -319,51 +371,113 @@
   return true;
 }
 
+void cPluginTtxtsubs::Action(void)
+{
+  while(true) {
+    sem_wait(&chswitchwait);
+    int cn;
+    const cDevice *dev;
+    getchmutex.Lock();
+    cn=switchChannel;
+    dev=switchDevice;
+    getchmutex.Unlock();
+    if (cn!=lastc) {
+      StopTtxt();
+      lastc=0;
+      cChannel *c = Channels.GetByNumber(cn);
+      if(c) {
+        //int manual_page = TtxtSubsChannelSettings.Page(c->GetChannelID());
+        //if (manual_page>0) { 
+        //  printf("ttxtsubs: manual page %03x selected\n", manual_page);
+        //  if (c->Tpid()) StartTtxtLive(dev, c->GetChannelID(), c->Tpid(), manual_page);
+        //} else if(manual_page==0) {
+          struct ttxtinfo info;
+          int pid, page;
+          char lang[4] = "";
+          bool geterror=true;
+          if((globals.dvbSources() == 0) || ((globals.dvbSources() == 1) && c->IsSat()) || ((globals.dvbSources() == 2) && c->IsTerr()) || ((globals.dvbSources() == 3) && c->IsCable()))
+          {
+             int tries=0; //sometimes it doesn't find subtitles even if they're there
+                          //the problem is that while the dish is moving it's picking the signal
+                          //from a different satellite, so what really should be done is to
+                          //check if the dish is positioned
+             while(tries<=2) {
+               while(geterror=GetTtxtInfo(dev->ActualDevice()->CardIndex(), c, &info)) {
+                 esyslog("ttxtsubs: Error: GetTtxtInfo failed!");
+                 cCondWait::SleepMs(1000);
+                 getchmutex.Lock();
+                 bool changed=(cn!=switchChannel);
+                 getchmutex.Unlock();
+                 if (changed) {
+                   esyslog("ttxtsubs: Channel changed while looking for teletext info");
+                   break;
+                 }  
+               }  
+               if (!geterror) {
+                 if(FindSubs(&info, &pid, &page, lang)) {
+                   //dprint("CHANNELSWITCH, pid: %d page: %x\n", pid, page);
+                   mPage = page; // XXX remember this for playback (temporary hack)!
+                   for(int i = 0; i < gNumLanguages; i++) {
+                      if(!memcmp(lang, gLanguages[i][0], 3) ||
+                         !memcmp(lang, gLanguages[i][1], 3)) {
+                        globals.mI18nLanguage = i - 1;
+                      }
+                   }
+#if defined(APIVERSNUM) && APIVERSNUM < 10507
+                   if(globals.mI18nLanguage < 0 || globals.mI18nLanguage >= I18nNumLanguages)
+#else
+                   if(globals.mI18nLanguage < 0 || globals.mI18nLanguage >= I18nLanguages()->Size())
+#endif
+                     globals.mI18nLanguage = 0; // default to iso8859-1 if no predefined charset
+                   StartTtxtLive(dev, c->GetChannelID(), pid, page);
+                   FreeTtxtInfoData(&info);
+                   break; 
+                 } else {  //!FindSubs
+                   FreeTtxtInfoData(&info);
+                   tries++;
+                 }  
+               } else break; //if(!geterror)..
+             } //while(tries<=2)  
+          }
+          lastc=cn;
+        //}   
+      }
+    }  
+  }
+}
+
 void cPluginTtxtsubs::ChannelSwitch(const cDevice *Device, int ChannelNumber)
 {
 #if TIMEMEASURE
   struct timeval tv, tv2;
   gettimeofday(&tv, NULL);  
 #endif
-  dprint("cPluginTtxtsubs::ChannelSwitch(devicenr: %d, channelnr: %d) - mDispl: %x\n",
-	 Device->DeviceNumber(), ChannelNumber, mDispl); // XXX
+  //dprint("cPluginTtxtsubs::ChannelSwitch(devicenr: %d, channelnr: %d) - mDispl: %x\n",  Device->DeviceNumber(), ChannelNumber, mDispl); // XXX
 
-  if(Device->IsPrimaryDevice()) {
+  if(Device->IsPrimaryDevice() && !Device->Replaying()) {
     if(ChannelNumber) {
-      cChannel *c = Channels.GetByNumber(ChannelNumber);
-      if(c) {
-	struct ttxtinfo info;
-	int pid, page;
-	
-	if(GetTtxtInfo(Device->ActualDevice()->CardIndex(), ChannelNumber, c->Sid(), c->Vpid(), &info)) {
-	  fprintf(stderr, "ttxtsubs: Error: GetTtxtInfo failed!\n");
-	} else {
-	  if(FindSubs(&info, &pid, &page)) {
-	    //fprintf(stderr, "CHANNELSWITCH, pid: %d page: %x\n", pid, page);
-	    mPage = page; // XXX remember this for playback (temporary hack)!
-	    StartTtxtLive(Device, pid, page);
-	  }
-	  FreeTtxtInfoData(&info);
-	}
-      }
-    } else
-      StopTtxt();
+      getchmutex.Lock();
+      switchChannel=ChannelNumber;
+      switchDevice=Device;
+      getchmutex.Unlock();
+      sem_post(&chswitchwait);
+    } 
   }
 #if TIMEMEASURE
   gettimeofday(&tv2, NULL);  
   TIMEVALSIMPL(tv, tv2);
   // tv2.tv_sec - tv.tv_sec + 1000000 * (tv2.tv_usec - tv.tv_usec);
-  fprintf(stderr, "ttxtsubs: Channel switch time: %d.%06d s\n",
+  isyslog("ttxtsubs: Channel switch time: %d.%06d s",
 	  tv2.tv_sec - tv.tv_sec, tv2.tv_usec - tv.tv_usec);
 #endif
 }
 
-void cPluginTtxtsubs::Replaying(const cControl *Control, const char *Name)
+void cPluginTtxtsubs::Replaying(const cControl *Control, const char *Name, const char *FileName, bool On)
 {
-  dprint("cPluginTtxtsubs::Replaying\n"); // XXX
-
+  //dprint("cPluginTtxtsubs::Replaying\n"); // XXX
   StopTtxt();
-  StartTtxtPlay(mPage);
+  if(On)
+    StartTtxtPlay(mPage);
   // XXX this page number is just a fallback for old recordings which
   // don't have a index page
 }
@@ -373,7 +487,7 @@
   cTtxtSubsPlayer *r = dynamic_cast<cTtxtSubsPlayer *>(mDispl);
 
   if(!r) {
-    fprintf(stderr, "ttxtsubs: ERROR: not a cTtxtSubsPlayer!\n");
+    esyslog("ttxtsubs: ERROR: not a cTtxtSubsPlayer!");
     return;
   }
 
@@ -391,38 +505,38 @@
 
 // --  internal
 
-void cPluginTtxtsubs::StartTtxtLive(const cDevice *Device, int pid, int page)
+void cPluginTtxtsubs::StartTtxtLive(const cDevice *Device, tChannelID chnid, int pid, int page)
 {
-  dprint("cPluginTtxtsubs::StartTtxtLive(devicenr: %d, pid: %d, page: %03x)\n",
-	 Device->DeviceNumber(), pid, page); // XXX
+  //dprint("cPluginTtxtsubs::StartTtxtLive(devicenr: %d, pid: %d, page: %03x)\n",
+  //	 Device->DeviceNumber(), pid, page); // XXX
 
   if(!mDispl) {
     cTtxtSubsLiveReceiver *r;
     //dprint("teletext subtitles started on pid %d\n", pid);
-    mDispl = r = new cTtxtSubsLiveReceiver(pid, page); // takes 0.01-0.015 s
+    mDispl = r = new cTtxtSubsLiveReceiver(chnid, pid, page); // takes 0.01-0.015 s
     if(!cDevice::PrimaryDevice()->ActualDevice()->AttachReceiver(r))
                                     // takes 0.02-0.04 s on a full featured card
-      fprintf(stderr, "ttxtsubs: Error: AttachReceiver failed!\n"); //
+      esyslog("ttxtsubs: Error: AttachReceiver failed!");
     ShowTtxt();
   } else
-    fprintf(stderr, "ttxtsubs: Error: StartTtxtLive called when already started!\n");
+    esyslog("ttxtsubs: Error: StartTtxtLive called when already started!");
 }
 
 void cPluginTtxtsubs::StartTtxtPlay(int backup_page)
 {
-  dprint("cPluginTtxtsubs::StartTtxtPlay\n");
+  //dprint("cPluginTtxtsubs::StartTtxtPlay\n");
 
   if(!mDispl) {
-    dprint("ttxtsubs: teletext subtitles replayer started with initial page %03x\n", backup_page);
+    isyslog("ttxtsubs: teletext subtitles replayer started with initial page %03x", backup_page);
     mDispl = new cTtxtSubsPlayer(backup_page);
     ShowTtxt();
   } else
-    fprintf(stderr, "ttxtsubs: Error: StartTtxtPlay called when already started!\n");
+    esyslog("ttxtsubs: Error: StartTtxtPlay called when already started!");
 }
 
 void cPluginTtxtsubs::StopTtxt(void)
 {
-  dprint("cPluginTtxtsubs::StopTtxt\n");
+  //dprint("cPluginTtxtsubs::StopTtxt\n");
 
   if(mDispl) {
     cTtxtSubsDisplayer *d = mDispl;
@@ -434,7 +548,7 @@
 
 void cPluginTtxtsubs::ShowTtxt(void)
 {
-  if(globals.mDoDisplay)
+  if(globals.mRealDoDisplay)
     if(mDispl)
       mDispl->ShowDisplay();
 }
@@ -504,12 +618,14 @@
 
 void cMenuSetupTtxtsubsLanguages::Store(void)
 {
-  fprintf(stderr, "cMenuSetupTtxtsubsLanguages::Store\n");
+  //dprint("cMenuSetupTtxtsubsLanguages::Store\n");
 }
 
-const char * mainMenuAlts[4] = {NULL, NULL, NULL, NULL};
+const char * mainMenuAlts[5] = {NULL, NULL, NULL, NULL, NULL};
 const char * textPosAlts[4];
+const char * dvbSources[5];
 const char * textColors[12];
+const char * const colorValues[17] = {"#00", "#11", "#22", "#33", "#44", "#55", "#66", "#77", "#88", "#99", "#AA", "#BB", "#CC", "#DD", "#EE", "#FF", NULL};
 
 cMenuSetupTtxtsubs::cMenuSetupTtxtsubs(cPluginTtxtsubs *ttxtsubs, int doStore)
   :
@@ -517,19 +633,27 @@
   mDoStore(doStore),
   mConf(globals)
 {
+  char *buf = NULL;
   //static char *mainMenuAlts[] = {"off", "Display on/off", "4:3/Letterbox", "This menu"};
   // can't get it to store changes in file
   if(mainMenuAlts[0] == NULL) {
-    mainMenuAlts[0] = tr("off");
+    mainMenuAlts[0] = trVDR("off");
     mainMenuAlts[1] = tr("Display on/off");
     mainMenuAlts[2] = tr("4:3/Letterbox");
-    mainMenuAlts[3] = NULL;
+    mainMenuAlts[3] = tr("Page Mode");
+    mainMenuAlts[4] = NULL;
 
     textPosAlts[0] = tr("Left");
     textPosAlts[1] = tr("Center");
     textPosAlts[2] = tr("Right");
     textPosAlts[3] = NULL;
 
+    dvbSources[0] = tr("All");
+    dvbSources[1] = tr("Only DVB-S");
+    dvbSources[2] = tr("Only DVB-T");
+    dvbSources[3] = tr("Only DVB-C");
+    dvbSources[4] = NULL;
+
     textColors[0] = tr("Black");
     textColors[1] = tr("White");
     textColors[2] = tr("Red");
@@ -538,14 +662,16 @@
     textColors[5] = tr("Magenta");
     textColors[6] = tr("Blue");
     textColors[7] = tr("Cyan");
-    textColors[8] = tr("Grey");
+    textColors[8] = tr("Custom");
     textColors[9] = tr("Transparent");
-    textColors[10] = tr("Background");
+    textColors[10] = tr("Grey");
     textColors[11] = NULL;
   }
   const int numTextPosAlts = sizeof(textPosAlts) / sizeof(textPosAlts[0]) - 1;
   const int numMainMenuAlts = sizeof(mainMenuAlts) / sizeof(mainMenuAlts[0]) - 1;
+  const int numDvbSources = sizeof(dvbSources) / sizeof(dvbSources[0]) - 1;
   const int numTextColors = sizeof(textColors) / sizeof(textColors[0]) - 1;
+  const int numColorValues = sizeof(colorValues) / sizeof(colorValues[0]) - 1;
 
   mSavedFrenchSpecial = mConf.mFrenchSpecial;
 
@@ -562,8 +688,10 @@
     }
   }
 
-  Add(new cMenuEditBoolItem(tr("Display Subtitles"), &mConf.mDoDisplay, tr("no"), tr("yes")));
-  Add(new cMenuEditBoolItem(tr("Record Subtitles"), &mConf.mDoRecord, tr("no"), tr("yes")));
+  Add(new cMenuEditBoolItem(tr("Display Subtitles"), &mConf.mDoDisplay));
+  Add(new cMenuEditBoolItem(tr("Record Subtitles"), &mConf.mDoRecord));
+  Add(new cMenuEditIntItem(tr("Live Delay"), &mConf.mLiveDelay, 0, 5000));
+  Add(new cMenuEditIntItem(tr("Replay Delay"), &mConf.mReplayDelay, 0, 5000));
   if(mConf.mMainMenuEntry < 0 || mConf.mMainMenuEntry >= numMainMenuAlts)
     mConf.mMainMenuEntry = 0;  // menu item segfaults if out of range
   Add(new cMenuEditStraItem(tr("Main Menu Alternative"), &mConf.mMainMenuEntry,
@@ -578,6 +706,15 @@
 			    &mConf.mBottomAdj, -100, 45));
   Add(new cMenuEditIntItem( tr("Line Spacing Adjust"),
 			    &mConf.mLineSpacing, -25, 25));
+  Add(new cMenuEditBoolItem(tr("Workaround for some French chns"),
+			    &mConf.mFrenchSpecial));
+  if(mConf.mDvbSources < 0 || mConf.mDvbSources >= numDvbSources)
+    mConf.mDvbSources = 0;  // menu item segfaults if out of range
+  Add(new cMenuEditStraItem(tr("DVB Source Selection"),
+                          &mConf.mDvbSources, 4, dvbSources));
+#if defined(APIVERSNUM) && APIVERSNUM >= 10503
+  Add(new cMenuEditIntItem(tr("Font Size (pixel)"), &mConf.mFontSize, 10, MAXFONTSIZE));
+#endif
   if(mConf.mFgColor < 0 || mConf.mFgColor >= numTextColors)
     mConf.mFgColor = 1;  // menu item segfaults if out of range
   Add(new cMenuEditStraItem(tr("Text Color"), &mConf.mFgColor,
@@ -586,19 +723,32 @@
     mConf.mBgColor = 0;  // menu item segfaults if out of range
   Add(new cMenuEditStraItem(tr("Background Color"), &mConf.mBgColor,
 			    numTextColors, textColors));
-  Add(new cMenuEditBoolItem(tr("Workaround for some French chns"),
-			    &mConf.mFrenchSpecial, tr("no"), tr("yes")));
+
+  // the color code is borrowed from AIO patches
+  mBlue = (mConf.mCustomColor & 0x0000000F);
+  if (mBlue < 0 || mBlue >= numColorValues) mBlue = 0;
+  mGreen = (mConf.mCustomColor & 0x00000F00) >>  8;
+  if (mGreen < 0 || mGreen >= numColorValues) mGreen = 0;
+  mRed = (mConf.mCustomColor & 0x000F0000) >> 16;
+  if (mRed < 0 || mRed >= numColorValues) mRed = 0;
+  mTransparency = (mConf.mCustomColor & 0x0F000000) >> 24;
+  if (mTransparency < 0 || mTransparency >= numColorValues) mTransparency = 0;
+  asprintf(&buf, "%s: --------------------------------------------", tr("Custom Color"));
+  cOsdItem *item = new cOsdItem(buf);
+  item->SetSelectable(false);
+  free(buf);
+  Add(item);
+  Add(new cMenuEditStraItem(tr("Red Value"),          &mRed,          numColorValues, colorValues));
+  Add(new cMenuEditStraItem(tr("Green Value"),        &mGreen,        numColorValues, colorValues));
+  Add(new cMenuEditStraItem(tr("Blue Value"),         &mBlue,         numColorValues, colorValues));
+  Add(new cMenuEditStraItem(tr("Transparency Value"), &mTransparency, numColorValues, colorValues));
 
   for(int n = 0; n < MAXLANGUAGES; n++) {
     char str[100];
-    char *allowedc = "abcdefghijklmnopqrstuvwxyz";
+    const char *allowedc = "abcdefghijklmnopqrstuvwxyz";
 
     cOsdItem *item = new cOsdItem("--------------------------------------------------------");
-#if defined(ELCHIAIOVERSION)
-    item->SetColor(clrScrolLine);
-#else
-    item->SetColor(clrCyan);
-#endif
+    item->SetSelectable(false);
     Add(item);
 
     sprintf(str, "%s %d", tr("Language"), n + 1);
@@ -610,8 +760,7 @@
     }
 
     sprintf(str, "%s %d %s", tr("Language"), n + 1, tr("Hearing Impaired"));
-    Add(new cMenuEditBoolItem(str, &(mConf.mHearingImpaireds[n][0]),
-			      tr("no"), tr("yes")));
+    Add(new cMenuEditBoolItem(str, &(mConf.mHearingImpaireds[n][0])));
   }
 
 #ifdef TEST
@@ -621,8 +770,6 @@
 
 cMenuSetupTtxtsubs::~cMenuSetupTtxtsubs(void)
 {
-  if(mSavedFrenchSpecial != mConf.mFrenchSpecial)
-    ClearSICache();
 
   if(mDoStore) {
     Store();
@@ -645,14 +792,25 @@
 
   SetupStore("Display", mConf.mDoDisplay);
   SetupStore("Record", mConf.mDoRecord);
+  SetupStore("LiveDelay", mConf.mLiveDelay);
+  SetupStore("ReplayDelay", mConf.mReplayDelay);
   SetupStore("TextPos", mConf.mTextPos);
   SetupStore("BottomLB", mConf.mBottomLB);
   SetupStore("BottomAdj", mConf.mBottomAdj);
   SetupStore("FrenchSpecial", mConf.mFrenchSpecial);
   SetupStore("MainMenuEntry", mConf.mMainMenuEntry);
   SetupStore("LineSpacing", mConf.mLineSpacing);
+  SetupStore("DvbSources", mConf.mDvbSources);
+#if defined(APIVERSNUM) && APIVERSNUM >= 10503
+  SetupStore("FontSize", mConf.mFontSize);
+#endif
   SetupStore("FgColor", mConf.mFgColor);
   SetupStore("BgColor", mConf.mBgColor);
+  mConf.mCustomColor = (mBlue              ) | (mBlue         <<  4) |
+                       (mGreen        <<  8) | (mGreen        << 12) |
+                       (mRed          << 16) | (mRed          << 20) |
+                       (mTransparency << 24) | (mTransparency << 28);
+  SetupStore("CustomColor", mConf.mCustomColor);
 
   char lstr[MAXLANGUAGES*2*4 + 1];
   char histr[MAXLANGUAGES*2 + 1];
diff -Nru ttxtsubs-0.0.5/ttxtsubschannelsettings.c ttxtsubs-0.0.5-raastinrauta-edition/ttxtsubschannelsettings.c
--- ttxtsubs-0.0.5/ttxtsubschannelsettings.c	1970-01-01 02:00:00.000000000 +0200
+++ ttxtsubs-0.0.5-raastinrauta-edition/ttxtsubschannelsettings.c	2008-01-13 18:17:43.000000000 +0200
@@ -0,0 +1,51 @@
+#include "ttxtsubschannelsettings.h"
+
+#include <vdr/channels.h>
+#include <vdr/plugin.h>
+#include <vdr/tools.h>
+
+cTtxtSubsChannelSetting::cTtxtSubsChannelSetting(const cChannel *Channel, int PageMode, int PageNumber)
+{
+  channelid=Channel->GetChannelID();
+  pagemode=PageMode;
+  pagenumber=PageNumber;
+}
+
+bool cTtxtSubsChannelSetting::Parse(const char *s)
+{
+   bool result=false;
+   char *buffer=NULL;
+   int PageMode;
+   int PageNumber;
+   if (3 == sscanf(s, "%a[^,],%d,%d\n", &buffer, &PageMode, &PageNumber)) {
+      tChannelID channelID=tChannelID::FromString(buffer);
+      if (channelID.Valid()) {
+        channelid=channelID;
+        pagemode=PageMode;
+        pagenumber=PageNumber;
+        result=true;
+      }
+      else { // parse old format
+        int sid;
+        if (1 == sscanf(buffer, "%d", &sid)) {
+          for (cChannel *ch = Channels.First(); ch; ch = Channels.Next(ch)) {
+            if (!ch->GroupSep() && ch->Sid() == sid) {
+              channelid=ch->GetChannelID();
+              pagemode=PageMode;
+              pagenumber=PageNumber;
+              result=true;
+              break;
+            }
+          }
+        }
+      }
+   }
+   free(buffer);
+   return result;
+}        
+
+bool cTtxtSubsChannelSetting::Save(FILE *f)
+{
+  return fprintf(f, "%s,%d,%d\n", *channelid.ToString(), pagemode, pagenumber) > 0; 
+}
+
diff -Nru ttxtsubs-0.0.5/ttxtsubschannelsettings.h ttxtsubs-0.0.5-raastinrauta-edition/ttxtsubschannelsettings.h
--- ttxtsubs-0.0.5/ttxtsubschannelsettings.h	1970-01-01 02:00:00.000000000 +0200
+++ ttxtsubs-0.0.5-raastinrauta-edition/ttxtsubschannelsettings.h	2008-01-13 18:17:43.000000000 +0200
@@ -0,0 +1,51 @@
+#ifndef __TTXTSUBSCHANNELSETTINGS_H
+#define __TTXTSUBSCHANNELSETTINGS_H
+
+#include <vdr/tools.h>
+#include <vdr/channels.h>
+
+#define PAGE_MODE_AUTO 0
+#define PAGE_MODE_MANUAL 1
+#define PAGE_MODE_DISABLED 2
+
+class cTtxtSubsChannelSetting:public cListObject {
+private:
+  tChannelID channelid;
+  int pagemode;
+  int pagenumber;
+public:
+  cTtxtSubsChannelSetting(void) {}
+  cTtxtSubsChannelSetting(const cChannel* Channel, int PageMode, int PageNumber);
+  bool Parse(const char *s);
+  bool Save(FILE *f);
+  tChannelID ChannelID(void) const { return channelid; }
+  int PageMode(void) const { return pagemode; }
+  int PageNumber(void) const { return pagenumber; }
+  void Set(int PageMode, int PageNumber) { pagemode=PageMode; pagenumber=PageNumber; }
+  };
+  
+class cTtxtSubsChannelSettings:public cConfig<cTtxtSubsChannelSetting> {
+public:
+  cTtxtSubsChannelSetting *Get(const cChannel *Channel) {
+    tChannelID ChannelID=Channel->GetChannelID();
+    for (cTtxtSubsChannelSetting *p=First(); p; p=Next(p)) {
+      if (p->ChannelID()==ChannelID) return p;
+    }
+    return NULL;
+  }
+  int Page(const cChannel *Channel) {
+    cTtxtSubsChannelSetting *cs=Get(Channel);
+    if (!cs) return(0);
+    if (cs->PageMode()==PAGE_MODE_DISABLED) return(-1);
+    int temp=cs->PageNumber();
+    int mag=temp/100;
+    temp=temp%100;
+    int page_no=(mag<<8)+((temp/10)<<4)+(temp%10);
+    if (page_no>=0x800) page_no-=0x800;
+    return(page_no);
+  }
+};
+
+extern cTtxtSubsChannelSettings TtxtSubsChannelSettings;
+
+#endif //__TTXTSUBSCHANNELSETTINGS_H
diff -Nru ttxtsubs-0.0.5/ttxtsubsdisplay.c ttxtsubs-0.0.5-raastinrauta-edition/ttxtsubsdisplay.c
--- ttxtsubs-0.0.5/ttxtsubsdisplay.c	2008-01-13 18:18:53.000000000 +0200
+++ ttxtsubs-0.0.5-raastinrauta-edition/ttxtsubsdisplay.c	2008-01-13 18:17:43.000000000 +0200
@@ -9,6 +9,8 @@
 #include <vdr/osd.h>
 #include <vdr/osdbase.h>
 #include <vdr/thread.h>
+#include <vdr/font.h>
+#include <vdr/config.h>
 
 #include "ttxtsubsglobals.h"
 #include "ttxtsubsdisplay.h"
@@ -22,12 +24,6 @@
   finished
 };
 
-// extra colours
-enum eMyDvbColor {
-  myClrGrey = 0xFF808080
-};
-
-
 // --------------------
 
 class cOSDSelfMemory {
@@ -76,13 +72,22 @@
   mPageState(invalid),
   mMag(0),
   mNo(0),
+#if defined(APIVERSNUM) && APIVERSNUM < 10509
   mDoDisplay(0),
+#else
+  mDoDisplay(1),
+#endif
   mOsd(NULL),
   mOsdLock(),
   mLastDataTime(NULL)
 {
   memset(&page.data, 0, sizeof(page.data));
   mLastDataTime = (struct timeval *) calloc(1, sizeof(*mLastDataTime));
+#if defined(APIVERSNUM) && APIVERSNUM >= 10503
+  mOsdFont = cFont::CreateFont(Setup.FontOsd, globals.mFontSize);
+  if (!mOsdFont || !mOsdFont->Height())
+#endif
+     mOsdFont = cFont::GetFont(fontOsd);
 }
 
 
@@ -90,7 +95,15 @@
 {
   if(mLastDataTime)
     free(mLastDataTime);
-  ClearOSD();
+  if(mOsd) {
+    cOsd* tmp = mOsd;
+    mOsd = NULL;
+    delete tmp;
+  }
+#if defined(APIVERSNUM) && APIVERSNUM >= 10503
+  if(mOsdFont && (mOsdFont != cFont::GetFont(fontOsd)))
+    delete mOsdFont;
+#endif
 }
 
 
@@ -112,8 +125,8 @@
 
   //dprint("cTtxtSubsDisplay::Hide\n");
   cMutexLock lock(&mOsdLock);
-  ClearOSD();
   mDoDisplay = 0;
+  ClearOSD();
 }
 
 
@@ -138,7 +151,7 @@
 }
 
 
-void cTtxtSubsDisplay::TtxtData(const uint8_t *Data)
+void cTtxtSubsDisplay::TtxtData(const uint8_t *Data, uint64_t sched_time)
 {
   int mp;
   int mag; // X in ETSI EN 300 706
@@ -221,6 +234,12 @@
       page.national_charset = ((fi[7] & 0x80) >> 7) +
 	((fi[7] & 0x20) >> 4) + ((fi[7] & 0x08) >> 1);
       
+      if(mPageState != collecting) {
+        int diff = sched_time - cTimeMs::Now();
+        //printf("Got sched_time %llx, diff %d\n", sched_time, diff);
+        if (diff > 10) cCondWait::SleepMs(diff);
+      }
+
       mPageState = collecting;
       gettimeofday(mLastDataTime, NULL);
 
@@ -279,7 +298,10 @@
       continue;
 
     if(c >= 0x20) {
-      buf[j++] = ttxt_laG0_la1_char(0, natopts, c);
+      uint16_t aux = ttxt_laG0_la1_char(0, natopts, c);
+      if (aux & 0xff00)
+         buf[j++] = (aux & 0xff00) >> 8;
+      buf[j++] = aux & 0x00ff;
     }
   }
 
@@ -341,7 +363,7 @@
   TEXTX = 15
 };
 
-static eDvbColor
+static tColor
 getcolor(int color)
 { 
   switch (color)
@@ -354,24 +376,30 @@
     case 5:  return clrMagenta;
     case 6:  return clrBlue;
     case 7:  return clrCyan;
-    case 8:  return (eDvbColor) myClrGrey;
+    case 8:  return globals.customColor();
     case 9:  return clrTransparent;
-    default: return clrBackground;
+    default: return clrGray50;
     }
-  return clrBackground;
+  return clrGray50;
 }
 
 void cTtxtSubsDisplay::ShowOSD(void)
 {
   int i, y;
   int rowcount = 0;
-  char buf[TTXT_DISPLAYABLE_ROWS][41];
-  int doneWidthWorkaround = 0;
+  char buf[TTXT_DISPLAYABLE_ROWS][82];
   int bottom = globals.bottomAdj() + (globals.bottomLB() ? BOTLETTERBOX : BOTNORM);
+  tArea areas[MAXOSDAREAS];
+  int numAreas = 0;
 
   cOSDSelfMemoryLock selfmem(&gSelfMem);
   cMutexLock lock(&mOsdLock);
 
+  if(!globals.mRealDoDisplay) {
+    //dprint("NOT displaying subtitles because disabled!\n");
+    return;
+  }
+ 
   if(!mDoDisplay) {
     //dprint("NOT displaying subtitles because of other OSD activities!\n");
     return;
@@ -382,76 +410,93 @@
     return;
   }
 
-  if(mOsd != NULL)
-    ClearOSD();
-
-  //print_page(&page);
-
   for(i = 1; i < 24; i++) {
     if(page.data[i][0] != 0) // anything on this line?
       if(ttxt2la1(page.data[i], buf[rowcount], page.national_charset))
 	rowcount++;
   }
 
-  mOsd = cOsd::OpenRaw(SCREENLEFT, SCREENTOP);
-
-  if(mOsd == NULL) {
-    //dprint("Error: cOsd::OpenRaw returned NULL!\n");
-    return;
+  if(mOsd) {
+    cOsd* tmp = mOsd;
+    mOsd = NULL;
+    delete tmp;
   }
 
-  mOsd->SetFont(fontOsd);
-  
-  if(rowcount > MAXTTXTROWS)
-    rowcount = MAXTTXTROWS;
-
-#if 0 // XXXX
-  rowcount = 4;
-  strcpy(buf[0], "1234567890123456789012345678901234567890");
-  strcpy(buf[1], "1234567890123456789012345678901234567890");
-  strcpy(buf[2], "1234567890123456789012345678901234567890");
-  strcpy(buf[3], "1234567890123456789012345678901234567890");
+#if defined(APIVERSNUM) && APIVERSNUM < 10509
+  if (cOsd::IsOpen()) {
+     //dprint("NOT displaying subtitles because of other OSD activities!\n");
+     return;
+     }
+  else {
+     mOsd = cOsdProvider::NewOsd(SCREENLEFT, SCREENTOP);
+#else
+     mOsd = cOsdProvider::NewOsd(SCREENLEFT, SCREENTOP, 20); // level 20
+#endif
+     if(!mOsd) {
+       //dprint("Error: cOsdProvider::NewOsd() returned NULL!\n");
+       return;
+       }
+#if defined(APIVERSNUM) && APIVERSNUM < 10509
+     }
 #endif
 
+#if defined(APIVERSNUM) && APIVERSNUM < 10503
+  cFont::SetCode(I18nCharSets()[globals.i18nLanguage()]);
+#endif
+  if(rowcount > MAXTTXTROWS)
+    rowcount = MAXTTXTROWS;
   y = bottom - SCREENTOP - ROWH - ((ROWINCR + globals.lineSpacing()) * (rowcount-1));
   for(i = 0; i < rowcount; i++) {
-    tWindowHandle wind;
     int w = 0;
     int left = SIDEMARGIN;
-
-    // XXX Width calculations doesn't work before we have created a window...
-    if(!doneWidthWorkaround) {
-      //wind = mOsd->Create(0, y, 4, ROWH, 2);
-      //mOsd->Fill(0, y, 4, y + ROWH, clrWhite, wind);
-      //mOsd->Fill(0, y, 4, y + ROWH, clrBackground, wind);
-      wind = mOsd->Create(0, 575, 4, 1, 2, false);
-      mOsd->Fill(0, 574, 4, 575, getcolor(globals.fgColor()), wind);
-      mOsd->Fill(0, 574, 4, 575, clrTransparent, wind);
-      doneWidthWorkaround = 1;
-    }
-
-    w = mOsd->Width(buf[i]) + 2 * TEXTX;
+    w = mOsdFont->Width(buf[i]) + 2 * TEXTX;
     if(w % 4)
       w += 4 - (w % 4);
-
     switch(globals.textPos()) {
-    case 1:
-      left = (SCREENRIGHT - w) / 2;
-      break;
-    case 2:
-      left = SCREENRIGHT - SIDEMARGIN - w;
-      break;
-    }
-
-    wind = mOsd->Create(left, y, w, ROWH, 2, false);
-    mOsd->Fill(left, y, left + w, y + ROWH, getcolor(globals.fgColor()), wind); // needed for dxr3s...
-    mOsd->Fill(left, y, left + w, y + ROWH, getcolor(globals.bgColor()), wind);
-    mOsd->Text(left + TEXTX, y + TEXTY, buf[i], getcolor(globals.fgColor()), getcolor(globals.bgColor()), wind);
-
+      case 1:
+        left = (SCREENRIGHT - w) / 2;
+        break;
+      case 2:
+        left = SCREENRIGHT - SIDEMARGIN - w;
+        break;
+      }
+    tArea area = {left, y, left+w-1, y+ROWH-1, 2};
+    areas[numAreas++] = area;
     y += (ROWINCR + globals.lineSpacing());
   }
-
-  mOsd->Flush();
+  if (mOsd->CanHandleAreas(areas, numAreas) != oeOk) {
+#if defined(APIVERSNUM) && APIVERSNUM < 10503
+     cFont::SetCode(I18nCharSets()[Setup.OSDLanguage]);
+#endif
+     dprint("ttxtsubs: OSD Cannot handle areas (error code: %d) - try to enlarge the line spacing!\n", mOsd->CanHandleAreas(areas, numAreas));
+     }
+  else {
+    mOsd->SetAreas(areas, numAreas);
+    y = bottom - SCREENTOP - ROWH - ((ROWINCR + globals.lineSpacing()) * (rowcount-1));
+    for(i = 0; i < rowcount; i++) {
+      int w = 0;
+      int left = SIDEMARGIN;
+      w = mOsdFont->Width(buf[i]) + 2 * TEXTX;
+      if(w % 4)
+        w += 4 - (w % 4);
+      switch(globals.textPos()) {
+        case 1:
+          left = (SCREENRIGHT - w) / 2;
+          break;
+        case 2:
+          left = SCREENRIGHT - SIDEMARGIN - w;
+          break;
+        }
+      mOsd->DrawRectangle(left, y, left + w, y + ROWH, getcolor(globals.bgColor()));
+      mOsd->DrawText(left + TEXTX, y + TEXTY, buf[i], getcolor(globals.fgColor()), getcolor(globals.bgColor()), mOsdFont);
+      //dprint("%d/%d (%d,%d) (%d,%d): %s\n", i, rowcount-1, areas[i].x1, areas[i].y1, left + TEXTX, y + TEXTY, buf[i]);
+      y += (ROWINCR + globals.lineSpacing());
+      }
+#if defined(APIVERSNUM) && APIVERSNUM < 10503
+    cFont::SetCode(I18nCharSets()[Setup.OSDLanguage]);
+#endif
+    mOsd->Flush();
+    }
 }
 
 
@@ -461,20 +506,9 @@
   cOSDSelfMemoryLock selfmem(&gSelfMem);
   cMutexLock lock(&mOsdLock);
 
-  if(!mDoDisplay) {
-    //dprint("NOT clearing subtitles because of other OSD activities!\n");
-    return;
-  }
-  
   if(mOsd) {
-
-    //mOsd->Clear(ALL_WINDOWS);
-#if 0
-    // not needed, windows are removed in mOsd destructor
-    mOsd->Hide(ALL_WINDOWS);
-    mOsd->Flush();
-#endif
-    delete mOsd;
+    cOsd* tmp = mOsd;
     mOsd = NULL;
+    delete tmp;
   }
 }
diff -Nru ttxtsubs-0.0.5/ttxtsubsdisplay.h ttxtsubs-0.0.5-raastinrauta-edition/ttxtsubsdisplay.h
--- ttxtsubs-0.0.5/ttxtsubsdisplay.h	2008-01-13 18:18:53.000000000 +0200
+++ ttxtsubs-0.0.5-raastinrauta-edition/ttxtsubsdisplay.h	2008-01-13 18:17:43.000000000 +0200
@@ -4,7 +4,8 @@
 struct ttxt_data_field;
 struct timeval;
 
-class cOsdBase;
+class cOsd;
+class cFont;
 
 #define MAXTTXTROWS 5
 
@@ -16,7 +17,7 @@
   void SetPage(int Pageno); // Pageno is 0x000 to 0x799
   void Hide(void);
   void Show(void);
-  void TtxtData(const uint8_t *);
+  void TtxtData(const uint8_t *, uint64_t sched_time = 0);
 
  protected:
   void Clear(void);
@@ -29,7 +30,8 @@
   int mNo;
   int mDoDisplay;
   struct ttxt_page page;
-  cOsdBase *mOsd;
+  cOsd *mOsd;
   cMutex mOsdLock;
   struct timeval *mLastDataTime;
+  const cFont *mOsdFont;
 };
diff -Nru ttxtsubs-0.0.5/ttxtsubsdisplayer.c ttxtsubs-0.0.5-raastinrauta-edition/ttxtsubsdisplayer.c
--- ttxtsubs-0.0.5/ttxtsubsdisplayer.c	2008-01-13 18:18:53.000000000 +0200
+++ ttxtsubs-0.0.5-raastinrauta-edition/ttxtsubsdisplayer.c	2008-01-22 19:08:58.000000000 +0200
@@ -31,8 +31,9 @@
   this->Cancel(5);
 
   if(mDisp) {
-    delete mDisp;
+    cTtxtSubsDisplay *tmp = mDisp;
     mDisp = NULL;
+    delete tmp;
   }
 }
 
@@ -45,7 +46,9 @@
     f = mRingBuf.Get();
 
     if(f) {
-      mDisp->TtxtData(f->Data());
+      uint64_t sched_time;
+      memcpy(&sched_time, f->Data() + 46, sizeof(sched_time));
+      mDisp->TtxtData(f->Data(), sched_time);
       mRingBuf.Drop(f);
     } else {
       // wait for more data
@@ -70,13 +73,22 @@
 
 // ----- class cTtxtSubsLiveReceiver -----
 
-cTtxtSubsLiveReceiver::cTtxtSubsLiveReceiver(int Pid, int textpage)
+cTtxtSubsLiveReceiver::cTtxtSubsLiveReceiver(tChannelID ChnId, int Pid, int textpage)
   :
-  cReceiver(0, -1, 1, Pid),
+#if defined(APIVERSNUM) && APIVERSNUM < 10500
+  cReceiver(0, -1, Pid),
+#else
+  cReceiver(ChnId, -1, Pid),
+#endif
   cTtxtSubsDisplayer(textpage)
 {
 }
 
+cTtxtSubsLiveReceiver::~cTtxtSubsLiveReceiver(void)
+{
+  Detach();
+}
+
 void cTtxtSubsLiveReceiver::Activate(bool On)
 {
   //dprint("cTtxtSubsLiveReceiver::Activate: On:%d\n", On);
@@ -100,7 +112,9 @@
     if(0xff == Data[4 + i*46]) // stuffing data
       continue;
 
-    cFrame *f = new cFrame(Data + 4 + i*46, 46);
+    uint64_t sched_time = cTimeMs::Now() + globals.liveDelay(); 
+    cFrame *f = new cFrame(Data + 4 + i*46, 46 + sizeof(sched_time));
+    memcpy(f->Data() + 46, &sched_time, sizeof(sched_time));
     mRingBuf.Put(f);
     mGetCond.Broadcast();
   }
@@ -150,7 +164,9 @@
     if(0xff == p[i*46]) // stuffing data
       continue;
 
-    cFrame *f = new cFrame(p + i*46, 46);
+    uint64_t sched_time=cTimeMs::Now() + globals.replayDelay(); 
+    cFrame *f = new cFrame(p + i*46, 46 + sizeof(sched_time));
+    memcpy(f->Data() + 46, &sched_time, sizeof(sched_time));
     mRingBuf.Put(f);
     mGetCond.Broadcast();
   }
@@ -165,7 +181,7 @@
 
 void cTtxtSubsPlayer::SearchLanguagePage(uint8_t *p, int len)
 {
-  char *infoline = "Subtitles Index Page";
+  const char *infoline = "Subtitles Index Page";
   int foundlines = 0;
 
   if(len < (3*46))
diff -Nru ttxtsubs-0.0.5/ttxtsubsdisplayer.h ttxtsubs-0.0.5-raastinrauta-edition/ttxtsubsdisplayer.h
--- ttxtsubs-0.0.5/ttxtsubsdisplayer.h	2008-01-13 18:18:53.000000000 +0200
+++ ttxtsubs-0.0.5-raastinrauta-edition/ttxtsubsdisplayer.h	2008-01-13 18:17:43.000000000 +0200
@@ -24,7 +24,8 @@
 
 class cTtxtSubsLiveReceiver : public cReceiver, public cTtxtSubsDisplayer {
  public:
-  cTtxtSubsLiveReceiver(int Pid, int textpage);
+  cTtxtSubsLiveReceiver(tChannelID ChnId, int Pid, int textpage);
+  ~cTtxtSubsLiveReceiver(void);
 
  protected:
   virtual void Activate(bool On);
diff -Nru ttxtsubs-0.0.5/ttxtsubsfilter.c ttxtsubs-0.0.5-raastinrauta-edition/ttxtsubsfilter.c
--- ttxtsubs-0.0.5/ttxtsubsfilter.c	2008-01-13 18:18:53.000000000 +0200
+++ ttxtsubs-0.0.5-raastinrauta-edition/ttxtsubsfilter.c	2008-01-13 18:17:43.000000000 +0200
@@ -34,12 +34,12 @@
 
   mCount = count;
 
-  if(0) {
-    fprintf(stderr, "SetPages: %d, ", count);
+#if 0
+    dprint("SetPages: %d, ", count);
     for(size_t i = 0; i < count; i++)
-      fprintf(stderr, "%03x ", pages[i]);
-    fprintf(stderr, "\n");
-  }
+      dprint("%03x ", pages[i]);
+    dprint("\n");
+#endif
 }
 
 // XXX IF MERGING PAGES FROM SEVERAL PIDS (which we currently don't)
@@ -61,14 +61,14 @@
   mag = mp & 0x7;
   packet = (mp >> 3) & 0x1f;
 
-  if (0) { // XXX
+#if 0 // XXX
     uint8_t buf[2];
     ham8_4byte(mp, buf);
-    fprintf(stderr, "unham %02x %02x -> %02x, ham: %02x %02x\n",
+    dprint("unham %02x %02x -> %02x, ham: %02x %02x\n",
 	    invtab[d->mag_addr_ham[0]], invtab[d->mag_addr_ham[1]],
 	    mp,
 	    buf[0], buf[1]);
-  }
+#endif
 
   // packet 0, change page no in this magazine
   if(packet == 0) {
@@ -80,7 +80,7 @@
     mMagPage[mag] = newindex = Find(mCount, mPages, (mag << 8) | no);
 
     if(newindex != -1) {
-      //fprintf(stderr, "Filter: %x%02x (%d)\n", mag, no, newindex); // XXX
+      //dprint("Filter: %x%02x (%d)\n", mag, no, newindex); // XXX
 
       MakeY0(outdata, indata, mPages[newindex]);
       result = 1;
diff -Nru ttxtsubs-0.0.5/ttxtsubsglobals.h ttxtsubs-0.0.5-raastinrauta-edition/ttxtsubsglobals.h
--- ttxtsubs-0.0.5/ttxtsubsglobals.h	2008-01-13 18:18:53.000000000 +0200
+++ ttxtsubs-0.0.5-raastinrauta-edition/ttxtsubsglobals.h	2008-01-13 18:17:43.000000000 +0200
@@ -1,17 +1,23 @@
 
 class cPluginTtxtsubs;
 class cMenuSetupTtxtsubs;
+class cTtxtsubsPageMenu;
+class cTtxtSubsChannelSettings;
+class cTtxtSubsDisplay;
 
 #define MAXLANGUAGES 5
 
 class cTtxtsubsConf {
   friend class cPluginTtxtsubs;
   friend class cMenuSetupTtxtsubs;
+  friend class cTtxtsubsPageMenu;
+  friend class cTtxtSubsDisplay;
 
  public:
   cTtxtsubsConf(void)
     {
       mDoDisplay = 1;
+      mRealDoDisplay =1;
       mDoRecord = 1;
       mMainMenuEntry = 0;
       mTextPos = 0;
@@ -19,14 +25,20 @@
       mBottomAdj = 0;
       mFrenchSpecial = 0;
       mLineSpacing = 0;
+      mDvbSources = 0;
+      mFontSize = 20;
       mFgColor = 1;
-      mBgColor = 10;
+      mBgColor = 8;
+      mCustomColor = 0xBB333333;
       memset(mLanguages, 0, sizeof(mLanguages));
       memset(mHearingImpaireds, 0, sizeof(mHearingImpaireds));
+      mI18nLanguage = 0;
+      mLiveDelay = 0;
+      mReplayDelay = 0;
     }
 
  public:
-  int doDisplay(void) {return mDoDisplay;}
+  int doDisplay(void) {return mRealDoDisplay;}
   int doRecord(void) {return mDoRecord;}
   int mainMenuEntry(void) {return mMainMenuEntry;}
   int textPos(void) {return mTextPos;}
@@ -34,15 +46,22 @@
   int bottomAdj(void) {return mBottomAdj;}
   int frenchSpecial(void) {return mFrenchSpecial;}
   int lineSpacing(void) {return mLineSpacing;}
+  int dvbSources(void) {return mDvbSources;}
+  int fontSize(void) {return mFontSize;}
   int fgColor(void) {return mFgColor;}
   int bgColor(void) {return mBgColor;}
+  int customColor(void) {return mCustomColor;}
   char (*languages(void))[MAXLANGUAGES][2][4] {return &mLanguages;}
   int (*hearingImpaireds(void))[MAXLANGUAGES][2] {return &mHearingImpaireds;}
 
   int langChoise(const char *lang, const int HI);
+  int i18nLanguage(void) {return mI18nLanguage;}
+  int liveDelay(void) {return mLiveDelay;}
+  int replayDelay(void) {return mReplayDelay;}
 
  protected:
   int mDoDisplay;
+  int mRealDoDisplay;
   int mDoRecord;
   int mMainMenuEntry;
   int mTextPos;
@@ -50,10 +69,17 @@
   int mBottomAdj;
   int mFrenchSpecial;
   int mLineSpacing;
+  int mDvbSources;
+  int mFontSize;
   int mFgColor;
   int mBgColor;
+  int mCustomColor;
   char mLanguages[MAXLANGUAGES][2][4];
   int mHearingImpaireds[MAXLANGUAGES][2];
+  int mI18nLanguage;
+  int mLiveDelay;
+  int mReplayDelay;
 };
 
 extern cTtxtsubsConf globals;
+    
diff -Nru ttxtsubs-0.0.5/ttxtsubsi18n.c ttxtsubs-0.0.5-raastinrauta-edition/ttxtsubsi18n.c
--- ttxtsubs-0.0.5/ttxtsubsi18n.c	2008-01-13 18:18:53.000000000 +0200
+++ ttxtsubs-0.0.5-raastinrauta-edition/ttxtsubsi18n.c	2008-01-22 19:17:07.000000000 +0200
@@ -9,8 +9,7 @@
 #include "ttxtsubsi18n.h"
 #include <stdio.h>
 
-const tI18nPhrase Phrases[] =
-{
+const tI18nPhrase Phrases[] = {
   { "Teletext subtitles", // English
     "Videotextuntertitel", // German - Tobias Grimm 2004-05-21
     "", // Slovenian
@@ -21,15 +20,16 @@
     "", // Norwegian
     "Tekstitys (Teksti-TV)", // Finnish - Rolf Ahrenberg 2004-03-01
     "", // Polish
-    "", // Spanish
+    "Subtítulos teletexto", // Spanish
     "", // Greek
     "Textning (Text-TV)", // Swedish
     "", // Romanian
     "", // Hungarian
-    "", // Catalanian
-#if VDRVERSNUM >= 10300
-    "", // Russian
-#endif
+    "Subtítols teletext", // Catalanian
+    "ÂÕÛÕâÕÚáâ-áãÑâØâàë", // Russian - Vyacheslav Dikonov 2004-xx-xx
+    "", // Croatian
+    "", // Eesti
+    "", // Dansk
   },
   { "Hide teletext subtitles", // English
     "Verstecke Videotextuntertitel", // German
@@ -41,15 +41,16 @@
     "", // Norwegian
     "Piilota tekstitys (Teksti-TV)", // Finnish
     "", // Polish
-    "", // Spanish
+    "Esconde subtítulos teletexto", // Spanish
     "", // Greek
     "Göm textning (Text-TV)", // Swedish
     "", // Romanian
     "", // Hungarian
-    "", // Catalenian
-#if VDRVERSNUM >= 10300
-    "", // Russian
-#endif
+    "Amaga subtítols teletext", // Catalenian
+    "ÁÚàëâì áãÑâØâàë", // Russian
+    "", // Croatian
+    "", // Eesti
+    "", // Dansk
   },
   { "Display teletext subtitles", // English
     "Zeige Videotextuntertitel", // German
@@ -61,15 +62,16 @@
     "", // Norwegian
     "Näytä tekstitys (Teksti-TV)", // Finnish
     "", // Polish
-    "", // Spanish
+    "Visualiza subtítulos teletexto", // Spanish
     "", // Greek
     "Visa textning (Text-TV)", // Swedish
     "", // Romanian
     "", // Hungarian
-    "", // Catalenian
-#if VDRVERSNUM >= 10300
-    "", // Russian
-#endif
+    "Visualitza subtítols teletext", // Catalenian
+    "¿ÞÚÐ×ëÒÐâì áãÑâØâàë", // Russian
+    "", // Croatian
+    "", // Eesti
+    "", // Dansk
   },
   { "Position Teletext Subtitles for 4:3/Anamorph", // English
     "Positioniere Videotext-Untertitel für 4:3/Anamorph", // German
@@ -81,15 +83,16 @@
     "", // Norwegian
     "4:3/Anamorfinen tekstitys (Teksti-TV)", // Finnish
     "", // Polish
-    "", // Spanish
+    "Posiciona subtítulos teletexto para 4:3/anamórfico", // Spanish
     "", // Greek
     "Textning för 4:3/anamorf (Text-TV)", // Swedish
     "", // Romanian
     "", // Hungarian
-    "", // Catalenian
-#if VDRVERSNUM >= 10300
-    "", // Russian
-#endif
+    "Posiciona subtítols teletext per a 4:3/anamòrfic", // Catalenian
+    "ÁãÑâØâàë Ò ÚÐÔàÕ 4:3", // Russian
+    "", // Croatian
+    "", // Eesti
+    "", // Dansk
   },
   { "Position Teletext Subtitles for Letterbox", // English
     "Positioniere Videotext-Untertitel für Letterbox", // German
@@ -101,15 +104,16 @@
     "", // Norwegian
     "Letterbox tekstitys (Teksti-TV)", // Finnish
     "", // Polish
-    "", // Spanish
+    "Posicióna subtítulos teletexto para Letterbox", // Spanish
     "", // Greek
     "Textning för brevlådeformat (Text-TV)", // Swedish
     "", // Romanian
     "", // Hungarian
-    "", // Catalenian
-#if VDRVERSNUM >= 10300
-    "", // Russian
-#endif
+    "Posiciona subtítols teletext per a Letterbox", // Catalenian
+    "ÁãÑâØâàë Ò ÚÐÔàÕ èØàÞÚÞíÚàÐÝÝÞÓÞ äØÛìÜÐ", // Russian
+    "", // Croatian
+    "", // Eesti
+    "", // Dansk
   },
   { "Display Subtitles", // English
     "Zeige Untertitel", // German
@@ -121,15 +125,16 @@
     "", // Norwegian
     "Näytä tekstitykset", // Finnish
     "", // Polish
-    "", // Spanish
+    "Visualiza subtítulos", // Spanish
     "", // Greek
     "Visa textning", // Swedish
     "", // Romanian
     "", // Hungarian
-    "", // Catalenian
-#if VDRVERSNUM >= 10300
-    "", // Russian
-#endif
+    "Visualitza subtítols", // Catalenian
+    "¿ÞÚÐ×ëÒÐâì áãÑâØâàë", // Russian
+    "", // Croatian
+    "", // Eesti
+    "", // Dansk
   },
   { "Record Subtitles", // English
     "Nimm Untertitel auf", // German
@@ -141,15 +146,16 @@
     "", // Norwegian
     "Tallenna tekstitykset", // Finnish
     "", // Polish
-    "", // Spanish
+    "Graba subtítulos", // Spanish
     "", // Greek
     "Spela in textning", // Swedish
     "", // Romanian
     "", // Hungarian
-    "", // Catalenian
-#if VDRVERSNUM >= 10300
-    "", // Russian
-#endif
+    "Grava subtítols", // Catalenian
+    "·ÐßØáëÒÐâì áãÑâØâàë", // Russian
+    "", // Croatian
+    "", // Eesti
+    "", // Dansk
   },
   { "Main Menu Alternative", // English
     "Hauptmenu Alternative", // German
@@ -161,15 +167,16 @@
     "", // Norwegian
     "Päävalikon toiminnot", // Finnish
     "", // Polish
-    "", // Spanish
+    "Alternativa del menú principal", // Spanish
     "", // Greek
     "Huvudmenyalternativ", // Swedish
     "", // Romanian
     "", // Hungarian
-    "", // Catalenian
-#if VDRVERSNUM >= 10300
-    "", // Russian
-#endif
+    "Alternativa del menú principal", // Catalenian
+    "ºÞÜÐÝÔÐ Ò ÓÛÐÒÝÞÜ ÜÕÝî", // Russian
+    "", // Croatian
+    "", // Eesti
+    "", // Dansk
   },
   { "Display on/off", // English
     "Anzeige ein/aus", // German
@@ -181,15 +188,16 @@
     "", // Norwegian
     "aktivointi", // Finnish
     "", // Polish
-    "", // Spanish
+    "Visualiza sí/no", // Spanish
     "", // Greek
     "Visa textning på/av", // Swedish
     "", // Romanian
     "", // Hungarian
-    "", // Catalenian
-#if VDRVERSNUM >= 10300
-    "", // Russian
-#endif
+    "Visualitza si/no", // Catalenian
+    "ÒÚÛîçØâì/ÒëÚÛîçØâì", // Russian
+    "", // Croatian
+    "", // Eesti
+    "", // Dansk
   },
   { "4:3/Letterbox", // English
     "4:3/Letterbox",
@@ -201,15 +209,16 @@
     "", // Norwegian
     "kuvasuhde", // Finnish
     "", // Polish
-    "", // Spanish
+    "4:3/Letterbox", // Spanish
     "", // Greek
     "4:3/brevlådeformat", // Swedish
     "", // Romanian
     "", // Hungarian
-    "", // Catalenian
-#if VDRVERSNUM >= 10300
-    "", // Russian
-#endif
+    "4:3/Letterbox", // Catalenian
+    "4:3/èØàÞÚØÙ íÚàÐÝ", // Russian
+    "", // Croatian
+    "", // Eesti
+    "", // Dansk
   },
   { "Text Horizontal Position", // English
     "Horizontale Textposition", // German
@@ -221,15 +230,16 @@
     "", // Norwegian
     "Vaakatasaus", // Finnish
     "", // Polish
-    "", // Spanish
+    "´Posición horizontal del texto", // Spanish
     "", // Greek
     "Horisontell position", // Swedish
     "", // Romanian
     "", // Hungarian
-    "", // Catalenian
-#if VDRVERSNUM >= 10300
-    "", // Russian
-#endif
+    "Posició horitzontal del text ", // Catalenian
+    "ÀÐ×ÜÕéÕÝØÕ âÕÚáâÐ ßÞ ÓÞàØ×ÞÝâÐÛØ", // Russian
+    "", // Croatian
+    "", // Eesti
+    "", // Dansk
   },
   { "Left", // English
     "Links", // German
@@ -241,15 +251,16 @@
     "", // Norwegian
     "vasen", // Finnish
     "", // Polish
-    "", // Spanish
+    "Izquierda", // Spanish
     "", // Greek
     "vänster", // Swedish
     "", // Romanian
     "", // Hungarian
-    "", // Catalenian
-#if VDRVERSNUM >= 10300
-    "", // Russian
-#endif
+    "Esquerra", // Catalenian
+    "áÛÕÒÐ", // Russian
+    "", // Croatian
+    "", // Eesti
+    "", // Dansk
   },
   { "Center", // English
     "Mitte", // German
@@ -261,15 +272,16 @@
     "", // Norwegian
     "keskitä", // Finnish
     "", // Polish
-    "", // Spanish
+    "Centro", // Spanish
     "", // Greek
     "centrerad", // Swedish
     "", // Romanian
     "", // Hungarian
-    "", // Catalenian
-#if VDRVERSNUM >= 10300
-    "", // Russian
-#endif
+    "Centre", // Catalenian
+    "Ò æÕÝâàÕ", // Russian
+    "", // Croatian
+    "", // Eesti
+    "", // Dansk
   },
   { "Right", // English
     "Rechts", // German
@@ -281,15 +293,16 @@
     "", // Norwegian
     "oikea", // Finnish
     "", // Polish
-    "", // Spanish
+    "Derecha", // Spanish
     "", // Greek
     "höger", // Swedish
     "", // Romanian
     "", // Hungarian
-    "", // Catalenian
-#if VDRVERSNUM >= 10300
-    "", // Russian
-#endif
+    "Dreta", // Catalenian
+    "áßàÐÒÐ", // Russian
+    "", // Croatian
+    "", // Eesti
+    "", // Dansk
   },
   { "Text Vertical Position", // English
     "Vertikale Textposition", // German
@@ -301,15 +314,16 @@
     "", // Norwegian
     "Pystytasaus", // Finnish
     "", // Polish
-    "", // Spanish
+    "Posición vertical del texto", // Spanish
     "", // Greek
     "Vertikal positon", // Swedish
     "", // Romanian
     "", // Hungarian
-    "", // Catalenian
-#if VDRVERSNUM >= 10300
-    "", // Russian
-#endif
+    "Posición vertical del text", // Catalenian
+    "ÀÐ×ÜÕéÕÝØÕ âÕÚáâÐ ßÞ ÒÕàâØÚÐÛØ", // Russian
+    "", // Croatian
+    "", // Eesti
+    "", // Dansk
   },
   { "4:3/Anamorph", // English
     "4:3/Anamorph", // German
@@ -321,15 +335,16 @@
     "", // Norwegian
     "4:3/anamorfinen", // Finnish
     "", // Polish
-    "", // Spanish
+    "4:3/Anamórfico", // Spanish
     "", // Greek
     "4:3/anamorf", // Swedish
     "", // Romanian
     "", // Hungarian
-    "", // Catalenian
-#if VDRVERSNUM >= 10300
-    "", // Russian
-#endif
+    "4:3/Anamòrfic", // Catalenian
+    "4:3", // Russian
+    "", // Croatian
+    "", // Eesti
+    "", // Dansk
   },
   { "Letterbox", // English
     "Letterbox", // German
@@ -341,15 +356,16 @@
     "", // Norwegian
     "letterbox", // Finnish
     "", // Polish
-    "", // Spanish
+    "Letterbox", // Spanish
     "", // Greek
     "brevlådeformat", // Swedish
     "", // Romanian
     "", // Hungarian
-    "", // Catalenian
-#if VDRVERSNUM >= 10300
-    "", // Russian
-#endif
+    "Letterbox", // Catalenian
+    "èØàÞÚØÙ íÚàÐÝ", // Russian
+    "", // Croatian
+    "", // Eesti
+    "", // Dansk
   },
   { "Text Vertical Adjust", // English
     "Text vertikal verschieben", // German
@@ -361,15 +377,16 @@
     "", // Norwegian
     "Pystytasauksen hienosäätö", // Finnish
     "", // Polish
-    "", // Spanish
+    "Ajuste vertical del texto", // Spanish
     "", // Greek
     "Vertikal justering", // Swedish
     "", // Romanian
     "", // Hungarian
-    "", // Catalenian
-#if VDRVERSNUM >= 10300
-    "", // Russian
-#endif
+    "Ajustament vertical del text", // Catalenian
+    "²ÕàâØÚÐÛìÝëÙ áÔÒØÓ âÕÚáâÐ", // Russian
+    "", // Croatian
+    "", // Eesti
+    "", // Dansk
   },
   { "Line Spacing Adjust", // English
     "Zeilenabstand einstellen", // German
@@ -381,15 +398,16 @@
     "", // Norwegian
     "Rivivälin hienosäätö", // Finnish
     "", // Polish
-    "", // Spanish
+    "Ajuste distancia entre líneas", // Spanish
     "", // Greek
     "Radavstånd", // Swedish
     "", // Romanian
     "", // Hungarian
-    "", // Catalenian
-#if VDRVERSNUM >= 10300
-    "", // Russian
-#endif
+    "Ajustament distancia entre línies", // Catalenian
+    "ÀÐááâÞïÝØÕ ÜÕÖÔã áâàÞÚÐÜØ", // Russian
+    "", // Croatian
+    "", // Eesti
+    "", // Dansk
   },
   { "Workaround for some French chns", // English
     "Workaround für französische Kanäle", // German
@@ -401,15 +419,16 @@
     "", // Norwegian
     "Ranskalainen silmänkääntötemppu", // Finnish
     "", // Polish
-    "", // Spanish
+    "Corrección para canales franceses", // Spanish
     "", // Greek
     "Fix för vissa franska kanaler", // Swedish
     "", // Romanian
     "", // Hungarian
-    "", // Catalenian
-#if VDRVERSNUM >= 10300
-    "", // Russian
-#endif
+    "Correcció per a canals francesos", // Catalenian
+    "ÁßÕæ. ÝÐáâàÞÙÚØ ÔÛï äàÐÝæ. ÚÐÝÐÛÞÒ", // Russian
+    "", // Croatian
+    "", // Eesti
+    "", // Dansk
   },
   { "Language", // English
     "Sprache", // German
@@ -421,15 +440,16 @@
     "", // Norwegian
     "Tekstityskieli", // Finnish
     "", // Polish
-    "", // Spanish
+    "Idioma", // Spanish
     "", // Greek
     "Språk", // Swedish
     "", // Romanian
     "", // Hungarian
-    "", // Catalenian
-#if VDRVERSNUM >= 10300
-    "", // Russian
-#endif
+    "Idioma", // Catalenian
+    "Ï×ëÚ", // Russian
+    "", // Croatian
+    "", // Eesti
+    "", // Dansk
   },
   { "Hearing Impaired", // English
     "Gehörlose", // German
@@ -441,15 +461,37 @@
     "", // Norwegian
     "kuulorajoitteisille", // Finnish
     "", // Polish
-    "", // Spanish
+    "No oyente", // Spanish
     "", // Greek
     "Nedsatt hörsel", // Swedish
     "", // Romanian
     "", // Hungarian
+    "Discapacitats auditius", // Catalenian
+    "ÔÛï áÛÐÑÞáÛëèÐéØå", // Russian
+    "", // Croatian
+    "", // Eesti
+    "", // Dansk
+  },
+  { "Font Size (pixel)", // English
+    "", // German
+    "", // Slovenian
+    "", // Italian
+    "", // Dutch
+    "", // Portuguese
+    "Taille Police (pixel)", // French
+    "", // Norwegian
+    "Kirjasintyypin koko (px)", // Finnish
+    "", // Polish
+    "", // Spanish
+    "", // Greek
+    "", // Swedish
+    "", // Romanian
+    "", // Hungarian
     "", // Catalenian
-#if VDRVERSNUM >= 10300
     "", // Russian
-#endif
+    "", // Croatian
+    "", // Eesti
+    "", // Dansk
   },
   { "Text Color", // English
     "Textfarbe", // German
@@ -461,15 +503,16 @@
     "", // Norwegian
     "Kirjasimen väri", // Finnish
     "", // Polish
-    "", // Spanish
+    "Color del texto", // Spanish
     "", // Greek
     "Färg på text", // Swedish
     "", // Romanian
     "", // Hungarian
-    "", // Catalenian
-#if VDRVERSNUM >= 10300
-    "", // Russian
-#endif
+    "Color del text", // Catalenian
+    "ÆÒÕâ âÕÚáâÐ", // Russian
+    "", // Croatian
+    "", // Eesti
+    "", // Dansk
   },
   { "Background Color", // English
     "Hintergrundfarbe", // German
@@ -481,15 +524,16 @@
     "", // Norwegian
     "Taustaväri", // Finnish
     "", // Polish
-    "", // Spanish
+    "Color de fondo", // Spanish
     "", // Greek
     "Färg på bakgrund", // Swedish
     "", // Romanian
     "", // Hungarian
-    "", // Catalenian
-#if VDRVERSNUM >= 10300
-    "", // Russian
-#endif
+    "Color de fons", // Catalenian
+    "ÆÒÕâ äÞÝÐ", // Russian
+    "", // Croatian
+    "", // Eesti
+    "", // Dansk
   },
   { "Black", // English
     "Schwarz", // German
@@ -501,15 +545,16 @@
     "", // Norwegian
     "musta", // Finnish
     "", // Polish
-    "", // Spanish
+    "Negro", // Spanish
     "", // Greek
     "svart", // Swedish
     "", // Romanian
     "", // Hungarian
-    "", // Catalenian
-#if VDRVERSNUM >= 10300
-    "", // Russian
-#endif
+    "Negre", // Catalenian
+    "çñàÝëÙ", // Russian
+    "", // Croatian
+    "", // Eesti
+    "", // Dansk
   },
   { "White", // English
     "Weiss", // German
@@ -521,15 +566,16 @@
     "", // Norwegian
     "valkoinen", // Finnish
     "", // Polish
-    "", // Spanish
+    "Blanco", // Spanish
     "", // Greek
     "vit", // Swedish
     "", // Romanian
     "", // Hungarian
-    "", // Catalenian
-#if VDRVERSNUM >= 10300
-    "", // Russian
-#endif
+    "Blanc", // Catalenian
+    "ÑÕÛëÙ", // Russian
+    "", // Croatian
+    "", // Eesti
+    "", // Dansk
   },
   { "Red", // English
     "Rot", // German
@@ -541,15 +587,16 @@
     "", // Norwegian
     "punainen", // Finnish
     "", // Polish
-    "", // Spanish
+    "Rojo", // Spanish
     "", // Greek
     "röd", // Swedish
     "", // Romanian
     "", // Hungarian
-    "", // Catalenian
-#if VDRVERSNUM >= 10300
-    "", // Russian
-#endif
+    "Vermell", // Catalenian
+    "ÚàÐáÝëÙ", // Russian
+    "", // Croatian
+    "", // Eesti
+    "", // Dansk
   },
   { "Green", // English
     "Grün", // German
@@ -561,15 +608,16 @@
     "", // Norwegian
     "vihreä", // Finnish
     "", // Polish
-    "", // Spanish
+    "Verde", // Spanish
     "", // Greek
     "grön", // Swedish
     "", // Romanian
     "", // Hungarian
-    "", // Catalenian
-#if VDRVERSNUM >= 10300
-    "", // Russian
-#endif
+    "Verd", // Catalenian
+    "×ÕÛñÝëÙ", // Russian
+    "", // Croatian
+    "", // Eesti
+    "", // Dansk
   },
   { "Yellow", // English
     "Gelb", // German
@@ -581,15 +629,16 @@
     "", // Norwegian
     "keltainen", // Finnish
     "", // Polish
-    "", // Spanish
+    "Amarillo", // Spanish
     "", // Greek
     "gul", // Swedish
     "", // Romanian
     "", // Hungarian
-    "", // Catalenian
-#if VDRVERSNUM >= 10300
-    "", // Russian
-#endif
+    "Groc", // Catalenian
+    "ÖñÛâëÙ", // Russian
+    "", // Croatian
+    "", // Eesti
+    "", // Dansk
   },
   { "Magenta", // English
     "Magenta", // German
@@ -601,15 +650,16 @@
     "", // Norwegian
     "magenta", // Finnish
     "", // Polish
-    "", // Spanish
+    "Magenta", // Spanish
     "", // Greek
     "magenta", // Swedish
     "", // Romanian
     "", // Hungarian
-    "", // Catalenian
-#if VDRVERSNUM >= 10300
-    "", // Russian
-#endif
+    "Magenta", // Catalenian
+    "ßãàßãàÝëÙ", // Russian
+    "", // Croatian
+    "", // Eesti
+    "", // Dansk
   },
   { "Blue", // English
     "Blau", // German
@@ -621,15 +671,16 @@
     "", // Norwegian
     "sininen", // Finnish
     "", // Polish
-    "", // Spanish
+    "Azul", // Spanish
     "", // Greek
     "blå", // Swedish
     "", // Romanian
     "", // Hungarian
-    "", // Catalenian
-#if VDRVERSNUM >= 10300
-    "", // Russian
-#endif
+    "Blau", // Catalenian
+    "áØÝØÙ", // Russian
+    "", // Croatian
+    "", // Eesti
+    "", // Dansk
   },
   { "Cyan", // English
     "Türkis", // German
@@ -641,15 +692,16 @@
     "", // Norwegian
     "syaani", // Finnish
     "", // Polish
-    "", // Spanish
+    "Cian", // Spanish
     "", // Greek
     "cyan", // Swedish
     "", // Romanian
     "", // Hungarian
-    "", // Catalenian
-#if VDRVERSNUM >= 10300
-    "", // Russian
-#endif
+    "Cian", // Catalenian
+    "ÓÞÛãÑÞÙ", // Russian
+    "", // Croatian
+    "", // Eesti
+    "", // Dansk
   },
   { "Grey", // English
     "Grau", // German
@@ -661,15 +713,16 @@
     "", // Norwegian
     "harmaa", // Finnish
     "", // Polish
-    "", // Spanish
+    "Gris", // Spanish
     "", // Greek
     "grå", // Swedish
     "", // Romanian
     "", // Hungarian
-    "", // Catalenian
-#if VDRVERSNUM >= 10300
-    "", // Russian
-#endif
+    "Gris", // Catalenian
+    "áÕàëÙ", // Russian
+    "", // Croatian
+    "", // Eesti
+    "", // Dansk
   },
   { "Transparent", // English
     "Transparent", // German
@@ -681,35 +734,457 @@
     "", // Norwegian
     "läpinäkyvä", // Finnish
     "", // Polish
-    "", // Spanish
+    "Transparente", // Spanish
     "", // Greek
     "transparent", // Swedish
     "", // Romanian
     "", // Hungarian
-    "", // Catalenian
-#if VDRVERSNUM >= 10300
+    "Transparent", // Catalenian
+    "ßàÞ×àÐçÝëÙ", // Russian
+    "", // Croatian
+    "", // Eesti
+    "", // Dansk
+  },
+  { "Custom Color", // English
+    "Benutzerdefinierte Farbe", // German
+    "", // Slovenian
+    "Colore personalizzato", // Italian
+    "", // Dutch
+    "", // Portuguese
+    "Couleur personnalisée", // French
+    "", // Norwegian
+    "Muokattava väri", // Finnish
+    "", // Polish
+    "Color personalizado", // Spanish
+    "", // Greek
+    "", // Swedish
+    "", // Romanian
+    "", // Hungarian
+    "Color personalitzat", // Catalenian
+    "½ÐáâàÐØÒÐÕÜëÙ æÒÕâ", // Russian
+    "", // Croatian
+    "", // Eesti
+    "", // Dansk
+  },
+  { "Custom", // English
+    "Benutzerdefiniert", // German
+    "", // Slovenian
+    "Personalizzato", // Italian
+    "", // Dutch
+    "", // Portuguese
+    "Personnalisé", // French
+    "", // Norwegian
+    "muokattava", // Finnish
+    "", // Polish
+    "Personalizado", // Spanish
+    "", // Greek
+    "", // Swedish
+    "", // Romanian
+    "", // Hungarian
+    "Personalitzat", // Catalenian
+    "ÝÐáâàÐØÒÐÕÜëÙ", // Russian
+    "", // Croatian
+    "", // Eesti
+    "", // Dansk
+  },
+  { "Red Value", // English
+    "Roter Wert", // German
+    "", // Slovenian
+    "Valore rosso", // Italian
+    "", // Dutch
+    "", // Portuguese
+    "Valeur Rouge", // French
+    "", // Norwegian
+    "Punainen", // Finnish
+    "", // Polish
+    "Valor rojo", // Spanish
+    "", // Greek
+    "", // Swedish
+    "", // Romanian
+    "", // Hungarian
+    "Valor vermell", // Catalenian
+    "ÃàÞÒÕÝì ÚàÐáÝÞÓÞ", // Russian
+    "", // Croatian
+    "", // Eesti
+    "", // Dansk
+  },
+  { "Green Value", // English
+    "Grüner Wert", // German
+    "", // Slovenian
+    "Valore verde", // Italian
+    "", // Dutch
+    "", // Portuguese
+    "Valeur Vert", // French
+    "", // Norwegian
+    "Vihreä", // Finnish
+    "", // Polish
+    "Valor verde", // Spanish
+    "", // Greek
+    "", // Swedish
+    "", // Romanian
+    "", // Hungarian
+    "Valor vert", // Catalenian
+    "ÃàÞÒÕÝì ×ÕÛñÝÞÓÞ", // Russian
+    "", // Croatian
+    "", // Eesti
+    "", // Dansk
+  },
+  { "Blue Value", // English
+    "Blauer Wert", // German
+    "", // Slovenian
+    "Valore azzurro", // Italian
+    "", // Dutch
+    "", // Portuguese
+    "Valeur Bleu", // French
+    "", // Norwegian
+    "Sininen", // Finnish
+    "", // Polish
+    "Valor azul", // Spanish
+    "", // Greek
+    "", // Swedish
+    "", // Romanian
+    "", // Hungarian
+    "Valor blau", // Catalenian
+    "ÃàÞÒÕÝì áØÝÕÓÞ", // Russian
+    "", // Croatian
+    "", // Eesti
+    "", // Dansk
+  },
+  { "Transparency Value", // English
+    "Transparenter Wert", // German
+    "", // Slovenian
+    "Valore trasparenza", // Italian
+    "", // Dutch
+    "", // Portuguese
+    "Valeur de transparence", // French
+    "", // Norwegian
+    "Läpinäkyvyys", // Finnish
+    "", // Polish
+    "Valor transparencia", // Spanish
+    "", // Greek
+    "", // Swedish
+    "", // Romanian
+    "", // Hungarian
+    "Valor transparència", // Catalenian
+    "ÁâÕßÕÝì ßàÞ×àÐçÝÞáâØ", // Russian
+    "", // Croatian
+    "", // Eesti
+    "", // Dansk
+  },
+  { "DVB Source Selection", // English
+    "DVB Quelle Auswahl", // German
+    "", // Slovenian
+    "Selezione sorgente DVB", // Italian
+    "", // Dutch
+    "", // Portuguese
+    "Sélection Source DVB", // French
+    "", // Norwegian
+    "Tekstityslähteen valinta", // Finnish
+    "", // Polish
+    "Selección fuente DVB", // Spanish
+    "", // Greek
+    "", // Swedish
+    "", // Romanian
+    "", // Hungarian
+    "Selecció font DVB", // Catalenian
     "", // Russian
-#endif
+    "", // Croatian
+    "", // Eesti
+    "", // Dansk
   },
-  { "Background", // English
-    "Hintergrund", // German
+  { "All", // English
+    "Alle", // German
     "", // Slovenian
-    "Sfondo", // Italian
+    "Tutte", // Italian
     "", // Dutch
     "", // Portuguese
-    "Fond", // French
+    "Tous", // French
     "", // Norwegian
-    "tausta", // Finnish
+    "kaikki", // Finnish
     "", // Polish
-    "", // Spanish
+    "Todas", // Spanish
     "", // Greek
-    "bakgrund", // Swedish
+    "", // Swedish
     "", // Romanian
     "", // Hungarian
-    "", // Catalenian
-#if VDRVERSNUM >= 10300
+    "Totes", // Catalenian
+    "", // Russian
+    "", // Croatian
+    "", // Eesti
+    "", // Dansk
+  },
+  { "Only DVB-S", // English
+    "Nur DVB-S", // German
+    "", // Slovenian
+    "Solo DVB-S", // Italian
+    "", // Dutch
+    "", // Portuguese
+    "Seulement DVB-S", // French
+    "", // Norwegian
+    "vain DVB-S", // Finnish
+    "", // Polish
+    "Sólo DVB-S", // Spanish
+    "", // Greek
+    "", // Swedish
+    "", // Romanian
+    "", // Hungarian
+    "Només DVB-S", // Catalenian
+    "", // Russian
+    "", // Croatian
+    "", // Eesti
+    "", // Dansk
+  },
+  { "Only DVB-T", // English
+    "Nur DVB-T", // German
+    "", // Slovenian
+    "Solo DVB-T", // Italian
+    "", // Dutch
+    "", // Portuguese
+    "Seulement DVB-T", // French
+    "", // Norwegian
+    "vain DVB-T", // Finnish
+    "", // Polish
+    "Sólo DVB-T", // Spanish
+    "", // Greek
+    "", // Swedish
+    "", // Romanian
+    "", // Hungarian
+    "Només DVB-T", // Catalenian
+    "", // Russian
+    "", // Croatian
+    "", // Eesti
+    "", // Dansk
+  },
+  { "Only DVB-C", // English
+    "Nur DVB-C", // German
+    "", // Slovenian
+    "Solo DVB-C", // Italian
+    "", // Dutch
+    "", // Portuguese
+    "Seulement DVB-C", // French
+    "", // Norwegian
+    "vain DVB-C", // Finnish
+    "", // Polish
+    "Sólo DVB-C", // Spanish
+    "", // Greek
+    "", // Swedish
+    "", // Romanian
+    "", // Hungarian
+    "Només DVB-C", // Catalenian
+    "", // Russian
+    "", // Croatian
+    "", // Eesti
+    "", // Dansk
+  },
+  { "Page Mode", // English
+    "Seitenmodus", // German
+    "", // Slovenian
+    "Modo pagina", // Italian
+    "", // Dutch
+    "", // Portuguese
+    "Mode page", // French
+    "", // Norwegian
+    "sivun valinta", // Finnish
+    "", // Polish
+    "Modo página", // Spanish
+    "", // Greek
+    "", // Swedish
+    "", // Romanian
+    "", // Hungarian
+    "Modalitat pàgina", // Catalenian
+    "", // Russian
+    "", // Croatian
+    "", // Eesti
+    "", // Dansk
+  },
+  { "Page Selection", // English
+    "Seitenauswahl", // German
+    "", // Slovenian
+    "Selezione pagina", // Italian
+    "", // Dutch
+    "", // Portuguese
+    "Page de sélection", // French
+    "", // Norwegian
+    "Tekstityssivun valinta", // Finnish
+    "", // Polish
+    "Selección página subtítulos", // Spanish
+    "", // Greek
+    "", // Swedish
+    "", // Romanian
+    "", // Hungarian
+    "Selecció pàgina subtítols", // Catalenian
+    "", // Russian
+    "", // Croatian
+    "", // Eesti
+    "", // Dansk
+  },
+  { "Subtitle Mode", // English
+    "Untertitelmodus", // German
+    "", // Slovenian
+    "Modo sottotitoli", // Italian
+    "", // Dutch
+    "", // Portuguese
+    "Mode de sous-titres TXT", // French
+    "", // Norwegian
+    "Tekstitystapa", // Finnish
+    "", // Polish
+    "Modo subtítulos", // Spanish
+    "", // Greek
+    "", // Swedish
+    "", // Romanian
+    "", // Hungarian
+    "Modalitat subtítols", // Catalenian
+    "", // Russian
+    "", // Croatian
+    "", // Eesti
+    "", // Dansk
+  },
+  { "Manual Subtitle Page", // English
+    "Manuelle Untertitelseite", // German
+    "", // Slovenian
+    "Pagina manuale sottotitoli", // Italian
+    "", // Dutch
+    "", // Portuguese
+    "Page des sous-titres", // French
+    "", // Norwegian
+    "Asetettu tekstityssivu", // Finnish
+    "", // Polish
+    "Página manual subtítulos", // Spanish
+    "", // Greek
+    "", // Swedish
+    "", // Romanian
+    "", // Hungarian
+    "Pàgina manual subtítols", // Catalenian
+    "", // Russian
+    "", // Croatian
+    "", // Eesti
+    "", // Dansk
+  },
+  { "Subtitle Page Settings", // English
+    "Untertitelseiten Einstellung", // German
+    "", // Slovenian
+    "Settaggi pagina sottotitoli", // Italian
+    "", // Dutch
+    "", // Portuguese
+    "Conf. Page sous-titres TXT", // French
+    "", // Norwegian
+    "Tekstityssivun asetukset", // Finnish
+    "", // Polish
+    "Opciones página subtítulos", // Spanish
+    "", // Greek
+    "", // Swedish
+    "", // Romanian
+    "", // Hungarian
+    "Opcions pàgina subtítols", // Catalenian
+    "", // Russian
+    "", // Croatian
+    "", // Eesti
+    "", // Dansk
+  },
+  { "Auto", // English
+    "Automatisch", // German
+    "", // Slovenian
+    "Automatico", // Italian
+    "", // Dutch
+    "", // Portuguese
+    "Auto", // French
+    "", // Norwegian
+    "automaattinen", // Finnish
+    "", // Polish
+    "Automático", // Spanish
+    "", // Greek
+    "", // Swedish
+    "", // Romanian
+    "", // Hungarian
+    "Automàtic", // Catalenian
+    "", // Russian
+    "", // Croatian
+    "", // Eesti
+    "", // Dansk
+  },
+  { "Manual", // English
+    "Manuell", // German
+    "", // Slovenian
+    "Manuale", // Italian
+    "", // Dutch
+    "", // Portuguese
+    "Manuel", // French
+    "", // Norwegian
+    "manuaalinen", // Finnish
+    "", // Polish
+    "Manual", // Spanish
+    "", // Greek
+    "", // Swedish
+    "", // Romanian
+    "", // Hungarian
+    "Manual", // Catalenian
+    "", // Russian
+    "", // Croatian
+    "", // Eesti
+    "", // Dansk
+  },
+  { "Disabled", // English
+    "Deaktiviert", // German
+    "", // Slovenian
+    "Disattivati", // Italian
+    "", // Dutch
+    "", // Portuguese
+    "Désactivé", // French
+    "", // Norwegian
+    "pois", // Finnish
+    "", // Polish
+    "Desactivados", // Spanish
+    "", // Greek
+    "", // Swedish
+    "", // Romanian
+    "", // Hungarian
+    "Desactivats", // Catalenian
+    "", // Russian
+    "", // Croatian
+    "", // Eesti
+    "", // Dansk
+  },
+  { "Live Delay", // English
+    "Live Verzögerung", // German
+    "", // Slovenian
+    "Ritardo in diretta", // Italian
+    "", // Dutch
+    "", // Portuguese
+    "", // French
+    "", // Norwegian
+    "Viive Live-lähetyksessä", // Finnish
+    "", // Polish
+    "Retardo en directo", // Spanish
+    "", // Greek
+    "", // Swedish
+    "", // Romanian
+    "", // Hungarian
+    "Retard en directe", // Catalenian
+    "", // Russian
+    "", // Croatian
+    "", // Eesti
+    "", // Dansk
+  },
+  { "Replay Delay", // English
+    "Wiedergabe Verzögerung", // German
+    "", // Slovenian
+    "Ritardo in riproduzione", // Italian
+    "", // Dutch
+    "", // Portuguese
+    "", // French
+    "", // Norwegian
+    "Viive toistossa", // Finnish
+    "", // Polish
+    "Retardo en reproducción", // Spanish
+    "", // Greek
+    "", // Swedish
+    "", // Romanian
+    "", // Hungarian
+    "Retard en reproducció", // Catalenian
     "", // Russian
-#endif
+    "", // Croatian
+    "", // Eesti
+    "", // Dansk
   },
   { NULL }
 };
diff -Nru ttxtsubs-0.0.5/ttxtsubspagemenu.c ttxtsubs-0.0.5-raastinrauta-edition/ttxtsubspagemenu.c
--- ttxtsubs-0.0.5/ttxtsubspagemenu.c	1970-01-01 02:00:00.000000000 +0200
+++ ttxtsubs-0.0.5-raastinrauta-edition/ttxtsubspagemenu.c	2008-01-13 18:17:43.000000000 +0200
@@ -0,0 +1,62 @@
+#include "ttxtsubschannelsettings.h"
+
+#include <vdr/menuitems.h>
+#include <vdr/device.h>
+
+#include "ttxtsubspagemenu.h"
+#include "ttxtsubsi18n.h"
+#include "ttxtsubsglobals.h"
+
+const char * MODE_CHOICES[4] = {NULL, NULL, NULL, NULL};
+
+cTtxtsubsPageMenu::~cTtxtsubsPageMenu()
+{
+}
+
+cTtxtsubsPageMenu::cTtxtsubsPageMenu()
+  :cOsdMenu(tr("Subtitle Page Settings"), 30)
+{
+    cDevice *device = cDevice::ActualDevice();
+    channel = Channels.GetByNumber(device->CurrentChannel());
+    setting = TtxtSubsChannelSettings.Get(channel);
+    if (setting) {
+       origPageMode = mPageMode = setting->PageMode();
+       origPageNumber = mPageNumber = setting->PageNumber();
+    } else {
+      origPageMode = mPageMode = 0;
+      origPageNumber = mPageNumber = 0;   
+    }
+    DoDisplay=globals.mRealDoDisplay;
+     
+    MODE_CHOICES[0] = tr("Auto");
+    MODE_CHOICES[1] = tr("Manual");
+    MODE_CHOICES[2] = tr("Disabled");
+    MODE_CHOICES[3] = NULL;
+
+    Add(new cMenuEditBoolItem(tr("Display Subtitles"), &DoDisplay));
+    Add(new cMenuEditStraItem(tr("Subtitle Mode"), &mPageMode, 3, MODE_CHOICES ));
+    Add(new cMenuEditIntItem(tr("Manual Subtitle Page"), &mPageNumber, 100, 899));
+
+    Display();
+};
+
+eOSState cTtxtsubsPageMenu::ProcessKey(eKeys Key)
+{
+    eOSState state = cOsdMenu::ProcessKey(Key);
+
+    if (state == osUnknown) 
+    {
+        if (Key == kOk) 
+        {
+            if(origPageMode!=mPageMode || origPageNumber!=mPageNumber) {
+              if (setting) setting->Set(mPageMode, mPageNumber);
+                     else  TtxtSubsChannelSettings.Add(new cTtxtSubsChannelSetting(channel, mPageMode, mPageNumber));
+              TtxtSubsChannelSettings.Save();
+            }
+            globals.mRealDoDisplay=DoDisplay;   
+            state = osEnd;
+         }
+     }
+
+    return state;
+}
diff -Nru ttxtsubs-0.0.5/ttxtsubspagemenu.h ttxtsubs-0.0.5-raastinrauta-edition/ttxtsubspagemenu.h
--- ttxtsubs-0.0.5/ttxtsubspagemenu.h	1970-01-01 02:00:00.000000000 +0200
+++ ttxtsubs-0.0.5-raastinrauta-edition/ttxtsubspagemenu.h	2008-01-13 18:17:43.000000000 +0200
@@ -0,0 +1,26 @@
+#ifndef ___TTXTSUBSPAGEMENU_H
+#define ___TTXTSUBSPAGEMENU_H
+
+#include <vdr/config.h>
+#include <vdr/osd.h>
+#include <vdr/channels.h>
+#include "ttxtsubs.h"
+#include "ttxtsubschannelsettings.h"
+
+class cTtxtsubsPageMenu : public cOsdMenu 
+{
+    private:
+        cChannel *channel;
+        cTtxtSubsChannelSetting *setting;
+        int mPageNumber;
+        int mPageMode;
+        int origPageNumber;
+        int origPageMode;
+        int DoDisplay;
+    public:
+        cTtxtsubsPageMenu();
+        virtual ~cTtxtsubsPageMenu();
+        virtual eOSState ProcessKey(eKeys Key);
+};
+
+#endif //___TTXTSUBSPAGEMENU_H
diff -Nru ttxtsubs-0.0.5/ttxtsubsreceiver.c ttxtsubs-0.0.5-raastinrauta-edition/ttxtsubsreceiver.c
--- ttxtsubs-0.0.5/ttxtsubsreceiver.c	2008-01-13 18:18:53.000000000 +0200
+++ ttxtsubs-0.0.5-raastinrauta-edition/ttxtsubsreceiver.c	2008-01-22 19:08:58.000000000 +0200
@@ -17,9 +17,13 @@
 
 // ----- cTtxtSubsReceiver -----
 
-cTtxtSubsReceiver::cTtxtSubsReceiver(int Ca, struct ttxtpidinfo *PI)
+cTtxtSubsReceiver::cTtxtSubsReceiver(tChannelID ChnId, int Ca, struct ttxtpidinfo *PI)
   :
-  cReceiver(Ca, -1, 1, PI->pid),
+#if defined(APIVERSNUM) && APIVERSNUM < 10500
+  cReceiver(Ca, -1, PI->pid),
+#else
+  cReceiver(ChnId, -1, PI->pid),
+#endif
   mGetMutex(),
   mGetCond(),
   mRingBuf(sizeof(ringBufItem) * 500, true),
@@ -73,6 +77,7 @@
 {
   // get any waiting threads going
   mGetCond.Broadcast();
+  Detach();
 }
 
 
@@ -90,7 +95,7 @@
 
     memcpy(buf, i->data, 46);
     mRingBuf.Drop(f);
-    // fprintf(stderr, "cTtxtSubsReceiver::Get: returned data!\n");
+    // dprint("cTtxtSubsReceiver::Get: returned data!\n");
     return buf;
   } else {
     return NULL;
@@ -163,7 +168,7 @@
       continue;
 
     if(mFilter.Filter((char *) Data + 4 + i*46, (char *) it.data)) {
-      // fprintf(stderr, "Forward Packet:\n");
+      // dprint("Forward Packet:\n");
       // print_line((char *) Data + 4 + i*46);
       // print_line(buf);
 
@@ -199,10 +204,10 @@
 
 void cTtxtSubsReceiver::AddIndexInfo(char *lang, int type, uint16_t page)
 {
-  //fprintf(stderr, "AddIndexInfo: %c%c%c/%d/%03x\n", lang[0], lang[1], lang[2], type, page); // XXX
+  //dprint("AddIndexInfo: %c%c%c/%d/%03x\n", lang[0], lang[1], lang[2], type, page); // XXX
 
   if(mIndexPageLines == MAXINDEXPAGELINES) {
-    fprintf(stderr, "cTtxtSubsReceiver::AddIndexInfo: Index page full!\n");
+    esyslog("ttxtsubs: cTtxtSubsReceiver::AddIndexInfo: Index page full!");
     return;
   }
 
@@ -234,7 +239,7 @@
 
     init_line(mIndexPage[mIndexPageLines], mIndexPageLines, mIndexPageNo >> 8);
     d = (struct ttxt_data_field *) mIndexPage[mIndexPageLines];
-    char *header = "Subtitles Index Page";
+    const char *header = "Subtitles Index Page";
     txtlen = strlen(header);
     copy_inv_par(d->data, (uint8_t *) header, txtlen);
     for(int i = txtlen; i < 40; i++)
diff -Nru ttxtsubs-0.0.5/ttxtsubsreceiver.h ttxtsubs-0.0.5-raastinrauta-edition/ttxtsubsreceiver.h
--- ttxtsubs-0.0.5/ttxtsubsreceiver.h	2008-01-13 18:18:53.000000000 +0200
+++ ttxtsubs-0.0.5-raastinrauta-edition/ttxtsubsreceiver.h	2008-01-13 18:17:43.000000000 +0200
@@ -9,7 +9,7 @@
 class cTtxtSubsReceiver : public cReceiver
 {
  public:
-  cTtxtSubsReceiver(int Ca, struct ttxtpidinfo *PI);
+  cTtxtSubsReceiver(tChannelID ChnId, int Ca, struct ttxtpidinfo *PI);
   virtual ~cTtxtSubsReceiver();
 
   // returns pointer buf if there is new data
diff -Nru ttxtsubs-0.0.5/ttxtsubsrecorder.c ttxtsubs-0.0.5-raastinrauta-edition/ttxtsubsrecorder.c
--- ttxtsubs-0.0.5/ttxtsubsrecorder.c	2008-01-13 18:18:53.000000000 +0200
+++ ttxtsubs-0.0.5-raastinrauta-edition/ttxtsubsrecorder.c	2008-01-13 18:17:43.000000000 +0200
@@ -31,22 +31,23 @@
   mTtxtinfo = (struct ttxtinfo *) malloc(sizeof(*mTtxtinfo));
   struct ttxtpidinfo *pi = NULL;
   int pid, page;
+  char lang[4] = "";
 
-  if(GetTtxtInfo(dev->CardIndex(), ch->Number(), ch->Sid(), ch->Vpid(), mTtxtinfo)) {
-    fprintf(stderr, "cTtxtSubsRecorder::cTtxtSubsRecorder: GetTtxtSubtitleInfo error!\n");
+  if(GetTtxtInfo(dev->CardIndex(), ch, mTtxtinfo)) {
+    esyslog("ttxtsubs: cTtxtSubsRecorder::cTtxtSubsRecorder: GetTtxtSubtitleInfo error!");
   } else {
-    pi = FindSubs(mTtxtinfo, &pid, &page);
+    pi = FindSubs(mTtxtinfo, &pid, &page, lang);
     
     if(!pi && mTtxtinfo->pidcount > 0) {
       pi = &(mTtxtinfo->p[0]);
-      fprintf(stderr, "Selected language not found, just recording first teletext pid found.\n");
+      isyslog("ttxtsubs: Selected language not found, just recording first teletext pid found.");
     }
 
     if(pi) {
-      mReceiver = new cTtxtSubsReceiver(ch->Ca(), pi);
+      mReceiver = new cTtxtSubsReceiver(ch->GetChannelID(), ch->Ca(), pi);
       mPacketBuffer = (uint8_t *) malloc(MAXPACKETSIZE);
     } else {
-      fprintf(stderr, "No teletext pid found, not recording any (obviously).\n");
+      isyslog("ttxtsubs: No teletext pid found, not recording any (obviously).");
     }
   }
 }
@@ -54,8 +55,9 @@
 cTtxtSubsRecorder::~cTtxtSubsRecorder(void)
 {
   if(mReceiver) {
-    delete mReceiver;
+    cTtxtSubsReceiver *tmp = mReceiver;
     mReceiver = NULL;
+    delete tmp;
   }
 
   if(mTtxtinfo) {
@@ -160,7 +162,7 @@
 
 #if 0
   if(*outbuf) { // XXX
-    fprintf(stderr, "cTtxtSubsRecorder::GetPacket: len: %d\n", len);
+    dprint("cTtxtSubsRecorder::GetPacket: len: %d\n", len);
     for(size_t i = 46; i < len; i +=46) {
       struct ttxt_data_field *d = (struct ttxt_data_field *) b + i;
       if(d->data_unit_id != 0xff)