From 415f957ea35045b32b96831def310465b35035e1 Mon Sep 17 00:00:00 2001 From: Jochen Dolze Date: Sun, 1 Aug 2010 08:42:12 +0200 Subject: Added gettext support --- Makefile | 78 ++-- anyfont.c | 311 ------------- anyfont.cpp | 311 +++++++++++++ config.c | 184 -------- config.cpp | 184 ++++++++ gfxtools.c | 174 ------- gfxtools.cpp | 174 +++++++ i18n.c | 1271 -------------------------------------------------- i18n.cpp | 1271 ++++++++++++++++++++++++++++++++++++++++++++++++++ magazine.c | 1415 -------------------------------------------------------- magazine.cpp | 1415 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ po/de_DE.po | 98 ++++ search.c | 138 ------ search.cpp | 138 ++++++ timer.c | 24 - timer.cpp | 24 + tvonscreen.c | 98 ---- tvonscreen.cpp | 98 ++++ 18 files changed, 3761 insertions(+), 3645 deletions(-) delete mode 100644 anyfont.c create mode 100644 anyfont.cpp delete mode 100644 config.c create mode 100644 config.cpp delete mode 100644 gfxtools.c create mode 100644 gfxtools.cpp delete mode 100644 i18n.c create mode 100644 i18n.cpp delete mode 100644 magazine.c create mode 100644 magazine.cpp create mode 100644 po/de_DE.po delete mode 100644 search.c create mode 100644 search.cpp delete mode 100644 timer.c create mode 100644 timer.cpp delete mode 100644 tvonscreen.c create mode 100644 tvonscreen.cpp diff --git a/Makefile b/Makefile index f8d2dc8..d3492a7 100644 --- a/Makefile +++ b/Makefile @@ -1,30 +1,26 @@ # # Makefile for a Video Disk Recorder plugin # -# $Id: Makefile,v 1.7 2006/06/18 13:59:36 schmitzj Exp $ # The official name of this plugin. # This name will be used in the '-P...' option of VDR to load the plugin. # By default the main source file also carries this name. +# IMPORTANT: the presence of this macro is important for the Make.config +# file. So it must be defined, even if it is not used here! # PLUGIN = tvonscreen ### The version number of this plugin (taken from the main source file): -VERSION = $(shell grep 'static const char \*VERSION *=' $(PLUGIN).c | awk '{ print $$6 }' | sed -e 's/[";]//g') - -### The version number of VDR's plugin API (taken from VDR's "config.h"): - -APIVERSION = $(shell sed -ne '/define APIVERSION/s/^.*"\(.*\)".*$$/\1/p' $(VDRDIR)/config.h) +VERSION = $(shell grep 'static const char \*VERSION *=' $PLUGIN.cpp | awk '{ print $$6 }' | sed -e 's/[";]//g') ### The C++ compiler and options: CXX ?= g++ -CXXFLAGS ?= -fPIC -g -O2 -Wall -Woverloaded-virtual +CXXFLAGS ?= -fPIC -g -O2 -Wall -Wextra -Woverloaded-virtual -Wno-parentheses ### The directory environment: -DVBDIR = ../../../../DVB VDRDIR = ../../.. LIBDIR = ../../lib TMPDIR = /tmp @@ -33,9 +29,9 @@ TMPDIR = /tmp -include $(VDRDIR)/Make.config -### The version number of VDR (taken from VDR's "config.h"): +### The version number of VDR's plugin API (taken from VDR's "config.h"): -VDRVERSION = $(shell grep 'define VDRVERSION ' $(VDRDIR)/config.h | awk '{ print $$3 }' | sed -e 's/"//g') +APIVERSION = $(shell sed -ne '/define APIVERSION/s/^.*"\(.*\)".*$$/\1/p' $(VDRDIR)/config.h) ### The name of the distribution archive: @@ -44,44 +40,66 @@ PACKAGE = vdr-$(ARCHIVE) ### Includes and Defines (add further entries here): -INCLUDES += -I$(VDRDIR)/include -I$(DVBDIR)/include +INCLUDES += -I$(VDRDIR)/include +INCLUDES += -I.. -DEFINES += -DPLUGIN_NAME_I18N='"$(PLUGIN)"' -D_GNU_SOURCE +DEFINES += -D_GNU_SOURCE -DPLUGIN_NAME_I18N='"$(PLUGIN)"' +DEFINES += -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE ### The object files (add further files here): -OBJS = $(PLUGIN).o i18n.o magazine.o anyfont.o config.o gfxtools.o timer.o search.o +OBJS = $(PLUGIN).o anyfont.o config.o gfxtools.o i18n.o magazine.o search.o timer.o + +### The main target: + +all: libvdr-$(PLUGIN).so i18n ### Implicit rules: -%.o: %.c +%.o: %.cpp $(CXX) $(CXXFLAGS) -c $(DEFINES) $(INCLUDES) $< -# Dependencies: +### Dependencies: -MAKEDEP = g++ -MM -MG +MAKEDEP = $(CXX) -MM -MG DEPFILE = .dependencies $(DEPFILE): Makefile - @$(MAKEDEP) $(DEFINES) $(INCLUDES) $(OBJS:%.o=%.c) > $@ + @$(MAKEDEP) $(DEFINES) $(INCLUDES) $(OBJS:%.o=%.cpp) > $@ -include $(DEPFILE) +### Internationalization (I18N): + +PODIR = po +LOCALEDIR = $(VDRDIR)/locale +I18Npo = $(wildcard $(PODIR)/*.po) +I18Nmsgs = $(addprefix $(LOCALEDIR)/, $(addsuffix /LC_MESSAGES/vdr-$(PLUGIN).mo, $(notdir $(foreach file, $(I18Npo), $(basename $(file)))))) +I18Npot = $(PODIR)/$(PLUGIN).pot + +%.mo: %.po + msgfmt -c -o $@ $< + +$(I18Npot): $(wildcard *.cpp *.h) + xgettext -C -cTRANSLATORS --no-wrap --no-location -k -ktr -ktrNOOP --msgid-bugs-address='' -o $@ $^ + +%.po: $(I18Npot) + msgmerge -U --no-wrap --no-location --backup=none -q $@ $< + @touch $@ + +$(I18Nmsgs): $(LOCALEDIR)/%/LC_MESSAGES/vdr-$(PLUGIN).mo: $(PODIR)/%.mo + @mkdir -p $(dir $@) + cp $< $@ + +.PHONY: i18n +i18n: $(I18Nmsgs) $(I18Npot) + ### Targets: -all: libvdr-$(PLUGIN).so +install: libvdr-$(PLUGIN).so: $(OBJS) - $(CXX) $(CXXFLAGS) -shared $(OBJS) -o $@ - @cp $@ $(LIBDIR)/$@.$(APIVERSION) - -dist: clean - @-rm -rf $(TMPDIR)/$(ARCHIVE) - @mkdir $(TMPDIR)/$(ARCHIVE) - @cp -a * $(TMPDIR)/$(ARCHIVE) - @rm -rf `find $(TMPDIR)/$(ARCHIVE) -name CVS -print` - @tar czf $(PACKAGE).tar.gz -C $(TMPDIR) $(ARCHIVE) - @-rm -rf $(TMPDIR)/$(ARCHIVE) - @echo Distribution package created as $(PACKAGE).tgz + $(CXX) $(CXXFLAGS) -shared $(OBJS) $(LIBS) -o $@ + @cp --remove-destination $@ $(LIBDIR)/$@.$(APIVERSION) clean: - @-rm -f $(OBJS) $(DEPFILE) *.so *.tar.gz core* *~ + @-rm -f $(OBJS) $(DEPFILE) *.so *.so.* *.tgz core* *~ $(PODIR)/*.mo $(PODIR)/*.pot diff --git a/anyfont.c b/anyfont.c deleted file mode 100644 index 9022036..0000000 --- a/anyfont.c +++ /dev/null @@ -1,311 +0,0 @@ -/* - * anyfont.c: Internationalization - * - * See the README file for copyright information and how to reach the author. - * - * $Id: anyfont.c,v 1.6 2004/07/08 13:46:38 schmitzj Exp $ - * - */ - -#include "anyfont.h" -#include "magazine.h" - -#if VDRVERSNUM >= 10503 -anyFont::anyFont(cOsd *_osd,int fheight,int transparent) -#elif VDRVERSNUM >= 10307 -anyFont::anyFont(cOsd *_osd,const cFont::tPixelData *fd,int fheight,int transparent) -#else -anyFont::anyFont(cOsdBase *_osd,const cFont::tPixelData *fd,int fheight,int transparent) -#endif -{ - osd=_osd; -#if VDRVERSNUM >= 10503 -#if VDRVERSNUM >= 10504 - Font = cFont::CreateFont(Setup.FontOsd, fheight); -#else - Font = new cFreetypeFont(*AddDirectory(FONTDIR, Setup.FontOsd, fheight); -#endif - if (!Font || !Font->Height()) - Font = cFont::GetFont(fontSml); -#else - FontData=fd; - FontHeight=fheight; -#endif - trans=transparent; -} -int anyFont::Height(void) -{ -#if VDRVERSNUM >= 10503 - return Font->Height(); -#else - return FontHeight-2-2; -#endif -} -int anyFont::Width(const char *txt) -{ - int w = 0; - while (txt && *txt) w += Width(*txt++); - return w; -} -int anyFont::LargeWidth(const char *txt) -{ - int w = 0; - while (txt && *txt) w += Width(*txt++); - return w*2; -} -int anyFont::Width(char c) -{ -#if VDRVERSNUM >= 10503 - return Font->Width(c); -#else - if ((int)FontData[(((unsigned char)c)-32)*(FontHeight)]>100) - { - mzlog(1," big letter error %c: %d",c,(int)FontData[(((unsigned char)c)-32)*(FontHeight)]); - return 100; - } - return (int)FontData[(((unsigned char)c)-32)*(FontHeight)]; -#endif -} -int anyFont::LargeWidth(char c) -{ -#if VDRVERSNUM >= 10503 - return Font->Width(c); -#else - if ((int)FontData[(((unsigned char)c)-32)*(FontHeight)]>100) - { - mzlog(1," big letter error %c: %d",c,(int)FontData[(((unsigned char)c)-32)*(FontHeight)]); - return 100; - } - return (int)FontData[(((unsigned char)c)-32)*(FontHeight)]*2; -#endif -} -#if VDRVERSNUM >= 10307 -int anyFont::Text(int x, int y, const char *txt, tColor fg, tColor bg) -#else -int anyFont::Text(int x, int y, const char *txt, eDvbColor fg, eDvbColor bg, tWindowHandle wh) -#endif -{ -#if VDRVERSNUM >= 10503 - osd->DrawText(x, y, txt, fg, trans ? clrTransparent : bg, Font); - return x += Font->Width(txt); -#else - unsigned int pxl; - int row,col; - - while (txt && *txt) - { - for (row=0; row=0; col--) - { - if (!trans || pxl&1) -#if VDRVERSNUM >= 10307 - osd->DrawRectangle(x+col-1,y+row,x+col-1,y+row,(pxl&1) ? fg : bg); -#else - osd->Fill (x+col-1,y+row,x+col-1,y+row,(pxl&1) ? fg : bg,wh); -#endif - pxl >>= 1; - } - } - x += Width(*txt++); - } - return x; -#endif -} -#if VDRVERSNUM >= 10307 -int anyFont::LargeText(int x, int y, const char *txt, tColor fg, tColor bg) -#else -int anyFont::LargeText(int x, int y, const char *txt, eDvbColor fg, eDvbColor bg, tWindowHandle wh) -#endif -{ -#if VDRVERSNUM >= 10503 - osd->DrawText(x, y, txt, fg, trans ? clrTransparent : bg, Font); - return x + Font->Width(txt); -#else - unsigned int pxl; - int row,col; - - while (txt && *txt) - { - for (row=0; row=0; col--) - { - if (!trans || pxl&1) -#if VDRVERSNUM >= 10307 - osd->DrawRectangle(x+(col-1)*2,y+row,x+(col-1)*2+1,y+row,(pxl&1) ? fg : bg); -#else - osd->Fill (x+(col-1)*2,y+row,x+(col-1)*2+1,y+row,(pxl&1) ? fg : bg,wh); -#endif - pxl >>= 1; - } - } - x += LargeWidth(*txt++); - } - return x; -#endif -} -#if VDRVERSNUM >= 10307 -int anyFont::Text(int x, int y, int w, int h, const char *txt, tColor fg, tColor bg) -#else -int anyFont::Text(int x, int y, int w, int h, const char *txt, eDvbColor fg, eDvbColor bg, tWindowHandle wh) -#endif -{ - if (txt==NULL) - return x; - char *memtxt=strdup(txt); - char *mytxt=memtxt; - char *t2=mytxt; - char c; - int x0=0; - int y0=0; -//mzlog(0,"'%s'",t2); - while (mytxt && *mytxt) - { - switch (*mytxt) - { - case ' ': - case '\t': - case '\n': - c=*(mytxt); - *(mytxt)=0; - if (x0+Width(t2)>w && x0>0) - { - x0=0; - y0+=Height(); - } - if (y0= 10307 - x0+=Text(x+x0,y+y0,t2,fg,bg) -x-x0+Width(c); -#else - x0+=Text(x+x0,y+y0,t2,fg,bg,wh)-x-x0+Width(c); -#endif - *(mytxt)=c; - t2=mytxt+1; - if (c=='\t') - { - if (x0==0) - { - x+=20; - w-=20; - } - else - x0=((x0+20)/20)*20; - } - else if (c=='\n') - { - x0=0; - y0+=Height(); - } - break; - case '-': - case '.': - c=*(mytxt+1); - *(mytxt+1)=0; - if (x0+Width(t2)>w && x0>0) - { - x0=0; - y0+=Height(); - } - if (y0= 10307 - x0+=Text(x+x0,y+y0,t2,fg,bg) -x-x0; -#else - x0+=Text(x+x0,y+y0,t2,fg,bg,wh)-x-x0; -#endif - *(mytxt+1)=c; - t2=mytxt+1; - break; - } - mytxt++; - } - if (t2!=mytxt && *t2!=0) - { - if (x0+Width(t2)>w && x0>0) - { - x0=0; - y0+=Height(); - } - if (y0= 10307 - x0+=Text(x+x0,y+y0,t2,fg,bg); -#else - x0+=Text(x+x0,y+y0,t2,fg,bg,wh); -#endif - } - free(memtxt); - return y0/Height()+1; -} -int anyFont::TextHeight(int w, const char *txt) -{ - if (txt==NULL) - return 0; - char *memtxt=strdup(txt); - char *mytxt=memtxt; - char *t2=mytxt; - char c; - int x0=0; - int y0=0; - while (mytxt && *mytxt) - { - switch (*mytxt) - { - case ' ': - case '\t': - case '\n': - c=*(mytxt); - *(mytxt)=0; - if (x0+Width(t2)>w && x0>0) - { - x0=0; - y0+=Height(); - } - x0+=Width(t2)+Width(c); - *(mytxt)=c; - t2=mytxt+1; - if (c=='\t') - { - if (x0==0) - w-=20; - else - x0=((x0+20)/20)*20; - } - else if (c=='\n') - { - x0=0; - y0+=Height(); - } - break; - case '-': - case '.': - c=*(mytxt+1); - *(mytxt+1)=0; - if (x0+Width(t2)>w && x0>0) - { - x0=0; - y0+=Height(); - } - x0+=Width(t2); - *(mytxt+1)=c; - t2=mytxt+1; - break; - } - mytxt++; - } - if (t2!=mytxt && *t2!=0) - { - if (x0+Width(t2)>w && x0>0) - { - x0=0; - y0+=Height(); - } - } - free(memtxt); - return y0/Height()+1; -} diff --git a/anyfont.cpp b/anyfont.cpp new file mode 100644 index 0000000..9022036 --- /dev/null +++ b/anyfont.cpp @@ -0,0 +1,311 @@ +/* + * anyfont.c: Internationalization + * + * See the README file for copyright information and how to reach the author. + * + * $Id: anyfont.c,v 1.6 2004/07/08 13:46:38 schmitzj Exp $ + * + */ + +#include "anyfont.h" +#include "magazine.h" + +#if VDRVERSNUM >= 10503 +anyFont::anyFont(cOsd *_osd,int fheight,int transparent) +#elif VDRVERSNUM >= 10307 +anyFont::anyFont(cOsd *_osd,const cFont::tPixelData *fd,int fheight,int transparent) +#else +anyFont::anyFont(cOsdBase *_osd,const cFont::tPixelData *fd,int fheight,int transparent) +#endif +{ + osd=_osd; +#if VDRVERSNUM >= 10503 +#if VDRVERSNUM >= 10504 + Font = cFont::CreateFont(Setup.FontOsd, fheight); +#else + Font = new cFreetypeFont(*AddDirectory(FONTDIR, Setup.FontOsd, fheight); +#endif + if (!Font || !Font->Height()) + Font = cFont::GetFont(fontSml); +#else + FontData=fd; + FontHeight=fheight; +#endif + trans=transparent; +} +int anyFont::Height(void) +{ +#if VDRVERSNUM >= 10503 + return Font->Height(); +#else + return FontHeight-2-2; +#endif +} +int anyFont::Width(const char *txt) +{ + int w = 0; + while (txt && *txt) w += Width(*txt++); + return w; +} +int anyFont::LargeWidth(const char *txt) +{ + int w = 0; + while (txt && *txt) w += Width(*txt++); + return w*2; +} +int anyFont::Width(char c) +{ +#if VDRVERSNUM >= 10503 + return Font->Width(c); +#else + if ((int)FontData[(((unsigned char)c)-32)*(FontHeight)]>100) + { + mzlog(1," big letter error %c: %d",c,(int)FontData[(((unsigned char)c)-32)*(FontHeight)]); + return 100; + } + return (int)FontData[(((unsigned char)c)-32)*(FontHeight)]; +#endif +} +int anyFont::LargeWidth(char c) +{ +#if VDRVERSNUM >= 10503 + return Font->Width(c); +#else + if ((int)FontData[(((unsigned char)c)-32)*(FontHeight)]>100) + { + mzlog(1," big letter error %c: %d",c,(int)FontData[(((unsigned char)c)-32)*(FontHeight)]); + return 100; + } + return (int)FontData[(((unsigned char)c)-32)*(FontHeight)]*2; +#endif +} +#if VDRVERSNUM >= 10307 +int anyFont::Text(int x, int y, const char *txt, tColor fg, tColor bg) +#else +int anyFont::Text(int x, int y, const char *txt, eDvbColor fg, eDvbColor bg, tWindowHandle wh) +#endif +{ +#if VDRVERSNUM >= 10503 + osd->DrawText(x, y, txt, fg, trans ? clrTransparent : bg, Font); + return x += Font->Width(txt); +#else + unsigned int pxl; + int row,col; + + while (txt && *txt) + { + for (row=0; row=0; col--) + { + if (!trans || pxl&1) +#if VDRVERSNUM >= 10307 + osd->DrawRectangle(x+col-1,y+row,x+col-1,y+row,(pxl&1) ? fg : bg); +#else + osd->Fill (x+col-1,y+row,x+col-1,y+row,(pxl&1) ? fg : bg,wh); +#endif + pxl >>= 1; + } + } + x += Width(*txt++); + } + return x; +#endif +} +#if VDRVERSNUM >= 10307 +int anyFont::LargeText(int x, int y, const char *txt, tColor fg, tColor bg) +#else +int anyFont::LargeText(int x, int y, const char *txt, eDvbColor fg, eDvbColor bg, tWindowHandle wh) +#endif +{ +#if VDRVERSNUM >= 10503 + osd->DrawText(x, y, txt, fg, trans ? clrTransparent : bg, Font); + return x + Font->Width(txt); +#else + unsigned int pxl; + int row,col; + + while (txt && *txt) + { + for (row=0; row=0; col--) + { + if (!trans || pxl&1) +#if VDRVERSNUM >= 10307 + osd->DrawRectangle(x+(col-1)*2,y+row,x+(col-1)*2+1,y+row,(pxl&1) ? fg : bg); +#else + osd->Fill (x+(col-1)*2,y+row,x+(col-1)*2+1,y+row,(pxl&1) ? fg : bg,wh); +#endif + pxl >>= 1; + } + } + x += LargeWidth(*txt++); + } + return x; +#endif +} +#if VDRVERSNUM >= 10307 +int anyFont::Text(int x, int y, int w, int h, const char *txt, tColor fg, tColor bg) +#else +int anyFont::Text(int x, int y, int w, int h, const char *txt, eDvbColor fg, eDvbColor bg, tWindowHandle wh) +#endif +{ + if (txt==NULL) + return x; + char *memtxt=strdup(txt); + char *mytxt=memtxt; + char *t2=mytxt; + char c; + int x0=0; + int y0=0; +//mzlog(0,"'%s'",t2); + while (mytxt && *mytxt) + { + switch (*mytxt) + { + case ' ': + case '\t': + case '\n': + c=*(mytxt); + *(mytxt)=0; + if (x0+Width(t2)>w && x0>0) + { + x0=0; + y0+=Height(); + } + if (y0= 10307 + x0+=Text(x+x0,y+y0,t2,fg,bg) -x-x0+Width(c); +#else + x0+=Text(x+x0,y+y0,t2,fg,bg,wh)-x-x0+Width(c); +#endif + *(mytxt)=c; + t2=mytxt+1; + if (c=='\t') + { + if (x0==0) + { + x+=20; + w-=20; + } + else + x0=((x0+20)/20)*20; + } + else if (c=='\n') + { + x0=0; + y0+=Height(); + } + break; + case '-': + case '.': + c=*(mytxt+1); + *(mytxt+1)=0; + if (x0+Width(t2)>w && x0>0) + { + x0=0; + y0+=Height(); + } + if (y0= 10307 + x0+=Text(x+x0,y+y0,t2,fg,bg) -x-x0; +#else + x0+=Text(x+x0,y+y0,t2,fg,bg,wh)-x-x0; +#endif + *(mytxt+1)=c; + t2=mytxt+1; + break; + } + mytxt++; + } + if (t2!=mytxt && *t2!=0) + { + if (x0+Width(t2)>w && x0>0) + { + x0=0; + y0+=Height(); + } + if (y0= 10307 + x0+=Text(x+x0,y+y0,t2,fg,bg); +#else + x0+=Text(x+x0,y+y0,t2,fg,bg,wh); +#endif + } + free(memtxt); + return y0/Height()+1; +} +int anyFont::TextHeight(int w, const char *txt) +{ + if (txt==NULL) + return 0; + char *memtxt=strdup(txt); + char *mytxt=memtxt; + char *t2=mytxt; + char c; + int x0=0; + int y0=0; + while (mytxt && *mytxt) + { + switch (*mytxt) + { + case ' ': + case '\t': + case '\n': + c=*(mytxt); + *(mytxt)=0; + if (x0+Width(t2)>w && x0>0) + { + x0=0; + y0+=Height(); + } + x0+=Width(t2)+Width(c); + *(mytxt)=c; + t2=mytxt+1; + if (c=='\t') + { + if (x0==0) + w-=20; + else + x0=((x0+20)/20)*20; + } + else if (c=='\n') + { + x0=0; + y0+=Height(); + } + break; + case '-': + case '.': + c=*(mytxt+1); + *(mytxt+1)=0; + if (x0+Width(t2)>w && x0>0) + { + x0=0; + y0+=Height(); + } + x0+=Width(t2); + *(mytxt+1)=c; + t2=mytxt+1; + break; + } + mytxt++; + } + if (t2!=mytxt && *t2!=0) + { + if (x0+Width(t2)>w && x0>0) + { + x0=0; + y0+=Height(); + } + } + free(memtxt); + return y0/Height()+1; +} diff --git a/config.c b/config.c deleted file mode 100644 index 3bb3ead..0000000 --- a/config.c +++ /dev/null @@ -1,184 +0,0 @@ -/* - * config.c - * - * See the README file for copyright information and how to reach the author. - * - * $Id: config.c,v 1.11 2005/01/02 12:19:32 schmitzj Exp $ - * - */ - -#include "config.h" -#include "magazine.h" - -#include -#include -#include - -tvonscreenConfig tvonscreenCfg; - -#if VDRVERSNUM < 10307 -class cMenuEditTimeItem : public cMenuEditItem { -protected: - int *value; - int hh, mm; - int pos; - virtual void Set(void); -public: - cMenuEditTimeItem(const char *Name, int *Value); - virtual eOSState ProcessKey(eKeys Key); - }; -#endif - -tvonscreenConfig::tvonscreenConfig(void) -{ - showLogos=false; - XLfonts=true; - noInfoLine=false; - showChannels=true; -#if VDRVERSNUM >= 10307 - bwlogos=false; -#else - bwlogos=true; -#endif - colorworkaround=true; - - usertime1=1200; - usertime2=1800; - usertime3=2015; - thenshownextday=true; - showsearchinitiator=true; - - logos=NULL; - vdradminfile=NULL; -} -tvonscreenConfig::~tvonscreenConfig() -{ - if (logos) - free(logos); - if (vdradminfile) - free(vdradminfile); -} - -bool tvonscreenConfig::SetupParse(const char *Name, const char *Value) -{ - if (strcmp(Name,"showLogos")==0) showLogos = atoi(Value); - else if (strcmp(Name,"XLfonts")==0) XLfonts = atoi(Value); - else if (strcmp(Name,"noInfoLine")==0) noInfoLine = atoi(Value); - else if (strcmp(Name,"showChannels")==0) showChannels = atoi(Value); - else if (strcmp(Name,"bwlogos")==0) bwlogos = atoi(Value); - else if (strcmp(Name,"colorworkaround")==0) colorworkaround = atoi(Value); - else if (strcmp(Name,"usertime1")==0) usertime1 = atoi(Value); - else if (strcmp(Name,"usertime2")==0) usertime2 = atoi(Value); - else if (strcmp(Name,"usertime3")==0) usertime3 = atoi(Value); - else if (strcmp(Name,"thenshownextday")==0) thenshownextday = atoi(Value); - else if (strcmp(Name,"showsearchinitiator")==0) showsearchinitiator = atoi(Value); - else - return false; - -#if VDRVERSNUM < 10307 - bwlogos=true; -#endif - return true; -} -const char *tvonscreenConfig::CommandLineHelp(void) -{ - // Return a string that describes all known command line options. - return " -l PathToLogos\n --logos=PathToLogos\n -v vdradmind.at\n --vdradminfile=vdradmind.at\n"; -} - -bool tvonscreenConfig::ProcessArgs(int argc, char *argv[]) -{ - static struct option long_options[] = { - { "logos", required_argument, NULL, 'l' }, - { "vdradminfile",required_argument, NULL, 'v' }, - { NULL } - }; - - bool retval=true; - int c; - while ((c = getopt_long(argc, argv, "l:v:", long_options, NULL)) != -1) - { - switch (c) - { - case 'l': - if (logos) - { - free(logos); - logos=NULL; - } - logos = strdup(optarg); - retval=true; - break; - case 'v': - if (vdradminfile) - { - free(vdradminfile); - vdradminfile=NULL; - } - vdradminfile = strdup(optarg); - retval=true; - break; - default: - break; - } - } - return retval; -} - -// ---------------------------------------------------------------------- - -tvonscreenConfigPage::tvonscreenConfigPage(void) : cMenuSetupPage() -{ - m_NewConfig = tvonscreenCfg; - -#if TL_YSTART == 48 - Add(new cMenuEditBoolItem(tr("show channel logos"), - &m_NewConfig.showLogos)); - Add(new cMenuEditBoolItem(tr("show channel names"), - &m_NewConfig.showChannels)); - Add(new cMenuEditBoolItem(tr("show logos in black&white"), - &m_NewConfig.bwlogos)); - Add(new cMenuEditBoolItem(tr("enable color problem work around"), - &m_NewConfig.colorworkaround)); -#endif - Add(new cMenuEditBoolItem(tr("use XL fonts"), - &m_NewConfig.XLfonts)); - Add(new cMenuEditBoolItem(tr("hide info line"), - &m_NewConfig.noInfoLine)); - - Add(new cMenuEditTimeItem(tr("user point in time 1 (Key 4)"), - &m_NewConfig.usertime1)); - Add(new cMenuEditTimeItem(tr("user point in time 2 (Key 5)"), - &m_NewConfig.usertime2)); - Add(new cMenuEditTimeItem(tr("user point in time 3 (Key 6)"), - &m_NewConfig.usertime3)); - - Add(new cMenuEditBoolItem(tr("jump to next day point if ago"), - &m_NewConfig.thenshownextday)); - - Add(new cMenuEditBoolItem(tr("Show search item itself"), - &m_NewConfig.showsearchinitiator)); - - -} - -tvonscreenConfigPage::~tvonscreenConfigPage() -{ -} - -void tvonscreenConfigPage::Store(void) -{ - SetupStore("showLogos", m_NewConfig.showLogos); - SetupStore("XLfonts", m_NewConfig.XLfonts); - SetupStore("noInfoLine", m_NewConfig.noInfoLine); - SetupStore("showChannels", m_NewConfig.showChannels); - SetupStore("bwlogos", m_NewConfig.bwlogos); - SetupStore("colorworkaround", m_NewConfig.colorworkaround); - SetupStore("usertime1", m_NewConfig.usertime1); - SetupStore("usertime2", m_NewConfig.usertime2); - SetupStore("usertime3", m_NewConfig.usertime3); - SetupStore("thenshownextday", m_NewConfig.thenshownextday); - SetupStore("showsearchinitiator", m_NewConfig.showsearchinitiator); - - tvonscreenCfg = m_NewConfig; -} diff --git a/config.cpp b/config.cpp new file mode 100644 index 0000000..3bb3ead --- /dev/null +++ b/config.cpp @@ -0,0 +1,184 @@ +/* + * config.c + * + * See the README file for copyright information and how to reach the author. + * + * $Id: config.c,v 1.11 2005/01/02 12:19:32 schmitzj Exp $ + * + */ + +#include "config.h" +#include "magazine.h" + +#include +#include +#include + +tvonscreenConfig tvonscreenCfg; + +#if VDRVERSNUM < 10307 +class cMenuEditTimeItem : public cMenuEditItem { +protected: + int *value; + int hh, mm; + int pos; + virtual void Set(void); +public: + cMenuEditTimeItem(const char *Name, int *Value); + virtual eOSState ProcessKey(eKeys Key); + }; +#endif + +tvonscreenConfig::tvonscreenConfig(void) +{ + showLogos=false; + XLfonts=true; + noInfoLine=false; + showChannels=true; +#if VDRVERSNUM >= 10307 + bwlogos=false; +#else + bwlogos=true; +#endif + colorworkaround=true; + + usertime1=1200; + usertime2=1800; + usertime3=2015; + thenshownextday=true; + showsearchinitiator=true; + + logos=NULL; + vdradminfile=NULL; +} +tvonscreenConfig::~tvonscreenConfig() +{ + if (logos) + free(logos); + if (vdradminfile) + free(vdradminfile); +} + +bool tvonscreenConfig::SetupParse(const char *Name, const char *Value) +{ + if (strcmp(Name,"showLogos")==0) showLogos = atoi(Value); + else if (strcmp(Name,"XLfonts")==0) XLfonts = atoi(Value); + else if (strcmp(Name,"noInfoLine")==0) noInfoLine = atoi(Value); + else if (strcmp(Name,"showChannels")==0) showChannels = atoi(Value); + else if (strcmp(Name,"bwlogos")==0) bwlogos = atoi(Value); + else if (strcmp(Name,"colorworkaround")==0) colorworkaround = atoi(Value); + else if (strcmp(Name,"usertime1")==0) usertime1 = atoi(Value); + else if (strcmp(Name,"usertime2")==0) usertime2 = atoi(Value); + else if (strcmp(Name,"usertime3")==0) usertime3 = atoi(Value); + else if (strcmp(Name,"thenshownextday")==0) thenshownextday = atoi(Value); + else if (strcmp(Name,"showsearchinitiator")==0) showsearchinitiator = atoi(Value); + else + return false; + +#if VDRVERSNUM < 10307 + bwlogos=true; +#endif + return true; +} +const char *tvonscreenConfig::CommandLineHelp(void) +{ + // Return a string that describes all known command line options. + return " -l PathToLogos\n --logos=PathToLogos\n -v vdradmind.at\n --vdradminfile=vdradmind.at\n"; +} + +bool tvonscreenConfig::ProcessArgs(int argc, char *argv[]) +{ + static struct option long_options[] = { + { "logos", required_argument, NULL, 'l' }, + { "vdradminfile",required_argument, NULL, 'v' }, + { NULL } + }; + + bool retval=true; + int c; + while ((c = getopt_long(argc, argv, "l:v:", long_options, NULL)) != -1) + { + switch (c) + { + case 'l': + if (logos) + { + free(logos); + logos=NULL; + } + logos = strdup(optarg); + retval=true; + break; + case 'v': + if (vdradminfile) + { + free(vdradminfile); + vdradminfile=NULL; + } + vdradminfile = strdup(optarg); + retval=true; + break; + default: + break; + } + } + return retval; +} + +// ---------------------------------------------------------------------- + +tvonscreenConfigPage::tvonscreenConfigPage(void) : cMenuSetupPage() +{ + m_NewConfig = tvonscreenCfg; + +#if TL_YSTART == 48 + Add(new cMenuEditBoolItem(tr("show channel logos"), + &m_NewConfig.showLogos)); + Add(new cMenuEditBoolItem(tr("show channel names"), + &m_NewConfig.showChannels)); + Add(new cMenuEditBoolItem(tr("show logos in black&white"), + &m_NewConfig.bwlogos)); + Add(new cMenuEditBoolItem(tr("enable color problem work around"), + &m_NewConfig.colorworkaround)); +#endif + Add(new cMenuEditBoolItem(tr("use XL fonts"), + &m_NewConfig.XLfonts)); + Add(new cMenuEditBoolItem(tr("hide info line"), + &m_NewConfig.noInfoLine)); + + Add(new cMenuEditTimeItem(tr("user point in time 1 (Key 4)"), + &m_NewConfig.usertime1)); + Add(new cMenuEditTimeItem(tr("user point in time 2 (Key 5)"), + &m_NewConfig.usertime2)); + Add(new cMenuEditTimeItem(tr("user point in time 3 (Key 6)"), + &m_NewConfig.usertime3)); + + Add(new cMenuEditBoolItem(tr("jump to next day point if ago"), + &m_NewConfig.thenshownextday)); + + Add(new cMenuEditBoolItem(tr("Show search item itself"), + &m_NewConfig.showsearchinitiator)); + + +} + +tvonscreenConfigPage::~tvonscreenConfigPage() +{ +} + +void tvonscreenConfigPage::Store(void) +{ + SetupStore("showLogos", m_NewConfig.showLogos); + SetupStore("XLfonts", m_NewConfig.XLfonts); + SetupStore("noInfoLine", m_NewConfig.noInfoLine); + SetupStore("showChannels", m_NewConfig.showChannels); + SetupStore("bwlogos", m_NewConfig.bwlogos); + SetupStore("colorworkaround", m_NewConfig.colorworkaround); + SetupStore("usertime1", m_NewConfig.usertime1); + SetupStore("usertime2", m_NewConfig.usertime2); + SetupStore("usertime3", m_NewConfig.usertime3); + SetupStore("thenshownextday", m_NewConfig.thenshownextday); + SetupStore("showsearchinitiator", m_NewConfig.showsearchinitiator); + + tvonscreenCfg = m_NewConfig; +} diff --git a/gfxtools.c b/gfxtools.c deleted file mode 100644 index a7f4dca..0000000 --- a/gfxtools.c +++ /dev/null @@ -1,174 +0,0 @@ -/* - * gfxtools.c - * - * See the README file for copyright information and how to reach the author. - * - * $Id: gfxtools.c,v 1.8 2006/06/18 13:59:36 schmitzj Exp $ - * - */ - -#include -#include "gfxtools.h" -#include - -bool DrawXpm(const char *FileName,areaT *drawable,int x,int y,winhandleT winhand,bool blackwhite) -{ // Bases on vdr cBitmap::LoadXpm but made more readable - // and added x/y support - bool Result = false; - cReadLine ReadLine; - FILE *f = fopen(FileName, "r"); - if (f) - { - char **Xpm = NULL; - bool isXpm = false; - int lines = 0; - int index = 0; - char *s; - - while ((s = ReadLine.Read(f)) != NULL) - { - s = skipspace(s); - if (!isXpm) - { - if (strcmp(s, "/* XPM */") != 0) - { - esyslog("ERROR: invalid header in XPM file '%s'", FileName); - break; - } - isXpm = true; - } - else if (*s++ == '"') - { - if (!lines) - { - int w, h, n, c; - if (4 != sscanf(s, "%d %d %d %d", &w, &h, &n, &c)) - { - esyslog("ERROR: faulty 'values' line in XPM file '%s'", FileName); - break; - } - lines = h + n + 1; - Xpm = MALLOC(char *, lines); - } - char *q = strchr(s, '"'); - if (!q) - { - esyslog("ERROR: missing quotes in XPM file '%s'", FileName); - break; - } - *q = 0; - if (index < lines) - Xpm[index++] = strdup(s); - else - { - esyslog("ERROR: too many lines in XPM file '%s'", FileName); - break; - } - } - } - if (index == lines) - Result = DrawXpm(Xpm,drawable,x,y,winhand,blackwhite); - else - esyslog("ERROR: too few lines in XPM file '%s'", FileName); - for (int i = 0; i < index; i++) - free(Xpm[i]); - free(Xpm); - fclose(f); - } - else - esyslog("ERROR: can't open XPM file '%s'", FileName); - return Result; -} - -bool DrawXpm(char *Xpm[], areaT *drawable,int x0,int y0,winhandleT winhand,bool blackwhite) -{ // Bases on vdr cBitmap::LoadXpm but made more readable - // and added x/y support and "none" is now no longer drawn - char **p = Xpm; - int w, h, n, c; - if (4 != sscanf(*p, "%d %d %d %d", &w, &h, &n, &c)) - { - esyslog("ERROR: faulty 'values' line in XPM: '%s'", *p); - return false; - } - if (n > MAXNUMCOLORS) - { - esyslog("ERROR: too many colors in XPM: %d", n); - return false; - } - - int NoneColorIndex = MAXNUMCOLORS; -#if VDRVERSNUM >= 10307 - tColor cols[n]; -#else - eDvbColor cols[n]; -#endif - for (int i = 0; i < n; i++) - { - const char *s = *++p; - if (int(strlen(s)) < c) - { - esyslog("ERROR: faulty 'colors' line in XPM: '%s'", s); - return false; - } - s = skipspace(s + c); - if (*s != 'c') - { - esyslog("ERROR: unknown color key in XPM: '%c'", *s); - return false; - } - s = skipspace(s + 1); - if (strcasecmp(s, "none") == 0) - { - s = "#00000000"; - NoneColorIndex = i; - } - if (*s != '#') - { - esyslog("ERROR: unknown color code in XPM: '%c'", *s); - return false; - } - unsigned int col=strtoul(++s, NULL, 16); - if (blackwhite) - { - int bwcol=(int)(0.299*(double)((col & 0xff0000) >> 16) + 0.587*(double)((col & 0xff00) >> 8) + 0.114*(double)(col & 0xff)); - if (bwcol>0xff) bwcol=0xff; - bwcol&=(0xff-31); - col=(bwcol<<16) | (bwcol<<8)| (bwcol); - } -#if VDRVERSNUM >= 10307 - cols[i] = col | 0xFF000000; -#else - cols[i] = (eDvbColor)(((col & 0xff) << 16) | (col & 0xff00) | ((col & 0xff0000) >> 16) | 0xFF000000); -#endif - } - for (int y = 0; y < h; y++) - { - const char *s = *++p; - if (int(strlen(s)) != w * c) - { - esyslog("ERROR: faulty pixel line in XPM: %d '%s'", y, s); - return false; - } - for (int x = 0; x < w; x++) - { - for (int i = 0; i < n; i++) - { - if (strncmp(Xpm[i + 1], s, c) == 0) - { - if (i != NoneColorIndex) - { -#if VDRVERSNUM >= 10307 - drawable->DrawPixel(x0+x,y0+y, cols[i]); -#else -// drawable->AddColor(cols[i],winhand); - drawable->Fill(x0+x,y0+y,x0+x,y0+y,cols[i],winhand); -#endif - } - break; - } - } - s += c; - } - } - return true; -} diff --git a/gfxtools.cpp b/gfxtools.cpp new file mode 100644 index 0000000..a7f4dca --- /dev/null +++ b/gfxtools.cpp @@ -0,0 +1,174 @@ +/* + * gfxtools.c + * + * See the README file for copyright information and how to reach the author. + * + * $Id: gfxtools.c,v 1.8 2006/06/18 13:59:36 schmitzj Exp $ + * + */ + +#include +#include "gfxtools.h" +#include + +bool DrawXpm(const char *FileName,areaT *drawable,int x,int y,winhandleT winhand,bool blackwhite) +{ // Bases on vdr cBitmap::LoadXpm but made more readable + // and added x/y support + bool Result = false; + cReadLine ReadLine; + FILE *f = fopen(FileName, "r"); + if (f) + { + char **Xpm = NULL; + bool isXpm = false; + int lines = 0; + int index = 0; + char *s; + + while ((s = ReadLine.Read(f)) != NULL) + { + s = skipspace(s); + if (!isXpm) + { + if (strcmp(s, "/* XPM */") != 0) + { + esyslog("ERROR: invalid header in XPM file '%s'", FileName); + break; + } + isXpm = true; + } + else if (*s++ == '"') + { + if (!lines) + { + int w, h, n, c; + if (4 != sscanf(s, "%d %d %d %d", &w, &h, &n, &c)) + { + esyslog("ERROR: faulty 'values' line in XPM file '%s'", FileName); + break; + } + lines = h + n + 1; + Xpm = MALLOC(char *, lines); + } + char *q = strchr(s, '"'); + if (!q) + { + esyslog("ERROR: missing quotes in XPM file '%s'", FileName); + break; + } + *q = 0; + if (index < lines) + Xpm[index++] = strdup(s); + else + { + esyslog("ERROR: too many lines in XPM file '%s'", FileName); + break; + } + } + } + if (index == lines) + Result = DrawXpm(Xpm,drawable,x,y,winhand,blackwhite); + else + esyslog("ERROR: too few lines in XPM file '%s'", FileName); + for (int i = 0; i < index; i++) + free(Xpm[i]); + free(Xpm); + fclose(f); + } + else + esyslog("ERROR: can't open XPM file '%s'", FileName); + return Result; +} + +bool DrawXpm(char *Xpm[], areaT *drawable,int x0,int y0,winhandleT winhand,bool blackwhite) +{ // Bases on vdr cBitmap::LoadXpm but made more readable + // and added x/y support and "none" is now no longer drawn + char **p = Xpm; + int w, h, n, c; + if (4 != sscanf(*p, "%d %d %d %d", &w, &h, &n, &c)) + { + esyslog("ERROR: faulty 'values' line in XPM: '%s'", *p); + return false; + } + if (n > MAXNUMCOLORS) + { + esyslog("ERROR: too many colors in XPM: %d", n); + return false; + } + + int NoneColorIndex = MAXNUMCOLORS; +#if VDRVERSNUM >= 10307 + tColor cols[n]; +#else + eDvbColor cols[n]; +#endif + for (int i = 0; i < n; i++) + { + const char *s = *++p; + if (int(strlen(s)) < c) + { + esyslog("ERROR: faulty 'colors' line in XPM: '%s'", s); + return false; + } + s = skipspace(s + c); + if (*s != 'c') + { + esyslog("ERROR: unknown color key in XPM: '%c'", *s); + return false; + } + s = skipspace(s + 1); + if (strcasecmp(s, "none") == 0) + { + s = "#00000000"; + NoneColorIndex = i; + } + if (*s != '#') + { + esyslog("ERROR: unknown color code in XPM: '%c'", *s); + return false; + } + unsigned int col=strtoul(++s, NULL, 16); + if (blackwhite) + { + int bwcol=(int)(0.299*(double)((col & 0xff0000) >> 16) + 0.587*(double)((col & 0xff00) >> 8) + 0.114*(double)(col & 0xff)); + if (bwcol>0xff) bwcol=0xff; + bwcol&=(0xff-31); + col=(bwcol<<16) | (bwcol<<8)| (bwcol); + } +#if VDRVERSNUM >= 10307 + cols[i] = col | 0xFF000000; +#else + cols[i] = (eDvbColor)(((col & 0xff) << 16) | (col & 0xff00) | ((col & 0xff0000) >> 16) | 0xFF000000); +#endif + } + for (int y = 0; y < h; y++) + { + const char *s = *++p; + if (int(strlen(s)) != w * c) + { + esyslog("ERROR: faulty pixel line in XPM: %d '%s'", y, s); + return false; + } + for (int x = 0; x < w; x++) + { + for (int i = 0; i < n; i++) + { + if (strncmp(Xpm[i + 1], s, c) == 0) + { + if (i != NoneColorIndex) + { +#if VDRVERSNUM >= 10307 + drawable->DrawPixel(x0+x,y0+y, cols[i]); +#else +// drawable->AddColor(cols[i],winhand); + drawable->Fill(x0+x,y0+y,x0+x,y0+y,cols[i],winhand); +#endif + } + break; + } + } + s += c; + } + } + return true; +} diff --git a/i18n.c b/i18n.c deleted file mode 100644 index a1bd421..0000000 --- a/i18n.c +++ /dev/null @@ -1,1271 +0,0 @@ -/* - * i18n.c: Internationalization - * - * See the README file for copyright information and how to reach the author. - * - * $Id: i18n.c,v 1.15 2004/11/30 20:08:24 schmitzj Exp $ - * - */ - -#include "i18n.h" - -const tI18nPhrase tvoPhrases[] = { - { "TV-OnScreen", // English - "TV-OnScreen", // Deutsch - "", // Slovenski - "", // Italiano - "", // Nederlands - "", // Português - "", // Français - "", // Norsk - "TV-ohjelmat", // suomi - "", // Polski - "", // Español - "", // ÅëëçíéêÜ - "", // Svenska - "", // Romaneste - "", // Magyar - "", // Català -#if VDRVERSNUM >= 10302 - "" // ÀãááÚØÙ (Russian) -#if VDRVERSNUM >= 10307 - "", // Hrvatski (Croatian) -#if VDRVERSNUM >= 10313 - "", // Eesti -#if VDRVERSNUM >= 10316 - "", // Dansk -#endif -#endif -#endif -#endif - }, - { "Shows the EPG info in form of a typical TV magazine", // English - "", // Deutsch - "", // Slovenski - "", // Italiano - "", // Nederlands - "", // Português - "", // Français - "", // Norsk - "TV-ohjelmatiedot (OSD)", // suomi - "", // Polski - "", // Español - "", // ÅëëçíéêÜ - "", // Svenska - "", // Romaneste - "", // Magyar - "", // Català -#if VDRVERSNUM >= 10302 - "" // ÀãááÚØÙ (Russian) -#if VDRVERSNUM >= 10307 - "", // Hrvatski (Croatian) -#if VDRVERSNUM >= 10313 - "", // Eesti -#if VDRVERSNUM >= 10316 - "", // Dansk -#endif -#endif -#endif -#endif - }, - { "o'clock", // English - "Uhr", // Deutsch - "", // Slovenski - "", // Italiano - "", // Nederlands - "", // Português - "", // Français - "", // Norsk - " ", // suomi (empty space) - "", // Polski - "", // Español - "", // ÅëëçíéêÜ - "", // Svenska - "", // Romaneste - "", // Magyar - "", // Català -#if VDRVERSNUM >= 10302 - "" // ÀãááÚØÙ (Russian) -#if VDRVERSNUM >= 10307 - "", // Hrvatski (Croatian) -#if VDRVERSNUM >= 10313 - "", // Eesti -#if VDRVERSNUM >= 10316 - "", // Dansk -#endif -#endif -#endif -#endif - }, - { "%d-%m", // English - "%d.%m.", // Deutsch - "", // Slovenski - "", // Italiano - "", // Nederlands - "", // Português - "", // Français - "", // Norsk - "%d.%m.", // suomi - "", // Polski - "", // Español - "", // ÅëëçíéêÜ - "", // Svenska - "", // Romaneste - "", // Magyar - "", // Català -#if VDRVERSNUM >= 10302 - "" // ÀãááÚØÙ (Russian) -#if VDRVERSNUM >= 10307 - "", // Hrvatski (Croatian) -#if VDRVERSNUM >= 10313 - "", // Eesti -#if VDRVERSNUM >= 10316 - "", // Dansk -#endif -#endif -#endif -#endif - }, - { "Press 1 for help", // English - "Für Hilfe die 1 drücken", // Deutsch - "", // Slovenski - "", // Italiano - "", // Nederlands - "", // Português - "", // Français - "", // Norsk - "Paina '1' nähdäksesi opasteen", // suomi - "", // Polski - "", // Español - "", // ÅëëçíéêÜ - "", // Svenska - "", // Romaneste - "", // Magyar - "", // Català -#if VDRVERSNUM >= 10302 - "" // ÀãááÚØÙ (Russian) -#if VDRVERSNUM >= 10307 - "", // Hrvatski (Croatian) -#if VDRVERSNUM >= 10313 - "", // Eesti -#if VDRVERSNUM >= 10316 - "", // Dansk -#endif -#endif -#endif -#endif - }, - { "Timer conflict!", // English - "Timer Konflikt!", // Deutsch - "", // Slovenski - "", // Italiano - "", // Nederlands - "", // Português - "", // Français - "", // Norsk - " ", // suomi (empty space) - "", // Polski - "", // Español - "", // ÅëëçíéêÜ - "", // Svenska - "", // Romaneste - "", // Magyar - "", // Català -#if VDRVERSNUM >= 10302 - "" // ÀãááÚØÙ (Russian) -#if VDRVERSNUM >= 10307 - "", // Hrvatski (Croatian) -#if VDRVERSNUM >= 10313 - "", // Eesti -#if VDRVERSNUM >= 10316 - "", // Dansk -#endif -#endif -#endif -#endif - }, - -// Prefs - { "show channel logos", // English - "zeige Kanal-Logos", // Deutsch - "", // Slovenski - "", // Italiano - "", // Nederlands - "", // Português - "", // Français - "", // Norsk - "Näytä kanavien logot", // suomi - "", // Polski - "", // Español - "", // ÅëëçíéêÜ - "", // Svenska - "", // Romaneste - "", // Magyar - "", // Català -#if VDRVERSNUM >= 10302 - "" // ÀãááÚØÙ (Russian) -#if VDRVERSNUM >= 10307 - "", // Hrvatski (Croatian) -#if VDRVERSNUM >= 10313 - "", // Eesti -#if VDRVERSNUM >= 10316 - "", // Dansk -#endif -#endif -#endif -#endif - }, - { "use XL fonts", // English - "benutze XL Schrift", // Deutsch - "", // Slovenski - "", // Italiano - "", // Nederlands - "", // Português - "", // Français - "", // Norsk - "Käytä XL-kirjasinta", // suomi - "", // Polski - "", // Español - "", // ÅëëçíéêÜ - "", // Svenska - "", // Romaneste - "", // Magyar - "", // Català -#if VDRVERSNUM >= 10302 - "" // ÀãááÚØÙ (Russian) -#if VDRVERSNUM >= 10307 - "", // Hrvatski (Croatian) -#if VDRVERSNUM >= 10313 - "", // Eesti -#if VDRVERSNUM >= 10316 - "", // Dansk -#endif -#endif -#endif -#endif - }, - { "hide info line", // English - "verstecke Info Zeile", // Deutsch - "", // Slovenski - "", // Italiano - "", // Nederlands - "", // Português - "", // Français - "", // Norsk - "Piilota inforivi", // suomi - "", // Polski - "", // Español - "", // ÅëëçíéêÜ - "", // Svenska - "", // Romaneste - "", // Magyar - "", // Català -#if VDRVERSNUM >= 10302 - "" // ÀãááÚØÙ (Russian) -#if VDRVERSNUM >= 10307 - "", // Hrvatski (Croatian) -#if VDRVERSNUM >= 10313 - "", // Eesti -#if VDRVERSNUM >= 10316 - "", // Dansk -#endif -#endif -#endif -#endif - }, - { "show channel names", // English - "zeige Kanal-Namen", // Deutsch - "", // Slovenski - "", // Italiano - "", // Nederlands - "", // Português - "", // Français - "", // Norsk - "Näytä kanavien nimet", // suomi - "", // Polski - "", // Español - "", // ÅëëçíéêÜ - "", // Svenska - "", // Romaneste - "", // Magyar - "", // Català -#if VDRVERSNUM >= 10302 - "" // ÀãááÚØÙ (Russian) -#if VDRVERSNUM >= 10307 - "", // Hrvatski (Croatian) -#if VDRVERSNUM >= 10313 - "", // Eesti -#if VDRVERSNUM >= 10316 - "", // Dansk -#endif -#endif -#endif -#endif - }, - { "show logos in black&white", // English - "zeige Kanal-Logos in Schwarz/Weiß", // Deutsch - "", // Slovenski - "", // Italiano - "", // Nederlands - "", // Português - "", // Français - "", // Norsk - "Näytä logot mustavalkoisina", // suomi - "", // Polski - "", // Español - "", // ÅëëçíéêÜ - "", // Svenska - "", // Romaneste - "", // Magyar - "", // Català -#if VDRVERSNUM >= 10302 - "" // ÀãááÚØÙ (Russian) -#if VDRVERSNUM >= 10307 - "", // Hrvatski (Croatian) -#if VDRVERSNUM >= 10313 - "", // Eesti -#if VDRVERSNUM >= 10316 - "", // Dansk -#endif -#endif -#endif -#endif - }, - { "enable color problem work around", // English - "Farbproblem Umgehung aktivieren", // Deutsch - "", // Slovenski - "", // Italiano - "", // Nederlands - "", // Português - "", // Français - "", // Norsk - "Saksalainen värikorjaus", // suomi - "", // Polski - "", // Español - "", // ÅëëçíéêÜ - "", // Svenska - "", // Romaneste - "", // Magyar - "", // Català -#if VDRVERSNUM >= 10302 - "" // ÀãááÚØÙ (Russian) -#if VDRVERSNUM >= 10307 - "", // Hrvatski (Croatian) -#if VDRVERSNUM >= 10313 - "", // Eesti -#if VDRVERSNUM >= 10316 - "", // Dansk -#endif -#endif -#endif -#endif - }, - { "user point in time 1 (Key 4)", // English - "Anwenderzeitpunkt 1 (Taste 4)", // Deutsch - "", // Slovenski - "", // Italiano - "", // Nederlands - "", // Português - "", // Français - "", // Norsk - "Ajankohta #1 (näppäin '4')", // suomi - "", // Polski - "", // Español - "", // ÅëëçíéêÜ - "", // Svenska - "", // Romaneste - "", // Magyar - "", // Català -#if VDRVERSNUM >= 10302 - "" // ÀãááÚØÙ (Russian) -#if VDRVERSNUM >= 10307 - "", // Hrvatski (Croatian) -#if VDRVERSNUM >= 10313 - "", // Eesti -#if VDRVERSNUM >= 10316 - "", // Dansk -#endif -#endif -#endif -#endif - }, - { "user point in time 2 (Key 5)", // English - "Anwenderzeitpunkt 2 (Taste 5)", // Deutsch - "", // Slovenski - "", // Italiano - "", // Nederlands - "", // Português - "", // Français - "", // Norsk - "Ajankohta #2 (näppäin '5')", // suomi - "", // Polski - "", // Español - "", // ÅëëçíéêÜ - "", // Svenska - "", // Romaneste - "", // Magyar - "", // Català -#if VDRVERSNUM >= 10302 - "" // ÀãááÚØÙ (Russian) -#if VDRVERSNUM >= 10307 - "", // Hrvatski (Croatian) -#if VDRVERSNUM >= 10313 - "", // Eesti -#if VDRVERSNUM >= 10316 - "", // Dansk -#endif -#endif -#endif -#endif - }, - { "user point in time 3 (Key 6)", // English - "Anwenderzeitpunkt 3 (Taste 6)", // Deutsch - "", // Slovenski - "", // Italiano - "", // Nederlands - "", // Português - "", // Français - "", // Norsk - "Ajankohta #3 (näppäin '6')", // suomi - "", // Polski - "", // Español - "", // ÅëëçíéêÜ - "", // Svenska - "", // Romaneste - "", // Magyar - "", // Català -#if VDRVERSNUM >= 10302 - "" // ÀãááÚØÙ (Russian) -#if VDRVERSNUM >= 10307 - "", // Hrvatski (Croatian) -#if VDRVERSNUM >= 10313 - "", // Eesti -#if VDRVERSNUM >= 10316 - "", // Dansk -#endif -#endif -#endif -#endif - }, - { "jump to next day point if ago", // English - "Gehe zum nächsten Tag wenn vorbei", // Deutsch - "", // Slovenski - "", // Italiano - "", // Nederlands - "", // Português - "", // Français - "", // Norsk - "Siirry tarvittaessa seur. päivään", // suomi - "", // Polski - "", // Español - "", // ÅëëçíéêÜ - "", // Svenska - "", // Romaneste - "", // Magyar - "", // Català -#if VDRVERSNUM >= 10302 - "" // ÀãááÚØÙ (Russian) -#if VDRVERSNUM >= 10307 - "", // Hrvatski (Croatian) -#if VDRVERSNUM >= 10313 - "", // Eesti -#if VDRVERSNUM >= 10316 - "", // Dansk -#endif -#endif -#endif -#endif - }, - { "Show search item itself", // English - "Zeige auch Suchbegriff", // Deutsch - "", // Slovenski - "", // Italiano - "", // Nederlands - "", // Português - "", // Français - "", // Norsk - "Näytä hakuehto", // suomi - "", // Polski - "", // Español - "", // ÅëëçíéêÜ - "", // Svenska - "", // Romaneste - "", // Magyar - "", // Català -#if VDRVERSNUM >= 10302 - "" // ÀãááÚØÙ (Russian) -#if VDRVERSNUM >= 10307 - "", // Hrvatski (Croatian) -#if VDRVERSNUM >= 10313 - "", // Eesti -#if VDRVERSNUM >= 10316 - "", // Dansk -#endif -#endif -#endif -#endif - }, - -// Help - { "NORMAL MODE:", // English - "NORMALER MODUS:", // Deutsch - "", // Slovenski - "", // Italiano - "", // Nederlands - "", // Português - "", // Français - "", // Norsk - "NORMAALITILA:\n", // suomi - "", // Polski - "", // Español - "", // ÅëëçíéêÜ - "", // Svenska - "", // Romaneste - "", // Magyar - "", // Català -#if VDRVERSNUM >= 10302 - "" // ÀãááÚØÙ (Russian) -#if VDRVERSNUM >= 10307 - "", // Hrvatski (Croatian) -#if VDRVERSNUM >= 10313 - "", // Eesti -#if VDRVERSNUM >= 10316 - "", // Dansk -#endif -#endif -#endif -#endif - }, - { "arrows\n\tmove view", // English - "Pfeile\n\tAnsicht bewegen", // Deutsch - "", // Slovenski - "", // Italiano - "", // Nederlands - "", // Português - "", // Français - "", // Norsk - "'Nuolinäppäimet'\n\tohjaa näkymää", // suomi - "", // Polski - "", // Español - "", // ÅëëçíéêÜ - "", // Svenska - "", // Romaneste - "", // Magyar - "", // Català -#if VDRVERSNUM >= 10302 - "" // ÀãááÚØÙ (Russian) -#if VDRVERSNUM >= 10307 - "", // Hrvatski (Croatian) -#if VDRVERSNUM >= 10313 - "", // Eesti -#if VDRVERSNUM >= 10316 - "", // Dansk -#endif -#endif -#endif -#endif - }, - { "back\n\tclose TV OnScreen", // English - "back\n\tschließe TV OnScreen", // Deutsch - "", // Slovenski - "", // Italiano - "", // Nederlands - "", // Português - "", // Français - "", // Norsk - "'Takaisin'\n\tsulje laajennos", // suomi - "", // Polski - "", // Español - "", // ÅëëçíéêÜ - "", // Svenska - "", // Romaneste - "", // Magyar - "", // Català -#if VDRVERSNUM >= 10302 - "" // ÀãááÚØÙ (Russian) -#if VDRVERSNUM >= 10307 - "", // Hrvatski (Croatian) -#if VDRVERSNUM >= 10313 - "", // Eesti -#if VDRVERSNUM >= 10316 - "", // Dansk -#endif -#endif -#endif -#endif - }, - { "red/blue\n\t-/+ one day", // English - "rot/blau\n\t-/+ ein Tag", // Deutsch - "", // Slovenski - "", // Italiano - "", // Nederlands - "", // Português - "", // Français - "", // Norsk - "'Punainen'/'Sininen'\n\tyksi päivä eteen/taaksepäin", // suomi - "", // Polski - "", // Español - "", // ÅëëçíéêÜ - "", // Svenska - "", // Romaneste - "", // Magyar - "", // Català -#if VDRVERSNUM >= 10302 - "" // ÀãááÚØÙ (Russian) -#if VDRVERSNUM >= 10307 - "", // Hrvatski (Croatian) -#if VDRVERSNUM >= 10313 - "", // Eesti -#if VDRVERSNUM >= 10316 - "", // Dansk -#endif -#endif -#endif -#endif - }, - { "green/yellow\n\tone page left/right", // English - "grün/gelb\n\teine Seite links/rechts", // Deutsch - "", // Slovenski - "", // Italiano - "", // Nederlands - "", // Português - "", // Français - "", // Norsk - "'Vihreä'/'Keltainen'\n\tseuraava/edellinen sivu", // suomi - "", // Polski - "", // Español - "", // ÅëëçíéêÜ - "", // Svenska - "", // Romaneste - "", // Magyar - "", // Català -#if VDRVERSNUM >= 10302 - "" // ÀãááÚØÙ (Russian) -#if VDRVERSNUM >= 10307 - "", // Hrvatski (Croatian) -#if VDRVERSNUM >= 10313 - "", // Eesti -#if VDRVERSNUM >= 10316 - "", // Dansk -#endif -#endif -#endif -#endif - }, - { "7/9\n\tone page left/right", // English - "7/9\n\teine Seite links/rechts", // Deutsch - "", // Slovenski - "", // Italiano - "", // Nederlands - "", // Português - "", // Français - "", // Norsk - "'7'/'9'\n\tseuraava/edellinen sivu", // suomi - "", // Polski - "", // Español - "", // ÅëëçíéêÜ - "", // Svenska - "", // Romaneste - "", // Magyar - "", // Català -#if VDRVERSNUM >= 10302 - "" // ÀãááÚØÙ (Russian) -#if VDRVERSNUM >= 10307 - "", // Hrvatski (Croatian) -#if VDRVERSNUM >= 10313 - "", // Eesti -#if VDRVERSNUM >= 10316 - "", // Dansk -#endif -#endif -#endif -#endif - }, - { "8\n\tgoto current channel", // English - "8\n\tgehe zum aktuellen Kanal", // Deutsch - "", // Slovenski - "", // Italiano - "", // Nederlands - "", // Português - "", // Français - "", // Norsk - "'8'\n\tsiirry nykyiselle kanavalle", // suomi - "", // Polski - "", // Español - "", // ÅëëçíéêÜ - "", // Svenska - "", // Romaneste - "", // Magyar - "", // Català -#if VDRVERSNUM >= 10302 - "" // ÀãááÚØÙ (Russian) -#if VDRVERSNUM >= 10307 - "", // Hrvatski (Croatian) -#if VDRVERSNUM >= 10313 - "", // Eesti -#if VDRVERSNUM >= 10316 - "", // Dansk -#endif -#endif -#endif -#endif - }, - { "0\n\tgoto now", // English - "0\n\tgehe zur aktuellen Zeit", // Deutsch - "", // Slovenski - "", // Italiano - "", // Nederlands - "", // Português - "", // Français - "", // Norsk - "'0'\n\tsiirry nykyhetkeen", // suomi - "", // Polski - "", // Español - "", // ÅëëçíéêÜ - "", // Svenska - "", // Romaneste - "", // Magyar - "", // Català -#if VDRVERSNUM >= 10302 - "" // ÀãááÚØÙ (Russian) -#if VDRVERSNUM >= 10307 - "", // Hrvatski (Croatian) -#if VDRVERSNUM >= 10313 - "", // Eesti -#if VDRVERSNUM >= 10316 - "", // Dansk -#endif -#endif -#endif -#endif - }, - { "4/5/6\n\tgoto configured time", // English - "4/5/6\n\tgehe zu eingestellten Zeitpunkten", // Deutsch - "", // Slovenski - "", // Italiano - "", // Nederlands - "", // Português - "", // Français - "", // Norsk - "'4'/'5'/'6'\n\tsiirry määriteltyyn ajankohtaan", // suomi - "", // Polski - "", // Español - "", // ÅëëçíéêÜ - "", // Svenska - "", // Romaneste - "", // Magyar - "", // Català -#if VDRVERSNUM >= 10302 - "" // ÀãááÚØÙ (Russian) -#if VDRVERSNUM >= 10307 - "", // Hrvatski (Croatian) -#if VDRVERSNUM >= 10313 - "", // Eesti -#if VDRVERSNUM >= 10316 - "", // Dansk -#endif -#endif -#endif -#endif - }, - { "ok\n\tswitch to edit mode\n", // English - "ok\n\taktiviere Editier-Modus\n", // Deutsch - "", // Slovenski - "", // Italiano - "", // Nederlands - "", // Português - "", // Français - "", // Norsk - "'OK'\n\tvaihda muokkaustilaan\n", // suomi - "", // Polski - "", // Español - "", // ÅëëçíéêÜ - "", // Svenska - "", // Romaneste - "", // Magyar - "", // Català -#if VDRVERSNUM >= 10302 - "" // ÀãááÚØÙ (Russian) -#if VDRVERSNUM >= 10307 - "", // Hrvatski (Croatian) -#if VDRVERSNUM >= 10313 - "", // Eesti -#if VDRVERSNUM >= 10316 - "", // Dansk -#endif -#endif -#endif -#endif - }, - { "EDIT MODE:", // English - "EDITIER MODUS:", // Deutsch - "", // Slovenski - "", // Italiano - "", // Nederlands - "", // Português - "", // Français - "", // Norsk - "MUOKKAUSTILA:\n", // suomi - "", // Polski - "", // Español - "", // ÅëëçíéêÜ - "", // Svenska - "", // Romaneste - "", // Magyar - "", // Català -#if VDRVERSNUM >= 10302 - "" // ÀãááÚØÙ (Russian) -#if VDRVERSNUM >= 10307 - "", // Hrvatski (Croatian) -#if VDRVERSNUM >= 10313 - "", // Eesti -#if VDRVERSNUM >= 10316 - "", // Dansk -#endif -#endif -#endif -#endif - }, - { "back\n\tback to normal mode", // English - "back\n\tzurück zum normalen Modus", // Deutsch - "", // Slovenski - "", // Italiano - "", // Nederlands - "", // Português - "", // Français - "", // Norsk - "'Takaisin'\n\tvaihda normaalitilaan", // suomi - "", // Polski - "", // Español - "", // ÅëëçíéêÜ - "", // Svenska - "", // Romaneste - "", // Magyar - "", // Català -#if VDRVERSNUM >= 10302 - "" // ÀãááÚØÙ (Russian) -#if VDRVERSNUM >= 10307 - "", // Hrvatski (Croatian) -#if VDRVERSNUM >= 10313 - "", // Eesti -#if VDRVERSNUM >= 10316 - "", // Dansk -#endif -#endif -#endif -#endif - }, - { "arrows\n\tmove selected schedule", // English - "Pfeile\n\tSendung auswählen", // Deutsch - "", // Slovenski - "", // Italiano - "", // Nederlands - "", // Português - "", // Français - "", // Norsk - "'Nuolinäppäimet'\n\tvalitse ohjelma", // suomi - "", // Polski - "", // Español - "", // ÅëëçíéêÜ - "", // Svenska - "", // Romaneste - "", // Magyar - "", // Català -#if VDRVERSNUM >= 10302 - "" // ÀãááÚØÙ (Russian) -#if VDRVERSNUM >= 10307 - "", // Hrvatski (Croatian) -#if VDRVERSNUM >= 10313 - "", // Eesti -#if VDRVERSNUM >= 10316 - "", // Dansk -#endif -#endif -#endif -#endif - }, - { "record\n\tcreate timer", // English - "record\n\terzeuge Timer", // Deutsch - "", // Slovenski - "", // Italiano - "", // Nederlands - "", // Português - "", // Français - "", // Norsk - "'Tallenna'\n\tluo ajastin", // suomi - "", // Polski - "", // Español - "", // ÅëëçíéêÜ - "", // Svenska - "", // Romaneste - "", // Magyar - "", // Català -#if VDRVERSNUM >= 10302 - "" // ÀãááÚØÙ (Russian) -#if VDRVERSNUM >= 10307 - "", // Hrvatski (Croatian) -#if VDRVERSNUM >= 10313 - "", // Eesti -#if VDRVERSNUM >= 10316 - "", // Dansk -#endif -#endif -#endif -#endif - }, - { "ok\n\tshow details", // English - "ok\n\tzeige Sendungsdetails", // Deutsch - "", // Slovenski - "", // Italiano - "", // Nederlands - "", // Português - "", // Français - "", // Norsk - "'OK'\n\tnäytä lisätiedot", // suomi - "", // Polski - "", // Español - "", // ÅëëçíéêÜ - "", // Svenska - "", // Romaneste - "", // Magyar - "", // Català -#if VDRVERSNUM >= 10302 - "" // ÀãááÚØÙ (Russian) -#if VDRVERSNUM >= 10307 - "", // Hrvatski (Croatian) -#if VDRVERSNUM >= 10313 - "", // Eesti -#if VDRVERSNUM >= 10316 - "", // Dansk -#endif -#endif -#endif -#endif - }, -// End Help - -// Details - { "Record", // English - "Aufnehmen", // Deutsch - "", // Slovenski - "", // Italiano - "", // Nederlands - "", // Português - "", // Français - "", // Norsk - "Tallenna", // suomi - "", // Polski - "", // Español - "", // ÅëëçíéêÜ - "", // Svenska - "", // Romaneste - "", // Magyar - "", // Català -#if VDRVERSNUM >= 10302 - "" // ÀãááÚØÙ (Russian) -#if VDRVERSNUM >= 10307 - "", // Hrvatski (Croatian) -#if VDRVERSNUM >= 10313 - "", // Eesti -#if VDRVERSNUM >= 10316 - "", // Dansk -#endif -#endif -#endif -#endif - }, - { "Search", // English - "Suchen", // Deutsch - "", // Slovenski - "", // Italiano - "", // Nederlands - "", // Português - "", // Français - "", // Norsk - "Etsi", // suomi - "", // Polski - "", // Español - "", // ÅëëçíéêÜ - "", // Svenska - "", // Romaneste - "", // Magyar - "", // Català -#if VDRVERSNUM >= 10302 - "" // ÀãááÚØÙ (Russian) -#if VDRVERSNUM >= 10307 - "", // Hrvatski (Croatian) -#if VDRVERSNUM >= 10313 - "", // Eesti -#if VDRVERSNUM >= 10316 - "", // Dansk -#endif -#endif -#endif -#endif - }, - { "AutoTimer", // English - "AutoTimer", // Deutsch - "", // Slovenski - "", // Italiano - "", // Nederlands - "", // Português - "", // Français - "", // Norsk - "AutoTimer", // suomi - "", // Polski - "", // Español - "", // ÅëëçíéêÜ - "", // Svenska - "", // Romaneste - "", // Magyar - "", // Català -#if VDRVERSNUM >= 10302 - "" // ÀãááÚØÙ (Russian) -#if VDRVERSNUM >= 10307 - "", // Hrvatski (Croatian) -#if VDRVERSNUM >= 10313 - "", // Eesti -#if VDRVERSNUM >= 10316 - "", // Dansk -#endif -#endif -#endif -#endif - }, - { "Added AutoTimer to vdradmin.", // English - "AutoTimer in vdradmin aufgenommen.", // Deutsch - "", // Slovenski - "", // Italiano - "", // Nederlands - "", // Português - "", // Français - "", // Norsk - "AutoTimer lisätty VDRAdminiin.", // suomi - "", // Polski - "", // Español - "", // ÅëëçíéêÜ - "", // Svenska - "", // Romaneste - "", // Magyar - "", // Català -#if VDRVERSNUM >= 10302 - "" // ÀãááÚØÙ (Russian) -#if VDRVERSNUM >= 10307 - "", // Hrvatski (Croatian) -#if VDRVERSNUM >= 10313 - "", // Eesti -#if VDRVERSNUM >= 10316 - "", // Dansk -#endif -#endif -#endif -#endif - }, - { "Startoption 'vdradminfile' not set!", // English - "Startoption 'vdradminfile' nicht gesetzt!", // Deutsch - "", // Slovenski - "", // Italiano - "", // Nederlands - "", // Português - "", // Français - "", // Norsk - "Käynnistysoptio 'vdradminfile' puuttuu!", // suomi - "", // Polski - "", // Español - "", // ÅëëçíéêÜ - "", // Svenska - "", // Romaneste - "", // Magyar - "", // Català -#if VDRVERSNUM >= 10302 - "" // ÀãááÚØÙ (Russian) -#if VDRVERSNUM >= 10307 - "", // Hrvatski (Croatian) -#if VDRVERSNUM >= 10313 - "", // Eesti -#if VDRVERSNUM >= 10316 - "", // Dansk -#endif -#endif -#endif -#endif - }, - -// Search - { "Search for", // English - "Suche nach", // Deutsch - "", // Slovenski - "", // Italiano - "", // Nederlands - "", // Português - "", // Français - "", // Norsk - "Etsitään termiä", // suomi - "", // Polski - "", // Español - "", // ÅëëçíéêÜ - "", // Svenska - "", // Romaneste - "", // Magyar - "", // Català -#if VDRVERSNUM >= 10302 - "" // ÀãááÚØÙ (Russian) -#if VDRVERSNUM >= 10307 - "", // Hrvatski (Croatian) -#if VDRVERSNUM >= 10313 - "", // Eesti -#if VDRVERSNUM >= 10316 - "", // Dansk -#endif -#endif -#endif -#endif - }, - { "Searching...", // English - "Suchen...", // Deutsch - "", // Slovenski - "", // Italiano - "", // Nederlands - "", // Português - "", // Français - "", // Norsk - "Etsitään...", // suomi - "", // Polski - "", // Español - "", // ÅëëçíéêÜ - "", // Svenska - "", // Romaneste - "", // Magyar - "", // Català -#if VDRVERSNUM >= 10302 - "" // ÀãááÚØÙ (Russian) -#if VDRVERSNUM >= 10307 - "", // Hrvatski (Croatian) -#if VDRVERSNUM >= 10313 - "", // Eesti -#if VDRVERSNUM >= 10316 - "", // Dansk -#endif -#endif -#endif -#endif - }, - { "Nothing found!", // English - "Nichts gefunden!", // Deutsch - "", // Slovenski - "", // Italiano - "", // Nederlands - "", // Português - "", // Français - "", // Norsk - "", // suomi - "Ei löydetty!", // Polski - "", // Español - "", // ÅëëçíéêÜ - "", // Svenska - "", // Romaneste - "", // Magyar - "", // Català -#if VDRVERSNUM >= 10302 - "" // ÀãááÚØÙ (Russian) -#if VDRVERSNUM >= 10307 - "", // Hrvatski (Croatian) -#if VDRVERSNUM >= 10313 - "", // Eesti -#if VDRVERSNUM >= 10316 - "", // Dansk -#endif -#endif -#endif -#endif - }, - { "Back", // English - "Zurück", // Deutsch - "", // Slovenski - "", // Italiano - "", // Nederlands - "", // Português - "", // Français - "", // Norsk - "Takaisin", // suomi - "", // Polski - "", // Español - "", // ÅëëçíéêÜ - "", // Svenska - "", // Romaneste - "", // Magyar - "", // Català -#if VDRVERSNUM >= 10302 - "" // ÀãááÚØÙ (Russian) -#if VDRVERSNUM >= 10307 - "", // Hrvatski (Croatian) -#if VDRVERSNUM >= 10313 - "", // Eesti -#if VDRVERSNUM >= 10316 - "", // Dansk -#endif -#endif -#endif -#endif - }, - { "Details", // English - "Details", // Deutsch - "", // Slovenski - "", // Italiano - "", // Nederlands - "", // Português - "", // Français - "", // Norsk - "Lisätiedot", // suomi - "", // Polski - "", // Español - "", // ÅëëçíéêÜ - "", // Svenska - "", // Romaneste - "", // Magyar - "", // Català -#if VDRVERSNUM >= 10302 - "" // ÀãááÚØÙ (Russian) -#if VDRVERSNUM >= 10307 - "", // Hrvatski (Croatian) -#if VDRVERSNUM >= 10313 - "", // Eesti -#if VDRVERSNUM >= 10316 - "", // Dansk -#endif -#endif -#endif -#endif - }, - { "in all", // English - "in allen", // Deutsch - "", // Slovenski - "", // Italiano - "", // Nederlands - "", // Português - "", // Français - "", // Norsk - "Etsi kaikki", // suomi - "", // Polski - "", // Español - "", // ÅëëçíéêÜ - "", // Svenska - "", // Romaneste - "", // Magyar - "", // Català -#if VDRVERSNUM >= 10302 - "" // ÀãááÚØÙ (Russian) -#if VDRVERSNUM >= 10307 - "", // Hrvatski (Croatian) -#if VDRVERSNUM >= 10313 - "", // Eesti -#if VDRVERSNUM >= 10316 - "", // Dansk -#endif -#endif -#endif -#endif - }, - - { NULL } - }; diff --git a/i18n.cpp b/i18n.cpp new file mode 100644 index 0000000..a1bd421 --- /dev/null +++ b/i18n.cpp @@ -0,0 +1,1271 @@ +/* + * i18n.c: Internationalization + * + * See the README file for copyright information and how to reach the author. + * + * $Id: i18n.c,v 1.15 2004/11/30 20:08:24 schmitzj Exp $ + * + */ + +#include "i18n.h" + +const tI18nPhrase tvoPhrases[] = { + { "TV-OnScreen", // English + "TV-OnScreen", // Deutsch + "", // Slovenski + "", // Italiano + "", // Nederlands + "", // Português + "", // Français + "", // Norsk + "TV-ohjelmat", // suomi + "", // Polski + "", // Español + "", // ÅëëçíéêÜ + "", // Svenska + "", // Romaneste + "", // Magyar + "", // Català +#if VDRVERSNUM >= 10302 + "" // ÀãááÚØÙ (Russian) +#if VDRVERSNUM >= 10307 + "", // Hrvatski (Croatian) +#if VDRVERSNUM >= 10313 + "", // Eesti +#if VDRVERSNUM >= 10316 + "", // Dansk +#endif +#endif +#endif +#endif + }, + { "Shows the EPG info in form of a typical TV magazine", // English + "", // Deutsch + "", // Slovenski + "", // Italiano + "", // Nederlands + "", // Português + "", // Français + "", // Norsk + "TV-ohjelmatiedot (OSD)", // suomi + "", // Polski + "", // Español + "", // ÅëëçíéêÜ + "", // Svenska + "", // Romaneste + "", // Magyar + "", // Català +#if VDRVERSNUM >= 10302 + "" // ÀãááÚØÙ (Russian) +#if VDRVERSNUM >= 10307 + "", // Hrvatski (Croatian) +#if VDRVERSNUM >= 10313 + "", // Eesti +#if VDRVERSNUM >= 10316 + "", // Dansk +#endif +#endif +#endif +#endif + }, + { "o'clock", // English + "Uhr", // Deutsch + "", // Slovenski + "", // Italiano + "", // Nederlands + "", // Português + "", // Français + "", // Norsk + " ", // suomi (empty space) + "", // Polski + "", // Español + "", // ÅëëçíéêÜ + "", // Svenska + "", // Romaneste + "", // Magyar + "", // Català +#if VDRVERSNUM >= 10302 + "" // ÀãááÚØÙ (Russian) +#if VDRVERSNUM >= 10307 + "", // Hrvatski (Croatian) +#if VDRVERSNUM >= 10313 + "", // Eesti +#if VDRVERSNUM >= 10316 + "", // Dansk +#endif +#endif +#endif +#endif + }, + { "%d-%m", // English + "%d.%m.", // Deutsch + "", // Slovenski + "", // Italiano + "", // Nederlands + "", // Português + "", // Français + "", // Norsk + "%d.%m.", // suomi + "", // Polski + "", // Español + "", // ÅëëçíéêÜ + "", // Svenska + "", // Romaneste + "", // Magyar + "", // Català +#if VDRVERSNUM >= 10302 + "" // ÀãááÚØÙ (Russian) +#if VDRVERSNUM >= 10307 + "", // Hrvatski (Croatian) +#if VDRVERSNUM >= 10313 + "", // Eesti +#if VDRVERSNUM >= 10316 + "", // Dansk +#endif +#endif +#endif +#endif + }, + { "Press 1 for help", // English + "Für Hilfe die 1 drücken", // Deutsch + "", // Slovenski + "", // Italiano + "", // Nederlands + "", // Português + "", // Français + "", // Norsk + "Paina '1' nähdäksesi opasteen", // suomi + "", // Polski + "", // Español + "", // ÅëëçíéêÜ + "", // Svenska + "", // Romaneste + "", // Magyar + "", // Català +#if VDRVERSNUM >= 10302 + "" // ÀãááÚØÙ (Russian) +#if VDRVERSNUM >= 10307 + "", // Hrvatski (Croatian) +#if VDRVERSNUM >= 10313 + "", // Eesti +#if VDRVERSNUM >= 10316 + "", // Dansk +#endif +#endif +#endif +#endif + }, + { "Timer conflict!", // English + "Timer Konflikt!", // Deutsch + "", // Slovenski + "", // Italiano + "", // Nederlands + "", // Português + "", // Français + "", // Norsk + " ", // suomi (empty space) + "", // Polski + "", // Español + "", // ÅëëçíéêÜ + "", // Svenska + "", // Romaneste + "", // Magyar + "", // Català +#if VDRVERSNUM >= 10302 + "" // ÀãááÚØÙ (Russian) +#if VDRVERSNUM >= 10307 + "", // Hrvatski (Croatian) +#if VDRVERSNUM >= 10313 + "", // Eesti +#if VDRVERSNUM >= 10316 + "", // Dansk +#endif +#endif +#endif +#endif + }, + +// Prefs + { "show channel logos", // English + "zeige Kanal-Logos", // Deutsch + "", // Slovenski + "", // Italiano + "", // Nederlands + "", // Português + "", // Français + "", // Norsk + "Näytä kanavien logot", // suomi + "", // Polski + "", // Español + "", // ÅëëçíéêÜ + "", // Svenska + "", // Romaneste + "", // Magyar + "", // Català +#if VDRVERSNUM >= 10302 + "" // ÀãááÚØÙ (Russian) +#if VDRVERSNUM >= 10307 + "", // Hrvatski (Croatian) +#if VDRVERSNUM >= 10313 + "", // Eesti +#if VDRVERSNUM >= 10316 + "", // Dansk +#endif +#endif +#endif +#endif + }, + { "use XL fonts", // English + "benutze XL Schrift", // Deutsch + "", // Slovenski + "", // Italiano + "", // Nederlands + "", // Português + "", // Français + "", // Norsk + "Käytä XL-kirjasinta", // suomi + "", // Polski + "", // Español + "", // ÅëëçíéêÜ + "", // Svenska + "", // Romaneste + "", // Magyar + "", // Català +#if VDRVERSNUM >= 10302 + "" // ÀãááÚØÙ (Russian) +#if VDRVERSNUM >= 10307 + "", // Hrvatski (Croatian) +#if VDRVERSNUM >= 10313 + "", // Eesti +#if VDRVERSNUM >= 10316 + "", // Dansk +#endif +#endif +#endif +#endif + }, + { "hide info line", // English + "verstecke Info Zeile", // Deutsch + "", // Slovenski + "", // Italiano + "", // Nederlands + "", // Português + "", // Français + "", // Norsk + "Piilota inforivi", // suomi + "", // Polski + "", // Español + "", // ÅëëçíéêÜ + "", // Svenska + "", // Romaneste + "", // Magyar + "", // Català +#if VDRVERSNUM >= 10302 + "" // ÀãááÚØÙ (Russian) +#if VDRVERSNUM >= 10307 + "", // Hrvatski (Croatian) +#if VDRVERSNUM >= 10313 + "", // Eesti +#if VDRVERSNUM >= 10316 + "", // Dansk +#endif +#endif +#endif +#endif + }, + { "show channel names", // English + "zeige Kanal-Namen", // Deutsch + "", // Slovenski + "", // Italiano + "", // Nederlands + "", // Português + "", // Français + "", // Norsk + "Näytä kanavien nimet", // suomi + "", // Polski + "", // Español + "", // ÅëëçíéêÜ + "", // Svenska + "", // Romaneste + "", // Magyar + "", // Català +#if VDRVERSNUM >= 10302 + "" // ÀãááÚØÙ (Russian) +#if VDRVERSNUM >= 10307 + "", // Hrvatski (Croatian) +#if VDRVERSNUM >= 10313 + "", // Eesti +#if VDRVERSNUM >= 10316 + "", // Dansk +#endif +#endif +#endif +#endif + }, + { "show logos in black&white", // English + "zeige Kanal-Logos in Schwarz/Weiß", // Deutsch + "", // Slovenski + "", // Italiano + "", // Nederlands + "", // Português + "", // Français + "", // Norsk + "Näytä logot mustavalkoisina", // suomi + "", // Polski + "", // Español + "", // ÅëëçíéêÜ + "", // Svenska + "", // Romaneste + "", // Magyar + "", // Català +#if VDRVERSNUM >= 10302 + "" // ÀãááÚØÙ (Russian) +#if VDRVERSNUM >= 10307 + "", // Hrvatski (Croatian) +#if VDRVERSNUM >= 10313 + "", // Eesti +#if VDRVERSNUM >= 10316 + "", // Dansk +#endif +#endif +#endif +#endif + }, + { "enable color problem work around", // English + "Farbproblem Umgehung aktivieren", // Deutsch + "", // Slovenski + "", // Italiano + "", // Nederlands + "", // Português + "", // Français + "", // Norsk + "Saksalainen värikorjaus", // suomi + "", // Polski + "", // Español + "", // ÅëëçíéêÜ + "", // Svenska + "", // Romaneste + "", // Magyar + "", // Català +#if VDRVERSNUM >= 10302 + "" // ÀãááÚØÙ (Russian) +#if VDRVERSNUM >= 10307 + "", // Hrvatski (Croatian) +#if VDRVERSNUM >= 10313 + "", // Eesti +#if VDRVERSNUM >= 10316 + "", // Dansk +#endif +#endif +#endif +#endif + }, + { "user point in time 1 (Key 4)", // English + "Anwenderzeitpunkt 1 (Taste 4)", // Deutsch + "", // Slovenski + "", // Italiano + "", // Nederlands + "", // Português + "", // Français + "", // Norsk + "Ajankohta #1 (näppäin '4')", // suomi + "", // Polski + "", // Español + "", // ÅëëçíéêÜ + "", // Svenska + "", // Romaneste + "", // Magyar + "", // Català +#if VDRVERSNUM >= 10302 + "" // ÀãááÚØÙ (Russian) +#if VDRVERSNUM >= 10307 + "", // Hrvatski (Croatian) +#if VDRVERSNUM >= 10313 + "", // Eesti +#if VDRVERSNUM >= 10316 + "", // Dansk +#endif +#endif +#endif +#endif + }, + { "user point in time 2 (Key 5)", // English + "Anwenderzeitpunkt 2 (Taste 5)", // Deutsch + "", // Slovenski + "", // Italiano + "", // Nederlands + "", // Português + "", // Français + "", // Norsk + "Ajankohta #2 (näppäin '5')", // suomi + "", // Polski + "", // Español + "", // ÅëëçíéêÜ + "", // Svenska + "", // Romaneste + "", // Magyar + "", // Català +#if VDRVERSNUM >= 10302 + "" // ÀãááÚØÙ (Russian) +#if VDRVERSNUM >= 10307 + "", // Hrvatski (Croatian) +#if VDRVERSNUM >= 10313 + "", // Eesti +#if VDRVERSNUM >= 10316 + "", // Dansk +#endif +#endif +#endif +#endif + }, + { "user point in time 3 (Key 6)", // English + "Anwenderzeitpunkt 3 (Taste 6)", // Deutsch + "", // Slovenski + "", // Italiano + "", // Nederlands + "", // Português + "", // Français + "", // Norsk + "Ajankohta #3 (näppäin '6')", // suomi + "", // Polski + "", // Español + "", // ÅëëçíéêÜ + "", // Svenska + "", // Romaneste + "", // Magyar + "", // Català +#if VDRVERSNUM >= 10302 + "" // ÀãááÚØÙ (Russian) +#if VDRVERSNUM >= 10307 + "", // Hrvatski (Croatian) +#if VDRVERSNUM >= 10313 + "", // Eesti +#if VDRVERSNUM >= 10316 + "", // Dansk +#endif +#endif +#endif +#endif + }, + { "jump to next day point if ago", // English + "Gehe zum nächsten Tag wenn vorbei", // Deutsch + "", // Slovenski + "", // Italiano + "", // Nederlands + "", // Português + "", // Français + "", // Norsk + "Siirry tarvittaessa seur. päivään", // suomi + "", // Polski + "", // Español + "", // ÅëëçíéêÜ + "", // Svenska + "", // Romaneste + "", // Magyar + "", // Català +#if VDRVERSNUM >= 10302 + "" // ÀãááÚØÙ (Russian) +#if VDRVERSNUM >= 10307 + "", // Hrvatski (Croatian) +#if VDRVERSNUM >= 10313 + "", // Eesti +#if VDRVERSNUM >= 10316 + "", // Dansk +#endif +#endif +#endif +#endif + }, + { "Show search item itself", // English + "Zeige auch Suchbegriff", // Deutsch + "", // Slovenski + "", // Italiano + "", // Nederlands + "", // Português + "", // Français + "", // Norsk + "Näytä hakuehto", // suomi + "", // Polski + "", // Español + "", // ÅëëçíéêÜ + "", // Svenska + "", // Romaneste + "", // Magyar + "", // Català +#if VDRVERSNUM >= 10302 + "" // ÀãááÚØÙ (Russian) +#if VDRVERSNUM >= 10307 + "", // Hrvatski (Croatian) +#if VDRVERSNUM >= 10313 + "", // Eesti +#if VDRVERSNUM >= 10316 + "", // Dansk +#endif +#endif +#endif +#endif + }, + +// Help + { "NORMAL MODE:", // English + "NORMALER MODUS:", // Deutsch + "", // Slovenski + "", // Italiano + "", // Nederlands + "", // Português + "", // Français + "", // Norsk + "NORMAALITILA:\n", // suomi + "", // Polski + "", // Español + "", // ÅëëçíéêÜ + "", // Svenska + "", // Romaneste + "", // Magyar + "", // Català +#if VDRVERSNUM >= 10302 + "" // ÀãááÚØÙ (Russian) +#if VDRVERSNUM >= 10307 + "", // Hrvatski (Croatian) +#if VDRVERSNUM >= 10313 + "", // Eesti +#if VDRVERSNUM >= 10316 + "", // Dansk +#endif +#endif +#endif +#endif + }, + { "arrows\n\tmove view", // English + "Pfeile\n\tAnsicht bewegen", // Deutsch + "", // Slovenski + "", // Italiano + "", // Nederlands + "", // Português + "", // Français + "", // Norsk + "'Nuolinäppäimet'\n\tohjaa näkymää", // suomi + "", // Polski + "", // Español + "", // ÅëëçíéêÜ + "", // Svenska + "", // Romaneste + "", // Magyar + "", // Català +#if VDRVERSNUM >= 10302 + "" // ÀãááÚØÙ (Russian) +#if VDRVERSNUM >= 10307 + "", // Hrvatski (Croatian) +#if VDRVERSNUM >= 10313 + "", // Eesti +#if VDRVERSNUM >= 10316 + "", // Dansk +#endif +#endif +#endif +#endif + }, + { "back\n\tclose TV OnScreen", // English + "back\n\tschließe TV OnScreen", // Deutsch + "", // Slovenski + "", // Italiano + "", // Nederlands + "", // Português + "", // Français + "", // Norsk + "'Takaisin'\n\tsulje laajennos", // suomi + "", // Polski + "", // Español + "", // ÅëëçíéêÜ + "", // Svenska + "", // Romaneste + "", // Magyar + "", // Català +#if VDRVERSNUM >= 10302 + "" // ÀãááÚØÙ (Russian) +#if VDRVERSNUM >= 10307 + "", // Hrvatski (Croatian) +#if VDRVERSNUM >= 10313 + "", // Eesti +#if VDRVERSNUM >= 10316 + "", // Dansk +#endif +#endif +#endif +#endif + }, + { "red/blue\n\t-/+ one day", // English + "rot/blau\n\t-/+ ein Tag", // Deutsch + "", // Slovenski + "", // Italiano + "", // Nederlands + "", // Português + "", // Français + "", // Norsk + "'Punainen'/'Sininen'\n\tyksi päivä eteen/taaksepäin", // suomi + "", // Polski + "", // Español + "", // ÅëëçíéêÜ + "", // Svenska + "", // Romaneste + "", // Magyar + "", // Català +#if VDRVERSNUM >= 10302 + "" // ÀãááÚØÙ (Russian) +#if VDRVERSNUM >= 10307 + "", // Hrvatski (Croatian) +#if VDRVERSNUM >= 10313 + "", // Eesti +#if VDRVERSNUM >= 10316 + "", // Dansk +#endif +#endif +#endif +#endif + }, + { "green/yellow\n\tone page left/right", // English + "grün/gelb\n\teine Seite links/rechts", // Deutsch + "", // Slovenski + "", // Italiano + "", // Nederlands + "", // Português + "", // Français + "", // Norsk + "'Vihreä'/'Keltainen'\n\tseuraava/edellinen sivu", // suomi + "", // Polski + "", // Español + "", // ÅëëçíéêÜ + "", // Svenska + "", // Romaneste + "", // Magyar + "", // Català +#if VDRVERSNUM >= 10302 + "" // ÀãááÚØÙ (Russian) +#if VDRVERSNUM >= 10307 + "", // Hrvatski (Croatian) +#if VDRVERSNUM >= 10313 + "", // Eesti +#if VDRVERSNUM >= 10316 + "", // Dansk +#endif +#endif +#endif +#endif + }, + { "7/9\n\tone page left/right", // English + "7/9\n\teine Seite links/rechts", // Deutsch + "", // Slovenski + "", // Italiano + "", // Nederlands + "", // Português + "", // Français + "", // Norsk + "'7'/'9'\n\tseuraava/edellinen sivu", // suomi + "", // Polski + "", // Español + "", // ÅëëçíéêÜ + "", // Svenska + "", // Romaneste + "", // Magyar + "", // Català +#if VDRVERSNUM >= 10302 + "" // ÀãááÚØÙ (Russian) +#if VDRVERSNUM >= 10307 + "", // Hrvatski (Croatian) +#if VDRVERSNUM >= 10313 + "", // Eesti +#if VDRVERSNUM >= 10316 + "", // Dansk +#endif +#endif +#endif +#endif + }, + { "8\n\tgoto current channel", // English + "8\n\tgehe zum aktuellen Kanal", // Deutsch + "", // Slovenski + "", // Italiano + "", // Nederlands + "", // Português + "", // Français + "", // Norsk + "'8'\n\tsiirry nykyiselle kanavalle", // suomi + "", // Polski + "", // Español + "", // ÅëëçíéêÜ + "", // Svenska + "", // Romaneste + "", // Magyar + "", // Català +#if VDRVERSNUM >= 10302 + "" // ÀãááÚØÙ (Russian) +#if VDRVERSNUM >= 10307 + "", // Hrvatski (Croatian) +#if VDRVERSNUM >= 10313 + "", // Eesti +#if VDRVERSNUM >= 10316 + "", // Dansk +#endif +#endif +#endif +#endif + }, + { "0\n\tgoto now", // English + "0\n\tgehe zur aktuellen Zeit", // Deutsch + "", // Slovenski + "", // Italiano + "", // Nederlands + "", // Português + "", // Français + "", // Norsk + "'0'\n\tsiirry nykyhetkeen", // suomi + "", // Polski + "", // Español + "", // ÅëëçíéêÜ + "", // Svenska + "", // Romaneste + "", // Magyar + "", // Català +#if VDRVERSNUM >= 10302 + "" // ÀãááÚØÙ (Russian) +#if VDRVERSNUM >= 10307 + "", // Hrvatski (Croatian) +#if VDRVERSNUM >= 10313 + "", // Eesti +#if VDRVERSNUM >= 10316 + "", // Dansk +#endif +#endif +#endif +#endif + }, + { "4/5/6\n\tgoto configured time", // English + "4/5/6\n\tgehe zu eingestellten Zeitpunkten", // Deutsch + "", // Slovenski + "", // Italiano + "", // Nederlands + "", // Português + "", // Français + "", // Norsk + "'4'/'5'/'6'\n\tsiirry määriteltyyn ajankohtaan", // suomi + "", // Polski + "", // Español + "", // ÅëëçíéêÜ + "", // Svenska + "", // Romaneste + "", // Magyar + "", // Català +#if VDRVERSNUM >= 10302 + "" // ÀãááÚØÙ (Russian) +#if VDRVERSNUM >= 10307 + "", // Hrvatski (Croatian) +#if VDRVERSNUM >= 10313 + "", // Eesti +#if VDRVERSNUM >= 10316 + "", // Dansk +#endif +#endif +#endif +#endif + }, + { "ok\n\tswitch to edit mode\n", // English + "ok\n\taktiviere Editier-Modus\n", // Deutsch + "", // Slovenski + "", // Italiano + "", // Nederlands + "", // Português + "", // Français + "", // Norsk + "'OK'\n\tvaihda muokkaustilaan\n", // suomi + "", // Polski + "", // Español + "", // ÅëëçíéêÜ + "", // Svenska + "", // Romaneste + "", // Magyar + "", // Català +#if VDRVERSNUM >= 10302 + "" // ÀãááÚØÙ (Russian) +#if VDRVERSNUM >= 10307 + "", // Hrvatski (Croatian) +#if VDRVERSNUM >= 10313 + "", // Eesti +#if VDRVERSNUM >= 10316 + "", // Dansk +#endif +#endif +#endif +#endif + }, + { "EDIT MODE:", // English + "EDITIER MODUS:", // Deutsch + "", // Slovenski + "", // Italiano + "", // Nederlands + "", // Português + "", // Français + "", // Norsk + "MUOKKAUSTILA:\n", // suomi + "", // Polski + "", // Español + "", // ÅëëçíéêÜ + "", // Svenska + "", // Romaneste + "", // Magyar + "", // Català +#if VDRVERSNUM >= 10302 + "" // ÀãááÚØÙ (Russian) +#if VDRVERSNUM >= 10307 + "", // Hrvatski (Croatian) +#if VDRVERSNUM >= 10313 + "", // Eesti +#if VDRVERSNUM >= 10316 + "", // Dansk +#endif +#endif +#endif +#endif + }, + { "back\n\tback to normal mode", // English + "back\n\tzurück zum normalen Modus", // Deutsch + "", // Slovenski + "", // Italiano + "", // Nederlands + "", // Português + "", // Français + "", // Norsk + "'Takaisin'\n\tvaihda normaalitilaan", // suomi + "", // Polski + "", // Español + "", // ÅëëçíéêÜ + "", // Svenska + "", // Romaneste + "", // Magyar + "", // Català +#if VDRVERSNUM >= 10302 + "" // ÀãááÚØÙ (Russian) +#if VDRVERSNUM >= 10307 + "", // Hrvatski (Croatian) +#if VDRVERSNUM >= 10313 + "", // Eesti +#if VDRVERSNUM >= 10316 + "", // Dansk +#endif +#endif +#endif +#endif + }, + { "arrows\n\tmove selected schedule", // English + "Pfeile\n\tSendung auswählen", // Deutsch + "", // Slovenski + "", // Italiano + "", // Nederlands + "", // Português + "", // Français + "", // Norsk + "'Nuolinäppäimet'\n\tvalitse ohjelma", // suomi + "", // Polski + "", // Español + "", // ÅëëçíéêÜ + "", // Svenska + "", // Romaneste + "", // Magyar + "", // Català +#if VDRVERSNUM >= 10302 + "" // ÀãááÚØÙ (Russian) +#if VDRVERSNUM >= 10307 + "", // Hrvatski (Croatian) +#if VDRVERSNUM >= 10313 + "", // Eesti +#if VDRVERSNUM >= 10316 + "", // Dansk +#endif +#endif +#endif +#endif + }, + { "record\n\tcreate timer", // English + "record\n\terzeuge Timer", // Deutsch + "", // Slovenski + "", // Italiano + "", // Nederlands + "", // Português + "", // Français + "", // Norsk + "'Tallenna'\n\tluo ajastin", // suomi + "", // Polski + "", // Español + "", // ÅëëçíéêÜ + "", // Svenska + "", // Romaneste + "", // Magyar + "", // Català +#if VDRVERSNUM >= 10302 + "" // ÀãááÚØÙ (Russian) +#if VDRVERSNUM >= 10307 + "", // Hrvatski (Croatian) +#if VDRVERSNUM >= 10313 + "", // Eesti +#if VDRVERSNUM >= 10316 + "", // Dansk +#endif +#endif +#endif +#endif + }, + { "ok\n\tshow details", // English + "ok\n\tzeige Sendungsdetails", // Deutsch + "", // Slovenski + "", // Italiano + "", // Nederlands + "", // Português + "", // Français + "", // Norsk + "'OK'\n\tnäytä lisätiedot", // suomi + "", // Polski + "", // Español + "", // ÅëëçíéêÜ + "", // Svenska + "", // Romaneste + "", // Magyar + "", // Català +#if VDRVERSNUM >= 10302 + "" // ÀãááÚØÙ (Russian) +#if VDRVERSNUM >= 10307 + "", // Hrvatski (Croatian) +#if VDRVERSNUM >= 10313 + "", // Eesti +#if VDRVERSNUM >= 10316 + "", // Dansk +#endif +#endif +#endif +#endif + }, +// End Help + +// Details + { "Record", // English + "Aufnehmen", // Deutsch + "", // Slovenski + "", // Italiano + "", // Nederlands + "", // Português + "", // Français + "", // Norsk + "Tallenna", // suomi + "", // Polski + "", // Español + "", // ÅëëçíéêÜ + "", // Svenska + "", // Romaneste + "", // Magyar + "", // Català +#if VDRVERSNUM >= 10302 + "" // ÀãááÚØÙ (Russian) +#if VDRVERSNUM >= 10307 + "", // Hrvatski (Croatian) +#if VDRVERSNUM >= 10313 + "", // Eesti +#if VDRVERSNUM >= 10316 + "", // Dansk +#endif +#endif +#endif +#endif + }, + { "Search", // English + "Suchen", // Deutsch + "", // Slovenski + "", // Italiano + "", // Nederlands + "", // Português + "", // Français + "", // Norsk + "Etsi", // suomi + "", // Polski + "", // Español + "", // ÅëëçíéêÜ + "", // Svenska + "", // Romaneste + "", // Magyar + "", // Català +#if VDRVERSNUM >= 10302 + "" // ÀãááÚØÙ (Russian) +#if VDRVERSNUM >= 10307 + "", // Hrvatski (Croatian) +#if VDRVERSNUM >= 10313 + "", // Eesti +#if VDRVERSNUM >= 10316 + "", // Dansk +#endif +#endif +#endif +#endif + }, + { "AutoTimer", // English + "AutoTimer", // Deutsch + "", // Slovenski + "", // Italiano + "", // Nederlands + "", // Português + "", // Français + "", // Norsk + "AutoTimer", // suomi + "", // Polski + "", // Español + "", // ÅëëçíéêÜ + "", // Svenska + "", // Romaneste + "", // Magyar + "", // Català +#if VDRVERSNUM >= 10302 + "" // ÀãááÚØÙ (Russian) +#if VDRVERSNUM >= 10307 + "", // Hrvatski (Croatian) +#if VDRVERSNUM >= 10313 + "", // Eesti +#if VDRVERSNUM >= 10316 + "", // Dansk +#endif +#endif +#endif +#endif + }, + { "Added AutoTimer to vdradmin.", // English + "AutoTimer in vdradmin aufgenommen.", // Deutsch + "", // Slovenski + "", // Italiano + "", // Nederlands + "", // Português + "", // Français + "", // Norsk + "AutoTimer lisätty VDRAdminiin.", // suomi + "", // Polski + "", // Español + "", // ÅëëçíéêÜ + "", // Svenska + "", // Romaneste + "", // Magyar + "", // Català +#if VDRVERSNUM >= 10302 + "" // ÀãááÚØÙ (Russian) +#if VDRVERSNUM >= 10307 + "", // Hrvatski (Croatian) +#if VDRVERSNUM >= 10313 + "", // Eesti +#if VDRVERSNUM >= 10316 + "", // Dansk +#endif +#endif +#endif +#endif + }, + { "Startoption 'vdradminfile' not set!", // English + "Startoption 'vdradminfile' nicht gesetzt!", // Deutsch + "", // Slovenski + "", // Italiano + "", // Nederlands + "", // Português + "", // Français + "", // Norsk + "Käynnistysoptio 'vdradminfile' puuttuu!", // suomi + "", // Polski + "", // Español + "", // ÅëëçíéêÜ + "", // Svenska + "", // Romaneste + "", // Magyar + "", // Català +#if VDRVERSNUM >= 10302 + "" // ÀãááÚØÙ (Russian) +#if VDRVERSNUM >= 10307 + "", // Hrvatski (Croatian) +#if VDRVERSNUM >= 10313 + "", // Eesti +#if VDRVERSNUM >= 10316 + "", // Dansk +#endif +#endif +#endif +#endif + }, + +// Search + { "Search for", // English + "Suche nach", // Deutsch + "", // Slovenski + "", // Italiano + "", // Nederlands + "", // Português + "", // Français + "", // Norsk + "Etsitään termiä", // suomi + "", // Polski + "", // Español + "", // ÅëëçíéêÜ + "", // Svenska + "", // Romaneste + "", // Magyar + "", // Català +#if VDRVERSNUM >= 10302 + "" // ÀãááÚØÙ (Russian) +#if VDRVERSNUM >= 10307 + "", // Hrvatski (Croatian) +#if VDRVERSNUM >= 10313 + "", // Eesti +#if VDRVERSNUM >= 10316 + "", // Dansk +#endif +#endif +#endif +#endif + }, + { "Searching...", // English + "Suchen...", // Deutsch + "", // Slovenski + "", // Italiano + "", // Nederlands + "", // Português + "", // Français + "", // Norsk + "Etsitään...", // suomi + "", // Polski + "", // Español + "", // ÅëëçíéêÜ + "", // Svenska + "", // Romaneste + "", // Magyar + "", // Català +#if VDRVERSNUM >= 10302 + "" // ÀãááÚØÙ (Russian) +#if VDRVERSNUM >= 10307 + "", // Hrvatski (Croatian) +#if VDRVERSNUM >= 10313 + "", // Eesti +#if VDRVERSNUM >= 10316 + "", // Dansk +#endif +#endif +#endif +#endif + }, + { "Nothing found!", // English + "Nichts gefunden!", // Deutsch + "", // Slovenski + "", // Italiano + "", // Nederlands + "", // Português + "", // Français + "", // Norsk + "", // suomi + "Ei löydetty!", // Polski + "", // Español + "", // ÅëëçíéêÜ + "", // Svenska + "", // Romaneste + "", // Magyar + "", // Català +#if VDRVERSNUM >= 10302 + "" // ÀãááÚØÙ (Russian) +#if VDRVERSNUM >= 10307 + "", // Hrvatski (Croatian) +#if VDRVERSNUM >= 10313 + "", // Eesti +#if VDRVERSNUM >= 10316 + "", // Dansk +#endif +#endif +#endif +#endif + }, + { "Back", // English + "Zurück", // Deutsch + "", // Slovenski + "", // Italiano + "", // Nederlands + "", // Português + "", // Français + "", // Norsk + "Takaisin", // suomi + "", // Polski + "", // Español + "", // ÅëëçíéêÜ + "", // Svenska + "", // Romaneste + "", // Magyar + "", // Català +#if VDRVERSNUM >= 10302 + "" // ÀãááÚØÙ (Russian) +#if VDRVERSNUM >= 10307 + "", // Hrvatski (Croatian) +#if VDRVERSNUM >= 10313 + "", // Eesti +#if VDRVERSNUM >= 10316 + "", // Dansk +#endif +#endif +#endif +#endif + }, + { "Details", // English + "Details", // Deutsch + "", // Slovenski + "", // Italiano + "", // Nederlands + "", // Português + "", // Français + "", // Norsk + "Lisätiedot", // suomi + "", // Polski + "", // Español + "", // ÅëëçíéêÜ + "", // Svenska + "", // Romaneste + "", // Magyar + "", // Català +#if VDRVERSNUM >= 10302 + "" // ÀãááÚØÙ (Russian) +#if VDRVERSNUM >= 10307 + "", // Hrvatski (Croatian) +#if VDRVERSNUM >= 10313 + "", // Eesti +#if VDRVERSNUM >= 10316 + "", // Dansk +#endif +#endif +#endif +#endif + }, + { "in all", // English + "in allen", // Deutsch + "", // Slovenski + "", // Italiano + "", // Nederlands + "", // Português + "", // Français + "", // Norsk + "Etsi kaikki", // suomi + "", // Polski + "", // Español + "", // ÅëëçíéêÜ + "", // Svenska + "", // Romaneste + "", // Magyar + "", // Català +#if VDRVERSNUM >= 10302 + "" // ÀãááÚØÙ (Russian) +#if VDRVERSNUM >= 10307 + "", // Hrvatski (Croatian) +#if VDRVERSNUM >= 10313 + "", // Eesti +#if VDRVERSNUM >= 10316 + "", // Dansk +#endif +#endif +#endif +#endif + }, + + { NULL } + }; diff --git a/magazine.c b/magazine.c deleted file mode 100644 index 8dcf801..0000000 --- a/magazine.c +++ /dev/null @@ -1,1415 +0,0 @@ -/* - * magazine.c - * - * See the README file for copyright information and how to reach the author. - * - * $Id: magazine.c,v 1.34 2006/06/18 13:59:36 schmitzj Exp $ - * - */ - -#include "magazine.h" -#include "TVonscreen.h" - -#define clrGrey 0xFF5F5F5F -#define clrBackground clrGray50 // this should be tied somehow into current theme - -static tArea Areas[NUMBER_OF_AREAS] = -{ -#ifndef MULTINAMES - { 8+45, 0, 8+45 + 188*2+184 - 1, 0 + 48/*20*/ - 1, 8 }, // NAMES_AREA -#else - { 8+45, 0, 8+45 + 184 - 1, 0 + 48/*20*/ - 1, 4 }, // NAME1_AREA - { 8+45+188, 0, 8+45+188 + 184 - 1, 0 + 48/*20*/ - 1, 4 }, // NAME2_AREA - { 8+45+188*2, 0, 8+45+188*2 + 184 - 1, 0 + 48/*20*/ - 1, 4 }, // NAME3_AREA -#endif - { 0, 0, 0 + 8+40 - 1, TL_YSTART + 384 - 1, 2 }, // TIMELINE_AREA - { 8+45, TL_YSTART, 8+45 + 184 - 1, TL_YSTART + 384 - 1, 2 }, // SCHED1_AREA - { 8+45+188, TL_YSTART, 8+45+188 + 184 - 1, TL_YSTART + 384 - 1, 2 }, // SCHED2_AREA - { 8+45+188*2, TL_YSTART, 8+45+188*2 + 184 - 1, TL_YSTART + 384 - 1, 2 }, // SCHED3_AREA - { 50, 384+TL_YSTART+8, 50 + 8+45+188*2+184-101 - 1, 384+TL_YSTART+8 + 20 - 1, 2 }, // CONTROL_AREA -}; - -static int CompareSchedules(const void *p1, const void *p2) { - - int c1nr = 9999; // there should be no one with more than 9999 channels - int c2nr = 9999; - - cChannel* c1 = Channels.GetByChannelID((*(const cSchedule**)p1)->ChannelID(), true); - if (c1) - c1nr = c1->Number(); - - cChannel* c2 = Channels.GetByChannelID((*(const cSchedule**)p2)->ChannelID(), true); - if (c2) - c2nr = c2->Number(); - - return c1nr - c2nr; -} - - -magazine::magazine(class cPlugin *p) -{ - parent=p; - const cSchedules* Schedules = cSchedules::Schedules(_schedulesLock); - - curmode=SHOW; - EDIT_curEvent=0; - - f1=NULL; - f2=NULL; - f3=NULL; - f4=NULL; - me=NULL; - met=NULL; - mes=NULL; - - timeline_tested=false; - timeline_found_conflict=false; - - // Create and sort entries for menu items - // -------------------------------------- - - const cSchedule* Schedule = Schedules->First(); - - int num = 0; - schedArray = NULL; - while (Schedule) - { - schedArray = (const cSchedule **)realloc(schedArray, (num + 1) * sizeof(cSchedule*)); - - if (Schedule->GetPresentEvent()) - { // if there exist an event -> add to array - // check if we can get a channel NAME ( XXX ) - // I thougt that this must always work , but doesn't - cChannel *c = Channels.GetByChannelID(Schedule->ChannelID(), true); - if (c) - { - schedArray[num] = Schedule; - ++num; - } - } - Schedule = (const cSchedule*)Schedules->Next(Schedule); - } - schedArrayNum=num; - qsort(schedArray, num, sizeof(cSchedule*), CompareSchedules); - currentFirst=0; - - int currentChannel = Channels.GetByNumber(cDevice::CurrentChannel())->Number(); - for(int i=0;iChannelID(), true); - if (channel->Number()==currentChannel) - { - currentFirst=i-1; - if (currentFirst<0) - currentFirst=0; - break; - } - } - - ev1=NULL; - ev2=NULL; - ev3=NULL; - fullHours=NULL; - fullHours_tmp1=NULL; - fullHours_tmp2=NULL; - fullHours_tmp3=NULL; - - currentFirstTime=time(NULL); -} -magazine::~magazine(void) -{ - if (me) - { - delete me; - me=NULL; - } - if (met) - { - delete met; - met=NULL; - } - if (mes) - { - delete mes; - mes=NULL; - } - - delete [] fullHours_tmp3; - delete [] fullHours_tmp2; - delete [] fullHours_tmp1; - delete [] fullHours; - delete [] ev1; - delete [] ev2; - delete [] ev3; - - delete f1; - delete f2; - delete f3; - delete f4; - - free(schedArray); - delete osd; -} -void magazine::printLogo(const cSchedule *s,int p) -{ - cChannel* channel; - const char *txt; - int x=184*p+p*4; - int currentChannel; - -#ifdef MULTINAMES - int a=0; - switch (p) - { - case 0: - default: - a=NAME1_AREA; - break; - case 1: - a=NAME2_AREA; - break; - case 2: - a=NAME3_AREA; - break; - } - x=0; -#else - int a=NAMES_AREA; -#endif - if (s!=NULL) - { - currentChannel = Channels.GetByNumber(cDevice::CurrentChannel())->Number(); - channel = Channels.GetByChannelID(s->ChannelID(), true); - txt=channel->ShortName(true); - // logo: 64x48px - - const char *ConfigDirectory=cPlugin::ConfigDirectory("logos"); - if (tvonscreenCfg.logos) - ConfigDirectory=tvonscreenCfg.logos; - char *fname=new char[strlen(ConfigDirectory) + 1 + strlen(txt) + strlen(".xpm") + 1]; - sprintf(fname,"%s/%s.xpm",ConfigDirectory,txt); - DrawXpm(fname,osd,x+Areas[a].x1,Areas[a].y1,0,tvonscreenCfg.bwlogos); - } -} -void magazine::printHead(const cSchedule *s,int p) -{ - cChannel* channel; - const char *txt; - int x=184*p+p*4; - int currentChannel; - int wmin=0,yoff=0; - - if (tvonscreenCfg.showLogos) - wmin=64; - -#ifdef MULTINAMES - int a; - switch (p) - { - case 0: - default: - a=NAME1_AREA; - break; - case 1: - a=NAME2_AREA; - break; - case 2: - a=NAME3_AREA; - break; - } - x=0; -#else - int a=NAMES_AREA; -#endif -#if TL_YSTART == 48 - yoff=28; - osd->DrawRectangle(x+Areas[a].x1,0+Areas[a].y1+0,x+Areas[a].x1+188,Areas[a].y1+48,clrTransparent); - osd->DrawEllipse(x+Areas[a].x1+182-28,0+Areas[a].y1,x+Areas[a].x1+182,Areas[a].y1+28,clrGrey,1); - osd->DrawEllipse(x+Areas[a].x1+182-28-2,0+Areas[a].y1+2,x+Areas[a].x1+182-2,Areas[a].y1+28+2,clrTransparent,1); - - osd->DrawEllipse(x+Areas[a].x1,Areas[a].y1,x+Areas[a].x1+28,Areas[a].y1+28,clrGrey,2); - osd->DrawEllipse(x+Areas[a].x1+2,Areas[a].y1+2,x+Areas[a].x1+28+2,Areas[a].y1+28+2,clrTransparent,2); - - osd->DrawRectangle(x+Areas[a].x1+28,0+Areas[a].y1,x+Areas[a].x1+182-28,Areas[a].y1+2,clrGrey); - osd->DrawRectangle(x+Areas[a].x1+182-2,0+Areas[a].y1+28,x+Areas[a].x1+182,Areas[a].y1+28+20,clrGrey); - osd->DrawRectangle(x+Areas[a].x1,0+Areas[a].y1+28,x+Areas[a].x1+2,Areas[a].y1+28+20,clrGrey); // nie zu sehen, außer wenn kein Logo gefunden wird - - if (p==2) DrawXpm(TVonscreen,osd,x+Areas[a].x1+182-110,0+Areas[a].y1); - - if (tvonscreenCfg.showChannels || !tvonscreenCfg.showLogos) -#endif - osd->DrawRectangle(x+Areas[a].x1,yoff+Areas[a].y1,x+Areas[a].x1+182,Areas[a].y1+20+yoff,clrBlue); - - if (tvonscreenCfg.showChannels || !tvonscreenCfg.showLogos) - { - if (s!=NULL) - { - tColor col=clrWhite; - - currentChannel = Channels.GetByNumber(cDevice::CurrentChannel())->Number(); - channel = Channels.GetByChannelID(s->ChannelID(), true); - if (currentChannel==channel->Number()) - { - col=clrCyan; - } - txt=channel->ShortName(true); - - if (!tvonscreenCfg.XLfonts || f3->LargeWidth(txt)>=184-wmin) - f3->Text(wmin+x+Areas[a].x1+(184-wmin-f3->Width(txt))/2,Areas[a].y1+yoff-1,txt,col,clrBlue); - else - f3->LargeText(wmin+x+Areas[a].x1+(184-wmin-f3->LargeWidth(txt))/2,Areas[a].y1+yoff-1,txt,col,clrBlue); - } - } -} -void magazine::showHeads(bool onlyBG) -{ - const cSchedule *s1=NULL,*s2=NULL,*s3=NULL; - - if (!onlyBG) - { - s1=schedArrayNum>currentFirst?schedArray[currentFirst]:NULL; - s2=schedArrayNum>currentFirst+1?schedArray[currentFirst+1]:NULL; - s3=schedArrayNum>currentFirst+2?schedArray[currentFirst+2]:NULL; - } - - printHead(s1,0); - printHead(s2,1); - printHead(s3,2); - - if (tvonscreenCfg.showLogos) - { - printLogo(s1,0); - printLogo(s2,1); - printLogo(s3,2); - } -} -void magazine::showKeys(void) -{ - char txt[100]; - osd->DrawRectangle(Areas[CONTROL_AREA].x1, Areas[CONTROL_AREA].y1, Areas[CONTROL_AREA].x2+1, Areas[CONTROL_AREA].y2+1, clrTransparent); - if (tvonscreenCfg.noInfoLine) - return; - - txt[0]=0; - if (curmode==SHOW) - { - sprintf(txt,"%s",tr("Press 1 for help")); - } - f4->Text(Areas[CONTROL_AREA].x1+(8+45+188*2+184-101-f4->Width(txt))/2,Areas[CONTROL_AREA].y1,txt,clrWhite,clrBackground); -} -void magazine::showTimeline(void) -{ - int lh=-1; - int lhc=0; - tColor hgr[]={clrBlue,clrBlack}; - char dtxt[50]; - time_t t1; - struct tm tm_r1; - - t1=currentFirstTime; - localtime_r(&t1,&tm_r1); - - osd->DrawRectangle(0+Areas[TIMELINE_AREA].x1,0+Areas[TIMELINE_AREA].y1,48,400+TL_YSTART,clrBlack); - for(int i=0;iHeight()+TL_YSTART; - if (lh!=fullHours[i] && fullHours[i]>=0) - { - lh=fullHours[i]; - lhc=lh&1; - } - osd->DrawRectangle(0+Areas[TIMELINE_AREA].x1,y+Areas[TIMELINE_AREA].y1,48,y+f1->Height(),hgr[lhc]); - } - -#if TL_YSTART == 24 - strftime(dtxt,sizeof(dtxt),tr("%d-%m"),&tm_r1); - f3->Text((48-f3->Width(dtxt))/2+Areas[TIMELINE_AREA].x1,0+Areas[TIMELINE_AREA].y1,dtxt,clrWhite,clrBlack); -#else - strcpy(dtxt,WeekDayName(tm_r1.tm_wday)); - osd->DrawRectangle(0+Areas[TIMELINE_AREA].x1,0+Areas[TIMELINE_AREA].y1,Areas[TIMELINE_AREA].x1+48,Areas[TIMELINE_AREA].y1+f3->Height()*2,clrWhite); - osd->DrawRectangle(2+Areas[TIMELINE_AREA].x1,2+Areas[TIMELINE_AREA].y1,Areas[TIMELINE_AREA].x1+48-2,Areas[TIMELINE_AREA].y1+f3->Height(),clrBlack); - f3->Text((48-f3->Width(dtxt))/2+Areas[TIMELINE_AREA].x1,0+Areas[TIMELINE_AREA].y1,dtxt,clrWhite,clrBlack); - strftime(dtxt,sizeof(dtxt),tr("%d-%m"),&tm_r1); - f3->Text((48-f3->Width(dtxt))/2+Areas[TIMELINE_AREA].x1,0+Areas[TIMELINE_AREA].y1+f3->Height(),dtxt,clrBlack,clrWhite); -#endif - for(int i=0;iHeight()+TL_YSTART; - if (fullHours[i]>=0 && lh!=fullHours[i]) - { - char txt[50]; - sprintf(txt,"%02d",fullHours[i]); - lh=fullHours[i]; - f1->Text((48-f1->Width(txt))/2+Areas[TIMELINE_AREA].x1,y+Areas[TIMELINE_AREA].y1,txt,clrWhite,clrBlack); - if (i+1Text((48-f2->Width(txt))/2+Areas[TIMELINE_AREA].x1,y+f1->Height()+Areas[TIMELINE_AREA].y1,txt,clrWhite,clrBlack); - } - } - } -} -void magazine::showSched(const cSchedule *s,cEvent **ev,tMagazineArea area) -{ - cEvent *oldev=NULL,*cev=NULL; - - int j=0; - const char *txt; - cString timetxt; - int lh=-1; - int lhc=0; - - tColor hgr[]={clrGrey,clrBackground}; - tColor col=clrWhite; - - osd->DrawRectangle(Areas[area].x1, Areas[area].y1, Areas[area].x2+1, Areas[area].y2+1, clrGray50); - - for(int i=0;iHeight(); //+24; - if (lh!=fullHours[i] && fullHours[i]>=0) - { - lh=fullHours[i]; - lhc=lh&1; - } - osd->DrawRectangle(Areas[area].x1,Areas[area].y1+y,Areas[area].x1+184,Areas[area].y1+y+f1->Height(),hgr[lhc]); - } - for(int i=0;iHeight(); //+24; - cev=ev[i]; - if (cev!=NULL) - { - if (oldev!=cev) - { - if (oldev) - { - txt=oldev->ShortText(); - int cc=f2->TextHeight(184-f1->Width("00:0"),txt); - if (cc<=i-j) - { - f2->Text(f1->Width("00:0")+Areas[area].x1,(j)*f1->Height()+Areas[area].y1,184-f1->Width("00:0"),i-j,txt,col,clrBackground); - } - } - col=clrWhite; - if (EDIT_curEvent==cev->EventID()) - { - col=clrYellow; - EDIT_curEVI=i; - } - timetxt=cev->GetTimeString(); - txt=cev->Title(); - if (i+f1->TextHeight(f1->Width("00:00 ")+Areas[area].x1,txt)>=evnum) - break; - f1->Text(Areas[area].x1,y+Areas[area].y1,timetxt,col,clrBackground); - j=i+f1->Text(f1->Width("00:00 ")+Areas[area].x1,y+Areas[area].y1,184-f1->Width("00:00 "),20,txt,col,clrBackground); - oldev=cev; - } - } - } - if (oldev) - { - txt=oldev->ShortText(); - if (j+f2->TextHeight(f1->Width("00:00")+Areas[area].x1,txt)>=evnum) - f2->Text(f1->Width("00:0")+Areas[area].x1,j*f1->Height()+Areas[area].y1,184-f1->Width("00:0"),evnum-j,txt,col,clrBackground); - } - if (!EDIT_curEvent) - { - if (!timeline_tested) - { - timeline_tested=true; - cPlugin *p = cPluginManager::GetPlugin("timeline"); - if (p) - { - char *args[]={"timeline_command_interface","conflicts"}; - timeline_found_conflict=p->ProcessArgs(1,args); - } - } - if (timeline_found_conflict) - { - osd->DrawRectangle(Areas[area].x1,Areas[area].y2-f2->Height()-6,Areas[area].x1+184,Areas[area].y2+1,clrWhite); - osd->DrawRectangle(Areas[area].x1,Areas[area].y2-f2->Height()-4,Areas[area].x1+184,Areas[area].y2+1,clrYellow); - const char *txt=tr("Timer conflict!"); - int x=(184-f2->Width(txt))/2; - f2->Text(x+Areas[area].x1,Areas[area].y2-f2->Height()-4,txt,clrBackground,clrYellow); - } - } -} -void magazine::showScheds() -{ - const cSchedule *s1=schedArrayNum>currentFirst?schedArray[currentFirst]:NULL; - const cSchedule *s2=schedArrayNum>currentFirst+1?schedArray[currentFirst+1]:NULL; - const cSchedule *s3=schedArrayNum>currentFirst+2?schedArray[currentFirst+2]:NULL; - - if (s1!=NULL) - { - showSched(s1,ev1,SCHED1_AREA); - } - - if (s2!=NULL) - { - showSched(s2,ev2,SCHED2_AREA); - } - - if (s3!=NULL) - { - showSched(s3,ev3,SCHED3_AREA); - } -} -const cEvent *magazine::getNext(const cSchedule *s,const cEvent *e) -{ - if (e == NULL) - return NULL; - - const cEvent *pe = NULL; - time_t ref = e->StartTime(); - - time_t delta = INT_MAX; - - for (int i=0;i< (s->Events())->Count();i++) - { - const cEvent *p = (s->Events())->Get(i); - if (p!=e) - { - time_t dt = p->StartTime() - ref; - if (dt > 0 && dt < delta) - { - delta = dt; - pe = p; - } - } - } - return pe; -} -const cEvent *magazine::getPrev(const cSchedule *s,const cEvent *e) -{ - if (e == NULL) - return NULL; - - const cEvent *pe = NULL; - time_t ref = e->StartTime(); - time_t delta = INT_MAX; - - - for (int i=0;i< (s->Events())->Count();i++) - { - const cEvent *p = (s->Events())->Get(i); - - if (p!=e) - { - time_t dt = ref - p->StartTime(); - if (dt > 0 && dt < delta) - { - delta = dt; - pe = p; - } - } - } - return pe; -} -void magazine::calcSched(const cSchedule *s,cEvent **ev) -{ - const cEvent *cev=NULL; - const cEvent *cev2=NULL; - int cc=0; - - for(int i=0;iGetEventAround(currentFirstTime); - cev2=NULL; - if (cev) - { - cc=f1->TextHeight(184-f1->Width("00:00 "),cev->Title()); - time_t t=cev->StartTime(); - struct tm tm_r; - localtime_r(&t,&tm_r); - fullHours[i]=tm_r.tm_hour; //mzlog(0," fH[%d]=%d '%s'",i,tm_r.tm_hour,cev->Title()); - } - } - else - { - if (!cev2) - cev2=getNext(s,cev); - if (cev2 && cc--<=1) - { - int z=(cev2->StartTime()-currentFirstTime)*6/60/60; - if (zTextHeight(184-f1->Width("00:00 "),cev->Title()); - time_t t=cev->StartTime(); - - struct tm tm_r; - localtime_r(&t,&tm_r); - fullHours[i]=tm_r.tm_hour; //mzlog(0," fH[%d]=%d '%s'",i,tm_r.tm_hour,cev->Title()); - } - } - } - ev[i]=(cEvent *)cev; - } -} -void magazine::calcScheds() -{ - const cSchedule *s1=schedArrayNum>currentFirst?schedArray[currentFirst]:NULL; - const cSchedule *s2=schedArrayNum>currentFirst+1?schedArray[currentFirst+1]:NULL; - const cSchedule *s3=schedArrayNum>currentFirst+2?schedArray[currentFirst+2]:NULL; - - for(int i=0;i=0) - lfh1=fullHours_tmp1[i]; - fullHours_tmp1[i]=lfh1; - if (fullHours_tmp2[i]>=0) - lfh2=fullHours_tmp2[i]; - fullHours_tmp2[i]=lfh2; - if (fullHours_tmp3[i]>=0) - lfh3=fullHours_tmp3[i]; - fullHours_tmp3[i]=lfh3; - if (fullHours_tmp1[i]>fullHours[i]) - fullHours[i]=fullHours_tmp1[i]; - if (fullHours_tmp2[i]>fullHours[i]) - fullHours[i]=fullHours_tmp2[i]; - if (fullHours_tmp3[i]>fullHours[i]) - fullHours[i]=fullHours_tmp3[i]; - } -} -void magazine::output(void) -{ -/* for (int i=0; i < (int)(sizeof(Areas)/sizeof(tArea)); i++) - { - cBitmap *b=osd->GetBitmap(i); - if (b) - b->Reset(); - } */ - cBitmap *b=osd->GetBitmap(NAMES_AREA); - if (b) - { - b->Reset(); - if (tvonscreenCfg.colorworkaround) - { - // This is an ugly work around for color problems with DVB driver or hardware or vdr handling, who knows - b->SetColor(0,clrTransparent); - b->SetColor(1,clrBlue); - b->SetColor(2,clrWhite); - b->SetColor(3,clrGrey); - b->SetColor(4,0xffff0000); - b->SetColor(5,clrCyan); - for(int i=6;i<128;i++) - { - b->SetColor(i,0x01000000|i); - } - // End work around - } - } -/* for(int i=0; i < (int)(sizeof(Areas)/sizeof(tArea)); i++) - { - cBitmap *b=osd->GetBitmap(i); - int col; - b->Colors(col); - mzlog(5," 1. NumColors(%d):%d",i,col); - } */ - - showHeads(); - showKeys(); - calcScheds(); - showScheds(); - showTimeline(); - -/* for (int i=0; i < (int)(sizeof(Areas)/sizeof(tArea)); i++) - { - cBitmap *b=osd->GetBitmap(i); - int col; - const tColor *tc=b->Colors(col); - mzlog(5," 2. NumColors(%d):%d",i,col); - if (i==NAMES_AREA) - { - for(int j=0;jFlush(); -} -void magazine::outputLR(void) -{ -/* for (int i=0; i < (int)(sizeof(Areas)/sizeof(tArea)); i++) - { - cBitmap *b=osd->GetBitmap(i); - if (b) - b->Reset(); - } */ - cBitmap *b=osd->GetBitmap(NAMES_AREA); - if (b) - { - b->Reset(); - if (tvonscreenCfg.colorworkaround) - { - // This is an ugly work around for color problems with DVB driver or hardware or vdr handling, who knows - b->SetColor(0,clrTransparent); - b->SetColor(1,clrBlue); - b->SetColor(2,clrWhite); - b->SetColor(3,clrGrey); - b->SetColor(4,0xffff0000); - b->SetColor(5,clrCyan); - for(int i=6;i<128;i++) - { - b->SetColor(i,0x01000000|i); - } - // End work around - } - } - - showHeads(); - calcScheds(); - searchcEvt(); - showScheds(); - showTimeline(); - - osd->Flush(); -} -void magazine::gotoUsertime(int u) -{ - struct tm tm_r; - localtime_r(¤tFirstTime,&tm_r); - tm_r.tm_hour=u/100; - tm_r.tm_min=u%100; - tm_r.tm_sec=0; - currentFirstTime=mktime(&tm_r); - if (currentFirstTimeHeight(); - int width=184; - - char *helptext[]={ - "NORMAL MODE:", - "arrows\n\tmove view", - "back\n\tclose TV OnScreen", - "red/blue\n\t-/+ one day", - "green/yellow\n\tone page left/right", - "7/9\n\tone page left/right", - "8\n\tgoto current channel", - "0\n\tgoto now", - "4/5/6\n\tgoto configured time", - "ok\n\tswitch to edit mode\n", - "EDIT MODE:", - "back\n\tback to normal mode", - "arrows\n\tmove selected schedule", - "record\n\tcreate timer", - "ok\n\tshow details", - "|\n(c) 2004 Jürgen Schmitz\n\thttp://www.js-home.org/vdr", - NULL - }; - - int area=SCHED1_AREA; - - osd->DrawRectangle(Areas[SCHED1_AREA].x1, Areas[SCHED1_AREA].y1+1, Areas[SCHED1_AREA].x2+1, Areas[SCHED1_AREA].y2+1, clrGrey); - osd->DrawRectangle(Areas[SCHED2_AREA].x1, Areas[SCHED2_AREA].y1+1, Areas[SCHED2_AREA].x2+1, Areas[SCHED2_AREA].y2+1, clrGrey); - osd->DrawRectangle(Areas[SCHED3_AREA].x1, Areas[SCHED3_AREA].y1+1, Areas[SCHED3_AREA].x2+1, Areas[SCHED3_AREA].y2+1, clrGrey); - - osd->DrawRectangle(Areas[SCHED1_AREA].x1+2, Areas[SCHED1_AREA].y1, Areas[SCHED1_AREA].x2+1-3, Areas[SCHED1_AREA].y2+1-3, clrGray50); - osd->DrawRectangle(Areas[SCHED2_AREA].x1+2, Areas[SCHED2_AREA].y1, Areas[SCHED2_AREA].x2+1-3, Areas[SCHED2_AREA].y2+1-3, clrGray50); - osd->DrawRectangle(Areas[SCHED3_AREA].x1+2, Areas[SCHED3_AREA].y1, Areas[SCHED3_AREA].x2+1-3, Areas[SCHED3_AREA].y2+1-3, clrGray50); - - osd->DrawRectangle(0+Areas[TIMELINE_AREA].x1,0+Areas[TIMELINE_AREA].y1+TL_YSTART,Areas[TIMELINE_AREA].x1+48,Areas[TIMELINE_AREA].y1+400+TL_YSTART,clrBlack); - showHeads(true); -// osd->Flush(); - - do - { - for(int i=0;iHeight(); - if (helptext[j]==NULL) - break; - if (helptext[j][0]=='|') - txt=helptext[j]+1; - else - txt=tr(helptext[j]); - - if (i+usef->TextHeight(width,txt)>=lines) - break; - - i+=usef->Text(Areas[area].x1+4,y+Areas[area].y1,width-8,lines-i,txt,clrWhite,clrBackground); - j++; - } - if (area==SCHED1_AREA) - area=SCHED2_AREA; - else if (area==SCHED2_AREA) - area=SCHED3_AREA; - else if (area==SCHED3_AREA) - break; - } - while (helptext[j]); - osd->Flush(); -} - -void magazine::autoTimer(const class cEvent *cev) -{ - FILE *f; - if ((f=fopen(tvonscreenCfg.vdradminfile,"a"))) - { - const char *title; - int chan; - - title=cev->Title(); - cChannel *cc=Channels.GetByChannelID(cev->ChannelID()); - chan=cc->Number(); - - fprintf(f,"1:%s:1:::1:40:7:%d:\n",title,chan); - fclose(f); - } -} - -#if VDRVERSNUM < 10503 -#include "fontosd/fontosd-arial18.c" -#include "fontosd/fontosd-verdana16.c" -#include "fontosd/fontosd-tahoma16.c" -#include "fontosd/fontosd-timesNewRoman16.c" -#endif - -void magazine::Show(void) -{ - mzlog(10," magazine::Show()"); - - if (me) - { - delete me; - me=NULL; - } - if (met) - { - delete met; - met=NULL; - } - if (mes) - { - delete mes; - mes=NULL; - } - - osd = cOsdProvider::NewOsd(((Setup.OSDWidth - 612) / 2) + Setup.OSDLeft, ((Setup.OSDHeight - 436) / 2) + Setup.OSDTop); - if (osd && !osd->SetAreas(Areas, sizeof(Areas)/sizeof(tArea))) - { - delete [] fullHours; - delete [] ev1; - delete [] ev2; - delete [] ev3; - - delete f1; - delete f2; - delete f3; - delete f4; - -#if VDRVERSNUM >= 10503 - f1=new anyFont(osd,18,1); // Sendung - f2=new anyFont(osd,16,1); // Extra-Info - f3=new anyFont(osd,20,1); // Sender - f4=new anyFont(osd,16); // Tasten -#else - f1=new anyFont(osd,(cFont::tPixelData *)fontosd_arial18,FONTOSD_ARIAL18,1); // Sendung - f2=new anyFont(osd,(cFont::tPixelData *)fontosd_verdana16,FONTOSD_VERDANA16,1); // Extra-Info - f3=new anyFont(osd,(cFont::tPixelData *)fontosd_tahoma16,FONTOSD_TAHOMA16,1); // Sender - f4=new anyFont(osd,(cFont::tPixelData *)fontosd_newroman16,FONTOSD_NEWROMAN16); // Tasten -#endif - for (int i=0; i < (int)(sizeof(Areas)/sizeof(tArea)); i++) - { -// cBitmap *b=osd->GetBitmap(i); -// if (b) -// b->Reset(); - osd->DrawRectangle(Areas[i].x1, Areas[i].y1, Areas[i].x2+1, Areas[i].y2+1, clrGray50); - } - evnum=(Areas[SCHED1_AREA].y2-Areas[SCHED1_AREA].y1)/f1->Height(); - - ev1=new cEvent*[evnum]; - ev2=new cEvent*[evnum]; - ev3=new cEvent*[evnum]; - - fullHours=new int[evnum]; - fullHours_tmp1=new int[evnum]; - fullHours_tmp2=new int[evnum]; - fullHours_tmp3=new int[evnum]; - - output(); - } -} -cEvent **magazine::ev4ch(int p) -{ - cEvent **ev=NULL; - if (p==currentFirst) - ev=ev1; - else if (p==currentFirst+1) - ev=ev2; - if (p==currentFirst+2) - ev=ev3; - return ev; -} -void magazine::searchcEvt(void) -{ - cEvent **ev=ev4ch(EDIT_curChannel); - for(int i=EDIT_curEVI;i>=0;i--) - { - if (ev[i]) - { - EDIT_curEvent=ev[i]->EventID(); - break; - } - } -} -eOSState magazine::ProcessKey(eKeys Key) -{ - //mzlog(10," ProcessKey(%d)",Key); - eOSState state; - if (me) - { - state=me->ProcessKey(Key); - if (state==osBack) - { - state=osContinue; - delete me; - me=NULL; - if (!osd) - Show(); - } - else if (state == osUnknown || state == osContinue) - { - switch (Key & ~k_Repeat) - { - case kOk: - case kBack: - delete me; - me=NULL; - if (!osd) - Show(); - break; - case kBlue: // Umschalten - obsolete! - { - cEvent **ev=ev4ch(EDIT_curChannel); - cChannel *channel = Channels.GetByChannelID(ev[EDIT_curEVI]->ChannelID(), true); - if (channel && cDevice::PrimaryDevice()->SwitchChannel(channel, true)) - { - delete me; - me=NULL; - return osEnd; - } - } - break; - case kGreen: // Suchen - { -// mzlog(10," Search"); - delete me; - me=NULL; - cEvent **ev=ev4ch(EDIT_curChannel); - mes=new cSearchMenu(ev[EDIT_curEVI]); - state=osContinue; - } - break; - case kYellow: // add AutoTimer - { -// mzlog(10," AutoTimer"); - if (tvonscreenCfg.vdradminfile) - { - me->helpLine(false); - state=osContinue; - - cEvent **ev=ev4ch(EDIT_curChannel); - autoTimer(ev[EDIT_curEVI]); - me->printMsg(tr("Added AutoTimer to vdradmin.")); - } - else - { - me->printMsg(tr("Startoption 'vdradminfile' not set!")); - me->helpLine(false); - state=osContinue; - } - } - break; - case kRed: - case kRecord: // new - { - delete me; - me=NULL; - cEvent **ev=ev4ch(EDIT_curChannel); - cTimer *timer = new cTimer(ev[EDIT_curEVI]); - cTimer *t = Timers.GetTimer(timer); - if (t) - { - delete timer; - timer = t; - } - met=new cMenuEditTimer(timer, !t); - met->Display(); - state=osContinue; - } - break; - } - } - } - else if (met) - { - state=met->ProcessKey(Key); - if (state==osBack) - { - state=osContinue; - delete met; - met=NULL; - if (!osd) - Show(); - } - else if (state == osUnknown) - { - switch (Key & ~k_Repeat) - { - case kOk: - case kBack: - delete met; - met=NULL; - if (!osd) - Show(); - break; - } - } - } - else if (mes) - { - state=mes->ProcessKey(Key); - if (state==osBack) - { - state=osContinue; - delete mes; - mes=NULL; - if (!osd) - Show(); - } - else if (state == osUnknown) - { - switch (Key & ~k_Repeat) - { - case kOk: - case kGreen: - { - const cEvent *ev=mes->currentSelected(); - if (ev) - { - delete mes; - mes=NULL; - me=new tvOcMenuEvent(ev); - me->Display(); - } - } - state=osContinue; - break; - case kYellow: - mes->searchIn(schedArray,schedArrayNum); - state=osContinue; - break; - case kBack: - case kBlue: - delete mes; - mes=NULL; - if (!osd) - Show(); - break; - case kRed: - const cEvent *ev=mes->currentSelected(); - if (ev) - { - delete mes; - mes=NULL; - cTimer *timer = new cTimer(ev); - cTimer *t = Timers.GetTimer(timer); - if (t) - { - delete timer; - timer = t; - } - met=new cMenuEditTimer(timer, !t); - met->Display(); - } - state=osContinue; - break; - } - } - } - else - { - state = cOsdObject::ProcessKey(Key); - - if (state == osUnknown && schedArrayNum>currentFirst) - { - if (curmode==SHOW) - { - switch (Key & ~k_Repeat) - { - case kOk: - if (schedArrayNum>currentFirst) - { - curmode=EDIT; - EDIT_curChannel=currentFirst; - for(int i=0;iEventID(); - break; - } - } - output(); - } - break; - case kBack: - return osBack; - case kLeft: - currentFirst--; - if (currentFirst<0) - currentFirst=0; - output(); - break; - case kRight: - currentFirst++; - if (currentFirst>schedArrayNum-3) - currentFirst=schedArrayNum-3; - if (currentFirst<0) - currentFirst=0; - output(); - break; - case kUp: - currentFirstTime-=60*30; - if (currentFirstTimeschedArrayNum-3) - currentFirst=schedArrayNum-3; - if (currentFirst<0) - currentFirst=0; - output(); - break; - case k8: // zum aktuellen Sender - { - int currentChannel = Channels.GetByNumber(cDevice::CurrentChannel())->Number(); - for(int i=0;iChannelID(), true); - if (channel->Number()==currentChannel) - { - currentFirst=i-1; - if (currentFirst<0) - currentFirst=0; - output(); - break; - } - } - } - break; - case k0: // jetzt - currentFirstTime=time(NULL); - output(); - break; - case k1: - showHelp(); - break; - case k4: // usertime1 - gotoUsertime(tvonscreenCfg.usertime1); - break; - case k5: // usertime2 - gotoUsertime(tvonscreenCfg.usertime2); - break; - case k6: // usertime3 - gotoUsertime(tvonscreenCfg.usertime3); - break; - /* case k0: - break; - case k1: - break; - case k2: - break; - case k3: - break; - case k4: - break; - case k5: - break; - case k6: - break; - case k8: - break; */ - default: - return state; - } - } - else - { - switch (Key & ~k_Repeat) - { - case kOk: - { - cEvent **ev=ev4ch(EDIT_curChannel); - if (ev[EDIT_curEVI] != NULL) - { - delete osd; - osd=NULL; - me=new tvOcMenuEvent(ev[EDIT_curEVI]); - me->Display(); - curmode=SHOW; - EDIT_curEvent=0; - return osContinue; - } - } - break; - case kBack: - curmode=SHOW; - EDIT_curEvent=0; - output(); - break; - case kLeft: - EDIT_curChannel--; - if (EDIT_curChannel<0) - EDIT_curChannel=0; - if (EDIT_curChannelschedArrayNum-1) - EDIT_curChannel=schedArrayNum-1; - if (EDIT_curChannel<0) - EDIT_curChannel=0; - if (EDIT_curChannel>currentFirst+2) - { - currentFirst++; - if (currentFirst>schedArrayNum-3) - currentFirst=schedArrayNum-3; - if (currentFirst<0) - currentFirst=0; - EDIT_curChannel=currentFirst+2; - } - outputLR(); - break; - case kUp: - { - cEvent **ev=ev4ch(EDIT_curChannel); - const cEvent *e=getPrev(schedArray[EDIT_curChannel],ev[EDIT_curEVI]); - - if (e) - { - int found; - do - { - found=0; - for(int i=0;iEventID()==e->EventID()) - { - found=1; - EDIT_curEvent=e->EventID(); - } - } - if (!found) - { - currentFirstTime-=60*30; - if (currentFirstTimeEventID(); - int found,cc=0; - do - { - found=0; - cc++; - for(int i=0;iEventID()==EDIT_curEvent) - { - found=1; - } - } - if (!found) - { - currentFirstTime+=60*30; - calcScheds(); - } - } - while (!found && cc<48); - } - output(); - } - break; -/* case kRed: - break; - case kBlue: - break; - case kGreen: - break; - case kYellow: - break; */ - /* case k0: - break; - case k1: - break; - case k2: - break; - case k3: - break; - case k4: - break; - case k5: - break; - case k6: - break; - case k7: - break; - case k8: - break; - case k9: - break; */ - case kRecord: - { - cEvent **ev=ev4ch(EDIT_curChannel); - if (ev[EDIT_curEVI] != NULL) - { - delete osd; - osd=NULL; - cTimer *timer = new cTimer(ev[EDIT_curEVI]); - cTimer *t = Timers.GetTimer(timer); - if (t) - { - delete timer; - timer = t; - } - met=new cMenuEditTimer(timer, !t); - } - } - break; - default: - return state; - } - } - state = osContinue; - } - } - return state; -} - -#include - -void mzlog(int level, const char *fmt, ...) -{ - auto char t[BUFSIZ]; - auto va_list ap; - int minlevel=0; - - va_start(ap, fmt); - - if (level>=minlevel) - { - vsnprintf(t + 10, sizeof t - 10, fmt, ap); - memcpy(t, "tvonscreen: ", 10); - syslog(LOG_DEBUG, "%s", t); - } - va_end(ap); -} diff --git a/magazine.cpp b/magazine.cpp new file mode 100644 index 0000000..8dcf801 --- /dev/null +++ b/magazine.cpp @@ -0,0 +1,1415 @@ +/* + * magazine.c + * + * See the README file for copyright information and how to reach the author. + * + * $Id: magazine.c,v 1.34 2006/06/18 13:59:36 schmitzj Exp $ + * + */ + +#include "magazine.h" +#include "TVonscreen.h" + +#define clrGrey 0xFF5F5F5F +#define clrBackground clrGray50 // this should be tied somehow into current theme + +static tArea Areas[NUMBER_OF_AREAS] = +{ +#ifndef MULTINAMES + { 8+45, 0, 8+45 + 188*2+184 - 1, 0 + 48/*20*/ - 1, 8 }, // NAMES_AREA +#else + { 8+45, 0, 8+45 + 184 - 1, 0 + 48/*20*/ - 1, 4 }, // NAME1_AREA + { 8+45+188, 0, 8+45+188 + 184 - 1, 0 + 48/*20*/ - 1, 4 }, // NAME2_AREA + { 8+45+188*2, 0, 8+45+188*2 + 184 - 1, 0 + 48/*20*/ - 1, 4 }, // NAME3_AREA +#endif + { 0, 0, 0 + 8+40 - 1, TL_YSTART + 384 - 1, 2 }, // TIMELINE_AREA + { 8+45, TL_YSTART, 8+45 + 184 - 1, TL_YSTART + 384 - 1, 2 }, // SCHED1_AREA + { 8+45+188, TL_YSTART, 8+45+188 + 184 - 1, TL_YSTART + 384 - 1, 2 }, // SCHED2_AREA + { 8+45+188*2, TL_YSTART, 8+45+188*2 + 184 - 1, TL_YSTART + 384 - 1, 2 }, // SCHED3_AREA + { 50, 384+TL_YSTART+8, 50 + 8+45+188*2+184-101 - 1, 384+TL_YSTART+8 + 20 - 1, 2 }, // CONTROL_AREA +}; + +static int CompareSchedules(const void *p1, const void *p2) { + + int c1nr = 9999; // there should be no one with more than 9999 channels + int c2nr = 9999; + + cChannel* c1 = Channels.GetByChannelID((*(const cSchedule**)p1)->ChannelID(), true); + if (c1) + c1nr = c1->Number(); + + cChannel* c2 = Channels.GetByChannelID((*(const cSchedule**)p2)->ChannelID(), true); + if (c2) + c2nr = c2->Number(); + + return c1nr - c2nr; +} + + +magazine::magazine(class cPlugin *p) +{ + parent=p; + const cSchedules* Schedules = cSchedules::Schedules(_schedulesLock); + + curmode=SHOW; + EDIT_curEvent=0; + + f1=NULL; + f2=NULL; + f3=NULL; + f4=NULL; + me=NULL; + met=NULL; + mes=NULL; + + timeline_tested=false; + timeline_found_conflict=false; + + // Create and sort entries for menu items + // -------------------------------------- + + const cSchedule* Schedule = Schedules->First(); + + int num = 0; + schedArray = NULL; + while (Schedule) + { + schedArray = (const cSchedule **)realloc(schedArray, (num + 1) * sizeof(cSchedule*)); + + if (Schedule->GetPresentEvent()) + { // if there exist an event -> add to array + // check if we can get a channel NAME ( XXX ) + // I thougt that this must always work , but doesn't + cChannel *c = Channels.GetByChannelID(Schedule->ChannelID(), true); + if (c) + { + schedArray[num] = Schedule; + ++num; + } + } + Schedule = (const cSchedule*)Schedules->Next(Schedule); + } + schedArrayNum=num; + qsort(schedArray, num, sizeof(cSchedule*), CompareSchedules); + currentFirst=0; + + int currentChannel = Channels.GetByNumber(cDevice::CurrentChannel())->Number(); + for(int i=0;iChannelID(), true); + if (channel->Number()==currentChannel) + { + currentFirst=i-1; + if (currentFirst<0) + currentFirst=0; + break; + } + } + + ev1=NULL; + ev2=NULL; + ev3=NULL; + fullHours=NULL; + fullHours_tmp1=NULL; + fullHours_tmp2=NULL; + fullHours_tmp3=NULL; + + currentFirstTime=time(NULL); +} +magazine::~magazine(void) +{ + if (me) + { + delete me; + me=NULL; + } + if (met) + { + delete met; + met=NULL; + } + if (mes) + { + delete mes; + mes=NULL; + } + + delete [] fullHours_tmp3; + delete [] fullHours_tmp2; + delete [] fullHours_tmp1; + delete [] fullHours; + delete [] ev1; + delete [] ev2; + delete [] ev3; + + delete f1; + delete f2; + delete f3; + delete f4; + + free(schedArray); + delete osd; +} +void magazine::printLogo(const cSchedule *s,int p) +{ + cChannel* channel; + const char *txt; + int x=184*p+p*4; + int currentChannel; + +#ifdef MULTINAMES + int a=0; + switch (p) + { + case 0: + default: + a=NAME1_AREA; + break; + case 1: + a=NAME2_AREA; + break; + case 2: + a=NAME3_AREA; + break; + } + x=0; +#else + int a=NAMES_AREA; +#endif + if (s!=NULL) + { + currentChannel = Channels.GetByNumber(cDevice::CurrentChannel())->Number(); + channel = Channels.GetByChannelID(s->ChannelID(), true); + txt=channel->ShortName(true); + // logo: 64x48px + + const char *ConfigDirectory=cPlugin::ConfigDirectory("logos"); + if (tvonscreenCfg.logos) + ConfigDirectory=tvonscreenCfg.logos; + char *fname=new char[strlen(ConfigDirectory) + 1 + strlen(txt) + strlen(".xpm") + 1]; + sprintf(fname,"%s/%s.xpm",ConfigDirectory,txt); + DrawXpm(fname,osd,x+Areas[a].x1,Areas[a].y1,0,tvonscreenCfg.bwlogos); + } +} +void magazine::printHead(const cSchedule *s,int p) +{ + cChannel* channel; + const char *txt; + int x=184*p+p*4; + int currentChannel; + int wmin=0,yoff=0; + + if (tvonscreenCfg.showLogos) + wmin=64; + +#ifdef MULTINAMES + int a; + switch (p) + { + case 0: + default: + a=NAME1_AREA; + break; + case 1: + a=NAME2_AREA; + break; + case 2: + a=NAME3_AREA; + break; + } + x=0; +#else + int a=NAMES_AREA; +#endif +#if TL_YSTART == 48 + yoff=28; + osd->DrawRectangle(x+Areas[a].x1,0+Areas[a].y1+0,x+Areas[a].x1+188,Areas[a].y1+48,clrTransparent); + osd->DrawEllipse(x+Areas[a].x1+182-28,0+Areas[a].y1,x+Areas[a].x1+182,Areas[a].y1+28,clrGrey,1); + osd->DrawEllipse(x+Areas[a].x1+182-28-2,0+Areas[a].y1+2,x+Areas[a].x1+182-2,Areas[a].y1+28+2,clrTransparent,1); + + osd->DrawEllipse(x+Areas[a].x1,Areas[a].y1,x+Areas[a].x1+28,Areas[a].y1+28,clrGrey,2); + osd->DrawEllipse(x+Areas[a].x1+2,Areas[a].y1+2,x+Areas[a].x1+28+2,Areas[a].y1+28+2,clrTransparent,2); + + osd->DrawRectangle(x+Areas[a].x1+28,0+Areas[a].y1,x+Areas[a].x1+182-28,Areas[a].y1+2,clrGrey); + osd->DrawRectangle(x+Areas[a].x1+182-2,0+Areas[a].y1+28,x+Areas[a].x1+182,Areas[a].y1+28+20,clrGrey); + osd->DrawRectangle(x+Areas[a].x1,0+Areas[a].y1+28,x+Areas[a].x1+2,Areas[a].y1+28+20,clrGrey); // nie zu sehen, außer wenn kein Logo gefunden wird + + if (p==2) DrawXpm(TVonscreen,osd,x+Areas[a].x1+182-110,0+Areas[a].y1); + + if (tvonscreenCfg.showChannels || !tvonscreenCfg.showLogos) +#endif + osd->DrawRectangle(x+Areas[a].x1,yoff+Areas[a].y1,x+Areas[a].x1+182,Areas[a].y1+20+yoff,clrBlue); + + if (tvonscreenCfg.showChannels || !tvonscreenCfg.showLogos) + { + if (s!=NULL) + { + tColor col=clrWhite; + + currentChannel = Channels.GetByNumber(cDevice::CurrentChannel())->Number(); + channel = Channels.GetByChannelID(s->ChannelID(), true); + if (currentChannel==channel->Number()) + { + col=clrCyan; + } + txt=channel->ShortName(true); + + if (!tvonscreenCfg.XLfonts || f3->LargeWidth(txt)>=184-wmin) + f3->Text(wmin+x+Areas[a].x1+(184-wmin-f3->Width(txt))/2,Areas[a].y1+yoff-1,txt,col,clrBlue); + else + f3->LargeText(wmin+x+Areas[a].x1+(184-wmin-f3->LargeWidth(txt))/2,Areas[a].y1+yoff-1,txt,col,clrBlue); + } + } +} +void magazine::showHeads(bool onlyBG) +{ + const cSchedule *s1=NULL,*s2=NULL,*s3=NULL; + + if (!onlyBG) + { + s1=schedArrayNum>currentFirst?schedArray[currentFirst]:NULL; + s2=schedArrayNum>currentFirst+1?schedArray[currentFirst+1]:NULL; + s3=schedArrayNum>currentFirst+2?schedArray[currentFirst+2]:NULL; + } + + printHead(s1,0); + printHead(s2,1); + printHead(s3,2); + + if (tvonscreenCfg.showLogos) + { + printLogo(s1,0); + printLogo(s2,1); + printLogo(s3,2); + } +} +void magazine::showKeys(void) +{ + char txt[100]; + osd->DrawRectangle(Areas[CONTROL_AREA].x1, Areas[CONTROL_AREA].y1, Areas[CONTROL_AREA].x2+1, Areas[CONTROL_AREA].y2+1, clrTransparent); + if (tvonscreenCfg.noInfoLine) + return; + + txt[0]=0; + if (curmode==SHOW) + { + sprintf(txt,"%s",tr("Press 1 for help")); + } + f4->Text(Areas[CONTROL_AREA].x1+(8+45+188*2+184-101-f4->Width(txt))/2,Areas[CONTROL_AREA].y1,txt,clrWhite,clrBackground); +} +void magazine::showTimeline(void) +{ + int lh=-1; + int lhc=0; + tColor hgr[]={clrBlue,clrBlack}; + char dtxt[50]; + time_t t1; + struct tm tm_r1; + + t1=currentFirstTime; + localtime_r(&t1,&tm_r1); + + osd->DrawRectangle(0+Areas[TIMELINE_AREA].x1,0+Areas[TIMELINE_AREA].y1,48,400+TL_YSTART,clrBlack); + for(int i=0;iHeight()+TL_YSTART; + if (lh!=fullHours[i] && fullHours[i]>=0) + { + lh=fullHours[i]; + lhc=lh&1; + } + osd->DrawRectangle(0+Areas[TIMELINE_AREA].x1,y+Areas[TIMELINE_AREA].y1,48,y+f1->Height(),hgr[lhc]); + } + +#if TL_YSTART == 24 + strftime(dtxt,sizeof(dtxt),tr("%d-%m"),&tm_r1); + f3->Text((48-f3->Width(dtxt))/2+Areas[TIMELINE_AREA].x1,0+Areas[TIMELINE_AREA].y1,dtxt,clrWhite,clrBlack); +#else + strcpy(dtxt,WeekDayName(tm_r1.tm_wday)); + osd->DrawRectangle(0+Areas[TIMELINE_AREA].x1,0+Areas[TIMELINE_AREA].y1,Areas[TIMELINE_AREA].x1+48,Areas[TIMELINE_AREA].y1+f3->Height()*2,clrWhite); + osd->DrawRectangle(2+Areas[TIMELINE_AREA].x1,2+Areas[TIMELINE_AREA].y1,Areas[TIMELINE_AREA].x1+48-2,Areas[TIMELINE_AREA].y1+f3->Height(),clrBlack); + f3->Text((48-f3->Width(dtxt))/2+Areas[TIMELINE_AREA].x1,0+Areas[TIMELINE_AREA].y1,dtxt,clrWhite,clrBlack); + strftime(dtxt,sizeof(dtxt),tr("%d-%m"),&tm_r1); + f3->Text((48-f3->Width(dtxt))/2+Areas[TIMELINE_AREA].x1,0+Areas[TIMELINE_AREA].y1+f3->Height(),dtxt,clrBlack,clrWhite); +#endif + for(int i=0;iHeight()+TL_YSTART; + if (fullHours[i]>=0 && lh!=fullHours[i]) + { + char txt[50]; + sprintf(txt,"%02d",fullHours[i]); + lh=fullHours[i]; + f1->Text((48-f1->Width(txt))/2+Areas[TIMELINE_AREA].x1,y+Areas[TIMELINE_AREA].y1,txt,clrWhite,clrBlack); + if (i+1Text((48-f2->Width(txt))/2+Areas[TIMELINE_AREA].x1,y+f1->Height()+Areas[TIMELINE_AREA].y1,txt,clrWhite,clrBlack); + } + } + } +} +void magazine::showSched(const cSchedule *s,cEvent **ev,tMagazineArea area) +{ + cEvent *oldev=NULL,*cev=NULL; + + int j=0; + const char *txt; + cString timetxt; + int lh=-1; + int lhc=0; + + tColor hgr[]={clrGrey,clrBackground}; + tColor col=clrWhite; + + osd->DrawRectangle(Areas[area].x1, Areas[area].y1, Areas[area].x2+1, Areas[area].y2+1, clrGray50); + + for(int i=0;iHeight(); //+24; + if (lh!=fullHours[i] && fullHours[i]>=0) + { + lh=fullHours[i]; + lhc=lh&1; + } + osd->DrawRectangle(Areas[area].x1,Areas[area].y1+y,Areas[area].x1+184,Areas[area].y1+y+f1->Height(),hgr[lhc]); + } + for(int i=0;iHeight(); //+24; + cev=ev[i]; + if (cev!=NULL) + { + if (oldev!=cev) + { + if (oldev) + { + txt=oldev->ShortText(); + int cc=f2->TextHeight(184-f1->Width("00:0"),txt); + if (cc<=i-j) + { + f2->Text(f1->Width("00:0")+Areas[area].x1,(j)*f1->Height()+Areas[area].y1,184-f1->Width("00:0"),i-j,txt,col,clrBackground); + } + } + col=clrWhite; + if (EDIT_curEvent==cev->EventID()) + { + col=clrYellow; + EDIT_curEVI=i; + } + timetxt=cev->GetTimeString(); + txt=cev->Title(); + if (i+f1->TextHeight(f1->Width("00:00 ")+Areas[area].x1,txt)>=evnum) + break; + f1->Text(Areas[area].x1,y+Areas[area].y1,timetxt,col,clrBackground); + j=i+f1->Text(f1->Width("00:00 ")+Areas[area].x1,y+Areas[area].y1,184-f1->Width("00:00 "),20,txt,col,clrBackground); + oldev=cev; + } + } + } + if (oldev) + { + txt=oldev->ShortText(); + if (j+f2->TextHeight(f1->Width("00:00")+Areas[area].x1,txt)>=evnum) + f2->Text(f1->Width("00:0")+Areas[area].x1,j*f1->Height()+Areas[area].y1,184-f1->Width("00:0"),evnum-j,txt,col,clrBackground); + } + if (!EDIT_curEvent) + { + if (!timeline_tested) + { + timeline_tested=true; + cPlugin *p = cPluginManager::GetPlugin("timeline"); + if (p) + { + char *args[]={"timeline_command_interface","conflicts"}; + timeline_found_conflict=p->ProcessArgs(1,args); + } + } + if (timeline_found_conflict) + { + osd->DrawRectangle(Areas[area].x1,Areas[area].y2-f2->Height()-6,Areas[area].x1+184,Areas[area].y2+1,clrWhite); + osd->DrawRectangle(Areas[area].x1,Areas[area].y2-f2->Height()-4,Areas[area].x1+184,Areas[area].y2+1,clrYellow); + const char *txt=tr("Timer conflict!"); + int x=(184-f2->Width(txt))/2; + f2->Text(x+Areas[area].x1,Areas[area].y2-f2->Height()-4,txt,clrBackground,clrYellow); + } + } +} +void magazine::showScheds() +{ + const cSchedule *s1=schedArrayNum>currentFirst?schedArray[currentFirst]:NULL; + const cSchedule *s2=schedArrayNum>currentFirst+1?schedArray[currentFirst+1]:NULL; + const cSchedule *s3=schedArrayNum>currentFirst+2?schedArray[currentFirst+2]:NULL; + + if (s1!=NULL) + { + showSched(s1,ev1,SCHED1_AREA); + } + + if (s2!=NULL) + { + showSched(s2,ev2,SCHED2_AREA); + } + + if (s3!=NULL) + { + showSched(s3,ev3,SCHED3_AREA); + } +} +const cEvent *magazine::getNext(const cSchedule *s,const cEvent *e) +{ + if (e == NULL) + return NULL; + + const cEvent *pe = NULL; + time_t ref = e->StartTime(); + + time_t delta = INT_MAX; + + for (int i=0;i< (s->Events())->Count();i++) + { + const cEvent *p = (s->Events())->Get(i); + if (p!=e) + { + time_t dt = p->StartTime() - ref; + if (dt > 0 && dt < delta) + { + delta = dt; + pe = p; + } + } + } + return pe; +} +const cEvent *magazine::getPrev(const cSchedule *s,const cEvent *e) +{ + if (e == NULL) + return NULL; + + const cEvent *pe = NULL; + time_t ref = e->StartTime(); + time_t delta = INT_MAX; + + + for (int i=0;i< (s->Events())->Count();i++) + { + const cEvent *p = (s->Events())->Get(i); + + if (p!=e) + { + time_t dt = ref - p->StartTime(); + if (dt > 0 && dt < delta) + { + delta = dt; + pe = p; + } + } + } + return pe; +} +void magazine::calcSched(const cSchedule *s,cEvent **ev) +{ + const cEvent *cev=NULL; + const cEvent *cev2=NULL; + int cc=0; + + for(int i=0;iGetEventAround(currentFirstTime); + cev2=NULL; + if (cev) + { + cc=f1->TextHeight(184-f1->Width("00:00 "),cev->Title()); + time_t t=cev->StartTime(); + struct tm tm_r; + localtime_r(&t,&tm_r); + fullHours[i]=tm_r.tm_hour; //mzlog(0," fH[%d]=%d '%s'",i,tm_r.tm_hour,cev->Title()); + } + } + else + { + if (!cev2) + cev2=getNext(s,cev); + if (cev2 && cc--<=1) + { + int z=(cev2->StartTime()-currentFirstTime)*6/60/60; + if (zTextHeight(184-f1->Width("00:00 "),cev->Title()); + time_t t=cev->StartTime(); + + struct tm tm_r; + localtime_r(&t,&tm_r); + fullHours[i]=tm_r.tm_hour; //mzlog(0," fH[%d]=%d '%s'",i,tm_r.tm_hour,cev->Title()); + } + } + } + ev[i]=(cEvent *)cev; + } +} +void magazine::calcScheds() +{ + const cSchedule *s1=schedArrayNum>currentFirst?schedArray[currentFirst]:NULL; + const cSchedule *s2=schedArrayNum>currentFirst+1?schedArray[currentFirst+1]:NULL; + const cSchedule *s3=schedArrayNum>currentFirst+2?schedArray[currentFirst+2]:NULL; + + for(int i=0;i=0) + lfh1=fullHours_tmp1[i]; + fullHours_tmp1[i]=lfh1; + if (fullHours_tmp2[i]>=0) + lfh2=fullHours_tmp2[i]; + fullHours_tmp2[i]=lfh2; + if (fullHours_tmp3[i]>=0) + lfh3=fullHours_tmp3[i]; + fullHours_tmp3[i]=lfh3; + if (fullHours_tmp1[i]>fullHours[i]) + fullHours[i]=fullHours_tmp1[i]; + if (fullHours_tmp2[i]>fullHours[i]) + fullHours[i]=fullHours_tmp2[i]; + if (fullHours_tmp3[i]>fullHours[i]) + fullHours[i]=fullHours_tmp3[i]; + } +} +void magazine::output(void) +{ +/* for (int i=0; i < (int)(sizeof(Areas)/sizeof(tArea)); i++) + { + cBitmap *b=osd->GetBitmap(i); + if (b) + b->Reset(); + } */ + cBitmap *b=osd->GetBitmap(NAMES_AREA); + if (b) + { + b->Reset(); + if (tvonscreenCfg.colorworkaround) + { + // This is an ugly work around for color problems with DVB driver or hardware or vdr handling, who knows + b->SetColor(0,clrTransparent); + b->SetColor(1,clrBlue); + b->SetColor(2,clrWhite); + b->SetColor(3,clrGrey); + b->SetColor(4,0xffff0000); + b->SetColor(5,clrCyan); + for(int i=6;i<128;i++) + { + b->SetColor(i,0x01000000|i); + } + // End work around + } + } +/* for(int i=0; i < (int)(sizeof(Areas)/sizeof(tArea)); i++) + { + cBitmap *b=osd->GetBitmap(i); + int col; + b->Colors(col); + mzlog(5," 1. NumColors(%d):%d",i,col); + } */ + + showHeads(); + showKeys(); + calcScheds(); + showScheds(); + showTimeline(); + +/* for (int i=0; i < (int)(sizeof(Areas)/sizeof(tArea)); i++) + { + cBitmap *b=osd->GetBitmap(i); + int col; + const tColor *tc=b->Colors(col); + mzlog(5," 2. NumColors(%d):%d",i,col); + if (i==NAMES_AREA) + { + for(int j=0;jFlush(); +} +void magazine::outputLR(void) +{ +/* for (int i=0; i < (int)(sizeof(Areas)/sizeof(tArea)); i++) + { + cBitmap *b=osd->GetBitmap(i); + if (b) + b->Reset(); + } */ + cBitmap *b=osd->GetBitmap(NAMES_AREA); + if (b) + { + b->Reset(); + if (tvonscreenCfg.colorworkaround) + { + // This is an ugly work around for color problems with DVB driver or hardware or vdr handling, who knows + b->SetColor(0,clrTransparent); + b->SetColor(1,clrBlue); + b->SetColor(2,clrWhite); + b->SetColor(3,clrGrey); + b->SetColor(4,0xffff0000); + b->SetColor(5,clrCyan); + for(int i=6;i<128;i++) + { + b->SetColor(i,0x01000000|i); + } + // End work around + } + } + + showHeads(); + calcScheds(); + searchcEvt(); + showScheds(); + showTimeline(); + + osd->Flush(); +} +void magazine::gotoUsertime(int u) +{ + struct tm tm_r; + localtime_r(¤tFirstTime,&tm_r); + tm_r.tm_hour=u/100; + tm_r.tm_min=u%100; + tm_r.tm_sec=0; + currentFirstTime=mktime(&tm_r); + if (currentFirstTimeHeight(); + int width=184; + + char *helptext[]={ + "NORMAL MODE:", + "arrows\n\tmove view", + "back\n\tclose TV OnScreen", + "red/blue\n\t-/+ one day", + "green/yellow\n\tone page left/right", + "7/9\n\tone page left/right", + "8\n\tgoto current channel", + "0\n\tgoto now", + "4/5/6\n\tgoto configured time", + "ok\n\tswitch to edit mode\n", + "EDIT MODE:", + "back\n\tback to normal mode", + "arrows\n\tmove selected schedule", + "record\n\tcreate timer", + "ok\n\tshow details", + "|\n(c) 2004 Jürgen Schmitz\n\thttp://www.js-home.org/vdr", + NULL + }; + + int area=SCHED1_AREA; + + osd->DrawRectangle(Areas[SCHED1_AREA].x1, Areas[SCHED1_AREA].y1+1, Areas[SCHED1_AREA].x2+1, Areas[SCHED1_AREA].y2+1, clrGrey); + osd->DrawRectangle(Areas[SCHED2_AREA].x1, Areas[SCHED2_AREA].y1+1, Areas[SCHED2_AREA].x2+1, Areas[SCHED2_AREA].y2+1, clrGrey); + osd->DrawRectangle(Areas[SCHED3_AREA].x1, Areas[SCHED3_AREA].y1+1, Areas[SCHED3_AREA].x2+1, Areas[SCHED3_AREA].y2+1, clrGrey); + + osd->DrawRectangle(Areas[SCHED1_AREA].x1+2, Areas[SCHED1_AREA].y1, Areas[SCHED1_AREA].x2+1-3, Areas[SCHED1_AREA].y2+1-3, clrGray50); + osd->DrawRectangle(Areas[SCHED2_AREA].x1+2, Areas[SCHED2_AREA].y1, Areas[SCHED2_AREA].x2+1-3, Areas[SCHED2_AREA].y2+1-3, clrGray50); + osd->DrawRectangle(Areas[SCHED3_AREA].x1+2, Areas[SCHED3_AREA].y1, Areas[SCHED3_AREA].x2+1-3, Areas[SCHED3_AREA].y2+1-3, clrGray50); + + osd->DrawRectangle(0+Areas[TIMELINE_AREA].x1,0+Areas[TIMELINE_AREA].y1+TL_YSTART,Areas[TIMELINE_AREA].x1+48,Areas[TIMELINE_AREA].y1+400+TL_YSTART,clrBlack); + showHeads(true); +// osd->Flush(); + + do + { + for(int i=0;iHeight(); + if (helptext[j]==NULL) + break; + if (helptext[j][0]=='|') + txt=helptext[j]+1; + else + txt=tr(helptext[j]); + + if (i+usef->TextHeight(width,txt)>=lines) + break; + + i+=usef->Text(Areas[area].x1+4,y+Areas[area].y1,width-8,lines-i,txt,clrWhite,clrBackground); + j++; + } + if (area==SCHED1_AREA) + area=SCHED2_AREA; + else if (area==SCHED2_AREA) + area=SCHED3_AREA; + else if (area==SCHED3_AREA) + break; + } + while (helptext[j]); + osd->Flush(); +} + +void magazine::autoTimer(const class cEvent *cev) +{ + FILE *f; + if ((f=fopen(tvonscreenCfg.vdradminfile,"a"))) + { + const char *title; + int chan; + + title=cev->Title(); + cChannel *cc=Channels.GetByChannelID(cev->ChannelID()); + chan=cc->Number(); + + fprintf(f,"1:%s:1:::1:40:7:%d:\n",title,chan); + fclose(f); + } +} + +#if VDRVERSNUM < 10503 +#include "fontosd/fontosd-arial18.c" +#include "fontosd/fontosd-verdana16.c" +#include "fontosd/fontosd-tahoma16.c" +#include "fontosd/fontosd-timesNewRoman16.c" +#endif + +void magazine::Show(void) +{ + mzlog(10," magazine::Show()"); + + if (me) + { + delete me; + me=NULL; + } + if (met) + { + delete met; + met=NULL; + } + if (mes) + { + delete mes; + mes=NULL; + } + + osd = cOsdProvider::NewOsd(((Setup.OSDWidth - 612) / 2) + Setup.OSDLeft, ((Setup.OSDHeight - 436) / 2) + Setup.OSDTop); + if (osd && !osd->SetAreas(Areas, sizeof(Areas)/sizeof(tArea))) + { + delete [] fullHours; + delete [] ev1; + delete [] ev2; + delete [] ev3; + + delete f1; + delete f2; + delete f3; + delete f4; + +#if VDRVERSNUM >= 10503 + f1=new anyFont(osd,18,1); // Sendung + f2=new anyFont(osd,16,1); // Extra-Info + f3=new anyFont(osd,20,1); // Sender + f4=new anyFont(osd,16); // Tasten +#else + f1=new anyFont(osd,(cFont::tPixelData *)fontosd_arial18,FONTOSD_ARIAL18,1); // Sendung + f2=new anyFont(osd,(cFont::tPixelData *)fontosd_verdana16,FONTOSD_VERDANA16,1); // Extra-Info + f3=new anyFont(osd,(cFont::tPixelData *)fontosd_tahoma16,FONTOSD_TAHOMA16,1); // Sender + f4=new anyFont(osd,(cFont::tPixelData *)fontosd_newroman16,FONTOSD_NEWROMAN16); // Tasten +#endif + for (int i=0; i < (int)(sizeof(Areas)/sizeof(tArea)); i++) + { +// cBitmap *b=osd->GetBitmap(i); +// if (b) +// b->Reset(); + osd->DrawRectangle(Areas[i].x1, Areas[i].y1, Areas[i].x2+1, Areas[i].y2+1, clrGray50); + } + evnum=(Areas[SCHED1_AREA].y2-Areas[SCHED1_AREA].y1)/f1->Height(); + + ev1=new cEvent*[evnum]; + ev2=new cEvent*[evnum]; + ev3=new cEvent*[evnum]; + + fullHours=new int[evnum]; + fullHours_tmp1=new int[evnum]; + fullHours_tmp2=new int[evnum]; + fullHours_tmp3=new int[evnum]; + + output(); + } +} +cEvent **magazine::ev4ch(int p) +{ + cEvent **ev=NULL; + if (p==currentFirst) + ev=ev1; + else if (p==currentFirst+1) + ev=ev2; + if (p==currentFirst+2) + ev=ev3; + return ev; +} +void magazine::searchcEvt(void) +{ + cEvent **ev=ev4ch(EDIT_curChannel); + for(int i=EDIT_curEVI;i>=0;i--) + { + if (ev[i]) + { + EDIT_curEvent=ev[i]->EventID(); + break; + } + } +} +eOSState magazine::ProcessKey(eKeys Key) +{ + //mzlog(10," ProcessKey(%d)",Key); + eOSState state; + if (me) + { + state=me->ProcessKey(Key); + if (state==osBack) + { + state=osContinue; + delete me; + me=NULL; + if (!osd) + Show(); + } + else if (state == osUnknown || state == osContinue) + { + switch (Key & ~k_Repeat) + { + case kOk: + case kBack: + delete me; + me=NULL; + if (!osd) + Show(); + break; + case kBlue: // Umschalten - obsolete! + { + cEvent **ev=ev4ch(EDIT_curChannel); + cChannel *channel = Channels.GetByChannelID(ev[EDIT_curEVI]->ChannelID(), true); + if (channel && cDevice::PrimaryDevice()->SwitchChannel(channel, true)) + { + delete me; + me=NULL; + return osEnd; + } + } + break; + case kGreen: // Suchen + { +// mzlog(10," Search"); + delete me; + me=NULL; + cEvent **ev=ev4ch(EDIT_curChannel); + mes=new cSearchMenu(ev[EDIT_curEVI]); + state=osContinue; + } + break; + case kYellow: // add AutoTimer + { +// mzlog(10," AutoTimer"); + if (tvonscreenCfg.vdradminfile) + { + me->helpLine(false); + state=osContinue; + + cEvent **ev=ev4ch(EDIT_curChannel); + autoTimer(ev[EDIT_curEVI]); + me->printMsg(tr("Added AutoTimer to vdradmin.")); + } + else + { + me->printMsg(tr("Startoption 'vdradminfile' not set!")); + me->helpLine(false); + state=osContinue; + } + } + break; + case kRed: + case kRecord: // new + { + delete me; + me=NULL; + cEvent **ev=ev4ch(EDIT_curChannel); + cTimer *timer = new cTimer(ev[EDIT_curEVI]); + cTimer *t = Timers.GetTimer(timer); + if (t) + { + delete timer; + timer = t; + } + met=new cMenuEditTimer(timer, !t); + met->Display(); + state=osContinue; + } + break; + } + } + } + else if (met) + { + state=met->ProcessKey(Key); + if (state==osBack) + { + state=osContinue; + delete met; + met=NULL; + if (!osd) + Show(); + } + else if (state == osUnknown) + { + switch (Key & ~k_Repeat) + { + case kOk: + case kBack: + delete met; + met=NULL; + if (!osd) + Show(); + break; + } + } + } + else if (mes) + { + state=mes->ProcessKey(Key); + if (state==osBack) + { + state=osContinue; + delete mes; + mes=NULL; + if (!osd) + Show(); + } + else if (state == osUnknown) + { + switch (Key & ~k_Repeat) + { + case kOk: + case kGreen: + { + const cEvent *ev=mes->currentSelected(); + if (ev) + { + delete mes; + mes=NULL; + me=new tvOcMenuEvent(ev); + me->Display(); + } + } + state=osContinue; + break; + case kYellow: + mes->searchIn(schedArray,schedArrayNum); + state=osContinue; + break; + case kBack: + case kBlue: + delete mes; + mes=NULL; + if (!osd) + Show(); + break; + case kRed: + const cEvent *ev=mes->currentSelected(); + if (ev) + { + delete mes; + mes=NULL; + cTimer *timer = new cTimer(ev); + cTimer *t = Timers.GetTimer(timer); + if (t) + { + delete timer; + timer = t; + } + met=new cMenuEditTimer(timer, !t); + met->Display(); + } + state=osContinue; + break; + } + } + } + else + { + state = cOsdObject::ProcessKey(Key); + + if (state == osUnknown && schedArrayNum>currentFirst) + { + if (curmode==SHOW) + { + switch (Key & ~k_Repeat) + { + case kOk: + if (schedArrayNum>currentFirst) + { + curmode=EDIT; + EDIT_curChannel=currentFirst; + for(int i=0;iEventID(); + break; + } + } + output(); + } + break; + case kBack: + return osBack; + case kLeft: + currentFirst--; + if (currentFirst<0) + currentFirst=0; + output(); + break; + case kRight: + currentFirst++; + if (currentFirst>schedArrayNum-3) + currentFirst=schedArrayNum-3; + if (currentFirst<0) + currentFirst=0; + output(); + break; + case kUp: + currentFirstTime-=60*30; + if (currentFirstTimeschedArrayNum-3) + currentFirst=schedArrayNum-3; + if (currentFirst<0) + currentFirst=0; + output(); + break; + case k8: // zum aktuellen Sender + { + int currentChannel = Channels.GetByNumber(cDevice::CurrentChannel())->Number(); + for(int i=0;iChannelID(), true); + if (channel->Number()==currentChannel) + { + currentFirst=i-1; + if (currentFirst<0) + currentFirst=0; + output(); + break; + } + } + } + break; + case k0: // jetzt + currentFirstTime=time(NULL); + output(); + break; + case k1: + showHelp(); + break; + case k4: // usertime1 + gotoUsertime(tvonscreenCfg.usertime1); + break; + case k5: // usertime2 + gotoUsertime(tvonscreenCfg.usertime2); + break; + case k6: // usertime3 + gotoUsertime(tvonscreenCfg.usertime3); + break; + /* case k0: + break; + case k1: + break; + case k2: + break; + case k3: + break; + case k4: + break; + case k5: + break; + case k6: + break; + case k8: + break; */ + default: + return state; + } + } + else + { + switch (Key & ~k_Repeat) + { + case kOk: + { + cEvent **ev=ev4ch(EDIT_curChannel); + if (ev[EDIT_curEVI] != NULL) + { + delete osd; + osd=NULL; + me=new tvOcMenuEvent(ev[EDIT_curEVI]); + me->Display(); + curmode=SHOW; + EDIT_curEvent=0; + return osContinue; + } + } + break; + case kBack: + curmode=SHOW; + EDIT_curEvent=0; + output(); + break; + case kLeft: + EDIT_curChannel--; + if (EDIT_curChannel<0) + EDIT_curChannel=0; + if (EDIT_curChannelschedArrayNum-1) + EDIT_curChannel=schedArrayNum-1; + if (EDIT_curChannel<0) + EDIT_curChannel=0; + if (EDIT_curChannel>currentFirst+2) + { + currentFirst++; + if (currentFirst>schedArrayNum-3) + currentFirst=schedArrayNum-3; + if (currentFirst<0) + currentFirst=0; + EDIT_curChannel=currentFirst+2; + } + outputLR(); + break; + case kUp: + { + cEvent **ev=ev4ch(EDIT_curChannel); + const cEvent *e=getPrev(schedArray[EDIT_curChannel],ev[EDIT_curEVI]); + + if (e) + { + int found; + do + { + found=0; + for(int i=0;iEventID()==e->EventID()) + { + found=1; + EDIT_curEvent=e->EventID(); + } + } + if (!found) + { + currentFirstTime-=60*30; + if (currentFirstTimeEventID(); + int found,cc=0; + do + { + found=0; + cc++; + for(int i=0;iEventID()==EDIT_curEvent) + { + found=1; + } + } + if (!found) + { + currentFirstTime+=60*30; + calcScheds(); + } + } + while (!found && cc<48); + } + output(); + } + break; +/* case kRed: + break; + case kBlue: + break; + case kGreen: + break; + case kYellow: + break; */ + /* case k0: + break; + case k1: + break; + case k2: + break; + case k3: + break; + case k4: + break; + case k5: + break; + case k6: + break; + case k7: + break; + case k8: + break; + case k9: + break; */ + case kRecord: + { + cEvent **ev=ev4ch(EDIT_curChannel); + if (ev[EDIT_curEVI] != NULL) + { + delete osd; + osd=NULL; + cTimer *timer = new cTimer(ev[EDIT_curEVI]); + cTimer *t = Timers.GetTimer(timer); + if (t) + { + delete timer; + timer = t; + } + met=new cMenuEditTimer(timer, !t); + } + } + break; + default: + return state; + } + } + state = osContinue; + } + } + return state; +} + +#include + +void mzlog(int level, const char *fmt, ...) +{ + auto char t[BUFSIZ]; + auto va_list ap; + int minlevel=0; + + va_start(ap, fmt); + + if (level>=minlevel) + { + vsnprintf(t + 10, sizeof t - 10, fmt, ap); + memcpy(t, "tvonscreen: ", 10); + syslog(LOG_DEBUG, "%s", t); + } + va_end(ap); +} diff --git a/po/de_DE.po b/po/de_DE.po new file mode 100644 index 0000000..8b5ef4a --- /dev/null +++ b/po/de_DE.po @@ -0,0 +1,98 @@ +# This file is distributed under the same license as the tvonscreen package. +# +msgid "" +msgstr "" +"Project-Id-Version: vdr\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2010-08-01 13:08+0200\n" +"PO-Revision-Date: 2010-07-31 19:58+0200\n" +"Last-Translator: Jochen Dolze \n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +msgid "show channel logos" +msgstr "zeige Kanal-Logos" + +msgid "show channel names" +msgstr "zeige Kanal-Namen" + +msgid "show logos in black&white" +msgstr "zeige Kanal-Logos in Schwarz/Weiß" + +msgid "enable color problem work around" +msgstr "Farbproblem Umgehung aktivieren" + +msgid "use XL fonts" +msgstr "benutze XL Schrift" + +msgid "hide info line" +msgstr "verstecke Info Zeile" + +msgid "user point in time 1 (Key 4)" +msgstr "Anwenderzeitpunkt 1 (Taste 4)" + +msgid "user point in time 2 (Key 5)" +msgstr "Anwenderzeitpunkt 2 (Taste 5)" + +msgid "user point in time 3 (Key 6)" +msgstr "Anwenderzeitpunkt 3 (Taste 6)" + +msgid "jump to next day point if ago" +msgstr "Gehe zum nächsten Tag wenn vorbei" + +msgid "Show search item itself" +msgstr "Zeige auch Suchbegriff" + +msgid "Press 1 for help" +msgstr "Für Hilfe die 1 drücken" + +#, c-format +msgid "%d-%m" +msgstr "%d-%m" + +msgid "o'clock" +msgstr "Uhr" + +msgid "Timer conflict!" +msgstr "Timer Konflikt!" + +msgid "Added AutoTimer to vdradmin." +msgstr "AutoTimer in vdradmin aufgenommen" + +msgid "Startoption 'vdradminfile' not set!" +msgstr "Startoption 'vdradminfile' nicht gesetzt!" + +msgid "Search" +msgstr "Suchen" + +msgid "Search for" +msgstr "Suche nach" + +msgid "Searching..." +msgstr "Suchen..." + +msgid "Record" +msgstr "Aufnehmen" + +msgid "Details" +msgstr "Details" + +msgid "in all" +msgstr "in allen" + +msgid "Back" +msgstr "Zurück" + +msgid "Nothing found!" +msgstr "Nichts gefunden!" + +msgid "AutoTimer" +msgstr "AutoTimer" + +msgid "Shows the EPG info in form of a typical TV magazine" +msgstr "Zeigt EPG Infos in Form einer TV Zeitschrift" + +msgid "TV-OnScreen" +msgstr "TV-OnScreen" diff --git a/search.c b/search.c deleted file mode 100644 index 3ef27d8..0000000 --- a/search.c +++ /dev/null @@ -1,138 +0,0 @@ -/* - * search.c - * - * See the README file for copyright information and how to reach the author. - * - * $Id: search.c,v 1.4 2006/06/18 13:59:36 schmitzj Exp $ - * - */ - -#include "search.h" -#include "magazine.h" - -EventItem::EventItem(const class cEvent *ev) -{ - char buf[200]; - const char *txt,*chan; - cString time1,time2,date; - cChannel *channel; - - myev=ev; - channel = Channels.GetByChannelID(ev->ChannelID(), true); - time1=ev->GetTimeString(); - time2=ev->GetEndTimeString(); - date=ev->GetDateString(); - chan=channel->ShortName(true); - txt=ev->Title(); - - snprintf(buf,sizeof(buf)-1,"%.6s %s - %s %s/%s",(const char *)date,(const char *)time1,(const char *)time2,chan,txt); - SetText(buf); -} - -// ----------------------------------------------------------------------------- - -cSearchMenu::cSearchMenu(const class cEvent *ev) : cOsdMenu(tr("Search")) -{ - myev=ev; - - const char *title; - title=ev->Title(); - - char txt[200]; - snprintf(txt,sizeof(txt),"%s '%s'...",tr("Search for"),title); - SetTitle(txt); - - SetStatus(tr("Searching...")); - Display(); - Skins.Message(mtInfo, tr("Searching...")); - const cSchedules* Schedules = cSchedules::Schedules(_schedulesLock); - - const cSchedule *s; - s=Schedules->GetSchedule(ev->ChannelID()); - - int cc=search(s,ev); - - snprintf(txt,sizeof(txt),"%s '%s':",tr("Search for"),title); - SetTitle(txt); - if (cc>0) - { - SetStatus(""); - SetHelp(tr("Record"), tr("Details"), tr("in all"), tr("Back")); - } - else - { - SetStatus(tr("Nothing found!")); - SetHelp(NULL, NULL, tr("in all"), tr("Back")); - } - Display(); -} - const cEvent *cev=NULL; - -int cSearchMenu::search(const cSchedule *s,const class cEvent *ev) -{ - const char *title; - title=ev->Title(); - - int cc=0; - cev=s->GetPresentEvent(); - while(cev) - { - if (cev!=ev || tvonscreenCfg.showsearchinitiator) - { - const char *ctitle; - ctitle=cev->Title(); - if (ctitle && title && strstr(ctitle,title)) // || strstr(title,ctitle)) - { - Add(new EventItem(cev)); - cc++; - } - } - cev=magazine::getNext(s,cev); - } - return cc; -} -void cSearchMenu::searchIn(const cSchedule** schedArray,int schedArrayNum) -{ - cChannel* channel; - const char *title; - title=myev->Title(); - - char txt[200]; - snprintf(txt,sizeof(txt),"%s '%s'...",tr("Search for"),title); - SetTitle(txt); - Clear(); - - SetStatus(tr("Searching...")); - Display(); - Skins.Message(mtInfo, tr("Searching...")); - int cc=0; - - for(int i=0;iChannelID(), true); - snprintf(txt,sizeof(txt),"%s /%-20.20s",tr("Searching..."),channel->ShortName(true)); - Skins.Message(mtInfo, txt); - cc+=search(schedArray[i],myev); - } - - snprintf(txt,sizeof(txt),"%s '%s':",tr("Search for"),title); - SetTitle(txt); - if (cc>0) - { - SetStatus(""); - SetHelp(tr("Record"), tr("Details"), NULL, tr("Back")); - } - else - { - SetStatus(tr("Nothing found!")); - SetHelp(NULL, NULL, NULL, tr("Back")); - } - Display(); -} - - -const class cEvent *cSearchMenu::currentSelected(void) -{ - EventItem *item = (EventItem *)Get(Current()); - return item ? item->Event() : NULL; -} diff --git a/search.cpp b/search.cpp new file mode 100644 index 0000000..3ef27d8 --- /dev/null +++ b/search.cpp @@ -0,0 +1,138 @@ +/* + * search.c + * + * See the README file for copyright information and how to reach the author. + * + * $Id: search.c,v 1.4 2006/06/18 13:59:36 schmitzj Exp $ + * + */ + +#include "search.h" +#include "magazine.h" + +EventItem::EventItem(const class cEvent *ev) +{ + char buf[200]; + const char *txt,*chan; + cString time1,time2,date; + cChannel *channel; + + myev=ev; + channel = Channels.GetByChannelID(ev->ChannelID(), true); + time1=ev->GetTimeString(); + time2=ev->GetEndTimeString(); + date=ev->GetDateString(); + chan=channel->ShortName(true); + txt=ev->Title(); + + snprintf(buf,sizeof(buf)-1,"%.6s %s - %s %s/%s",(const char *)date,(const char *)time1,(const char *)time2,chan,txt); + SetText(buf); +} + +// ----------------------------------------------------------------------------- + +cSearchMenu::cSearchMenu(const class cEvent *ev) : cOsdMenu(tr("Search")) +{ + myev=ev; + + const char *title; + title=ev->Title(); + + char txt[200]; + snprintf(txt,sizeof(txt),"%s '%s'...",tr("Search for"),title); + SetTitle(txt); + + SetStatus(tr("Searching...")); + Display(); + Skins.Message(mtInfo, tr("Searching...")); + const cSchedules* Schedules = cSchedules::Schedules(_schedulesLock); + + const cSchedule *s; + s=Schedules->GetSchedule(ev->ChannelID()); + + int cc=search(s,ev); + + snprintf(txt,sizeof(txt),"%s '%s':",tr("Search for"),title); + SetTitle(txt); + if (cc>0) + { + SetStatus(""); + SetHelp(tr("Record"), tr("Details"), tr("in all"), tr("Back")); + } + else + { + SetStatus(tr("Nothing found!")); + SetHelp(NULL, NULL, tr("in all"), tr("Back")); + } + Display(); +} + const cEvent *cev=NULL; + +int cSearchMenu::search(const cSchedule *s,const class cEvent *ev) +{ + const char *title; + title=ev->Title(); + + int cc=0; + cev=s->GetPresentEvent(); + while(cev) + { + if (cev!=ev || tvonscreenCfg.showsearchinitiator) + { + const char *ctitle; + ctitle=cev->Title(); + if (ctitle && title && strstr(ctitle,title)) // || strstr(title,ctitle)) + { + Add(new EventItem(cev)); + cc++; + } + } + cev=magazine::getNext(s,cev); + } + return cc; +} +void cSearchMenu::searchIn(const cSchedule** schedArray,int schedArrayNum) +{ + cChannel* channel; + const char *title; + title=myev->Title(); + + char txt[200]; + snprintf(txt,sizeof(txt),"%s '%s'...",tr("Search for"),title); + SetTitle(txt); + Clear(); + + SetStatus(tr("Searching...")); + Display(); + Skins.Message(mtInfo, tr("Searching...")); + int cc=0; + + for(int i=0;iChannelID(), true); + snprintf(txt,sizeof(txt),"%s /%-20.20s",tr("Searching..."),channel->ShortName(true)); + Skins.Message(mtInfo, txt); + cc+=search(schedArray[i],myev); + } + + snprintf(txt,sizeof(txt),"%s '%s':",tr("Search for"),title); + SetTitle(txt); + if (cc>0) + { + SetStatus(""); + SetHelp(tr("Record"), tr("Details"), NULL, tr("Back")); + } + else + { + SetStatus(tr("Nothing found!")); + SetHelp(NULL, NULL, NULL, tr("Back")); + } + Display(); +} + + +const class cEvent *cSearchMenu::currentSelected(void) +{ + EventItem *item = (EventItem *)Get(Current()); + return item ? item->Event() : NULL; +} diff --git a/timer.c b/timer.c deleted file mode 100644 index 8d0c59d..0000000 --- a/timer.c +++ /dev/null @@ -1,24 +0,0 @@ -/* - * timer.c - * - * See the README file for copyright information and how to reach the author. - * - * $Id: timer.c,v 1.3 2006/06/18 13:59:36 schmitzj Exp $ - * - */ - -#include "magazine.h" - -tvOcMenuEvent::tvOcMenuEvent(const class cEvent *EventInfo) : cMenuEvent(EventInfo,false) -{ - helpLine(); -} - -void tvOcMenuEvent::printMsg(const char *s) -{ - SetStatus(s); -} -void tvOcMenuEvent::helpLine(bool full) -{ - SetHelp(tr("Record"), tr("Search"), full?tr("AutoTimer"):NULL, NULL); -} diff --git a/timer.cpp b/timer.cpp new file mode 100644 index 0000000..8d0c59d --- /dev/null +++ b/timer.cpp @@ -0,0 +1,24 @@ +/* + * timer.c + * + * See the README file for copyright information and how to reach the author. + * + * $Id: timer.c,v 1.3 2006/06/18 13:59:36 schmitzj Exp $ + * + */ + +#include "magazine.h" + +tvOcMenuEvent::tvOcMenuEvent(const class cEvent *EventInfo) : cMenuEvent(EventInfo,false) +{ + helpLine(); +} + +void tvOcMenuEvent::printMsg(const char *s) +{ + SetStatus(s); +} +void tvOcMenuEvent::helpLine(bool full) +{ + SetHelp(tr("Record"), tr("Search"), full?tr("AutoTimer"):NULL, NULL); +} diff --git a/tvonscreen.c b/tvonscreen.c deleted file mode 100644 index afce3f2..0000000 --- a/tvonscreen.c +++ /dev/null @@ -1,98 +0,0 @@ -/* - * tvonscreen.c: A plugin for the Video Disk Recorder - * - * See the README file for copyright information and how to reach the author. - * - * $Id: tvonscreen.c,v 1.15 2006/06/18 13:59:36 schmitzj Exp $ - * - */ - -#include -#include "magazine.h" -#include "config.h" -#include "i18n.h" - -static const char *VERSION = "1.0.141"; -static const char *DESCRIPTION = "Shows the EPG info in form of a typical TV magazine"; -static const char *MAINMENUENTRY = "TV-OnScreen"; - -class cPluginTvOnscreen : public cPlugin { -private: - -public: - cPluginTvOnscreen(void); - virtual ~cPluginTvOnscreen(); - virtual const char *Version(void) { return VERSION; } - virtual const char *Description(void) { return tr(DESCRIPTION); } - virtual const char *CommandLineHelp(void); - virtual bool ProcessArgs(int argc, char *argv[]); - virtual bool Initialize(void); - virtual bool Start(void); - virtual void Housekeeping(void); - virtual const char *MainMenuEntry(void) { return tr(MAINMENUENTRY); } - virtual cOsdObject *MainMenuAction(void); - virtual cMenuSetupPage *SetupMenu(void); - virtual bool SetupParse(const char *Name, const char *Value); - }; - -cPluginTvOnscreen::cPluginTvOnscreen(void) -{ - // Initialize any member variables here. - // DON'T DO ANYTHING ELSE THAT MAY HAVE SIDE EFFECTS, REQUIRE GLOBAL - // VDR OBJECTS TO EXIST OR PRODUCE ANY OUTPUT! -} - -cPluginTvOnscreen::~cPluginTvOnscreen() -{ - // Clean up after yourself! -} - -const char *cPluginTvOnscreen::CommandLineHelp(void) -{ - // Return a string that describes all known command line options. - return tvonscreenCfg.CommandLineHelp(); -} - -bool cPluginTvOnscreen::ProcessArgs(int argc, char *argv[]) -{ - return tvonscreenCfg.ProcessArgs(argc,argv); -} - -bool cPluginTvOnscreen::Initialize(void) -{ - // Initialize any background activities the plugin shall perform. - RegisterI18n(tvoPhrases); - return true; -} - -bool cPluginTvOnscreen::Start(void) -{ - // Start any background activities the plugin shall perform. - return true; -} - -void cPluginTvOnscreen::Housekeeping(void) -{ - // Perform any cleanup or other regular tasks. -} - -cOsdObject *cPluginTvOnscreen::MainMenuAction(void) -{ - // Perform the action when selected from the main VDR menu. - - return new magazine(this); -} - -cMenuSetupPage *cPluginTvOnscreen::SetupMenu(void) -{ - // Return a setup menu in case the plugin supports one. - return new tvonscreenConfigPage(); -} - -bool cPluginTvOnscreen::SetupParse(const char *Name, const char *Value) -{ - // Parse your own setup parameters and store their values. - return tvonscreenCfg.SetupParse(Name,Value); -} - -VDRPLUGINCREATOR(cPluginTvOnscreen); // Don't touch this! diff --git a/tvonscreen.cpp b/tvonscreen.cpp new file mode 100644 index 0000000..501f5a4 --- /dev/null +++ b/tvonscreen.cpp @@ -0,0 +1,98 @@ +/* + * tvonscreen.c: A plugin for the Video Disk Recorder + * + * See the README file for copyright information and how to reach the author. + * + * $Id: tvonscreen.c,v 1.15 2006/06/18 13:59:36 schmitzj Exp $ + * + */ + +#include +#include "magazine.h" +#include "config.h" +#include "i18n.h" + +static const char *VERSION = "1.0.141"; +static const char *DESCRIPTION = trNOOP("Shows the EPG info in form of a typical TV magazine"); +static const char *MAINMENUENTRY = trNOOP("TV-OnScreen"); + +class cPluginTvOnscreen : public cPlugin { +private: + +public: + cPluginTvOnscreen(void); + virtual ~cPluginTvOnscreen(); + virtual const char *Version(void) { return VERSION; } + virtual const char *Description(void) { return tr(DESCRIPTION); } + virtual const char *CommandLineHelp(void); + virtual bool ProcessArgs(int argc, char *argv[]); + virtual bool Initialize(void); + virtual bool Start(void); + virtual void Housekeeping(void); + virtual const char *MainMenuEntry(void) { return tr(MAINMENUENTRY); } + virtual cOsdObject *MainMenuAction(void); + virtual cMenuSetupPage *SetupMenu(void); + virtual bool SetupParse(const char *Name, const char *Value); + }; + +cPluginTvOnscreen::cPluginTvOnscreen(void) +{ + // Initialize any member variables here. + // DON'T DO ANYTHING ELSE THAT MAY HAVE SIDE EFFECTS, REQUIRE GLOBAL + // VDR OBJECTS TO EXIST OR PRODUCE ANY OUTPUT! +} + +cPluginTvOnscreen::~cPluginTvOnscreen() +{ + // Clean up after yourself! +} + +const char *cPluginTvOnscreen::CommandLineHelp(void) +{ + // Return a string that describes all known command line options. + return tvonscreenCfg.CommandLineHelp(); +} + +bool cPluginTvOnscreen::ProcessArgs(int argc, char *argv[]) +{ + return tvonscreenCfg.ProcessArgs(argc,argv); +} + +bool cPluginTvOnscreen::Initialize(void) +{ + // Initialize any background activities the plugin shall perform. + RegisterI18n(tvoPhrases); + return true; +} + +bool cPluginTvOnscreen::Start(void) +{ + // Start any background activities the plugin shall perform. + return true; +} + +void cPluginTvOnscreen::Housekeeping(void) +{ + // Perform any cleanup or other regular tasks. +} + +cOsdObject *cPluginTvOnscreen::MainMenuAction(void) +{ + // Perform the action when selected from the main VDR menu. + + return new magazine(this); +} + +cMenuSetupPage *cPluginTvOnscreen::SetupMenu(void) +{ + // Return a setup menu in case the plugin supports one. + return new tvonscreenConfigPage(); +} + +bool cPluginTvOnscreen::SetupParse(const char *Name, const char *Value) +{ + // Parse your own setup parameters and store their values. + return tvonscreenCfg.SetupParse(Name,Value); +} + +VDRPLUGINCREATOR(cPluginTvOnscreen); // Don't touch this! -- cgit v1.2.3