From f290227150bb13c72c87012e20a9ff7959f31a5f Mon Sep 17 00:00:00 2001 From: Dieter Hametner Date: Wed, 3 Jan 2007 18:22:47 +0000 Subject: Moved *.ecpp to pages and *.css to css subdir, added images dir --- pages/Makefile | 51 ++++++++++++++++++++++++++++++++++++++ pages/channels.ecpp | 29 ++++++++++++++++++++++ pages/menu.ecpp | 7 ++++++ pages/schedule.ecpp | 45 ++++++++++++++++++++++++++++++++++ pages/whats_on_now.ecpp | 65 +++++++++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 197 insertions(+) create mode 100644 pages/Makefile create mode 100644 pages/channels.ecpp create mode 100644 pages/menu.ecpp create mode 100644 pages/schedule.ecpp create mode 100644 pages/whats_on_now.ecpp (limited to 'pages') diff --git a/pages/Makefile b/pages/Makefile new file mode 100644 index 0000000..3c77712 --- /dev/null +++ b/pages/Makefile @@ -0,0 +1,51 @@ +CXX ?= g++ +AR ?= ar +ECPPC ?= ecppc + +CXXFLAGS ?= -O2 -Woverloaded-virtual -Wall -fPIC + +CXXFLAGS += `tntnet-config --cxxflags` +LDFLAGS += `tntnet-config --libs` + +INCLUDES += -I.. + +### The directory environment: +VDRDIR ?= ../../../.. + +### The object files (add further files here): + +OBJS = styles.o menu.o channels.o schedule.o whats_on_now.o + +### Default rules: + +.PHONY: all clean + +### Implicit rules: + +%.o: %.cpp + $(CXX) $(CXXFLAGS) -c $(DEFINES) $(INCLUDES) $< + +%.cpp: %.ecpp + $(ECPPC) $(ECPPFLAGS) $(ECPPFLAGS_CPP) $< + +%.cpp: %.gif + $(ECPPC) $(ECPPFLAGS) $(ECPPFLAGS_GIF) -b $< + +%.cpp: %.jpg + $(ECPPC) $(ECPPFLAGS) $(ECPPFLAGS_JPG) -b $< + +%.cpp: %.css + $(ECPPC) $(ECPPFLAGS) $(ECPPFLAGS_CSS) -b $< + +%.cpp: %.js + $(ECPPC) $(ECPPFLAGS) $(ECPPFLAGS_JS) -b $< + +### Targets: + +all: libpages.a + +libpages.a: $(OBJS) + $(AR) r $@ $^ + +clean: + @rm -f *~ *.o core* libpages.a $(OBJS:%.o=%.cpp) diff --git a/pages/channels.ecpp b/pages/channels.ecpp new file mode 100644 index 0000000..aa48f03 --- /dev/null +++ b/pages/channels.ecpp @@ -0,0 +1,29 @@ +<%pre> +#include +#include +#include + + + + <$ tr("channels") $> + + + +
+<{ + + for (cChannel *channel = Channels.First(); channel; channel = Channels.Next(channel)) { + if (!channel->GroupSep() && *channel->Name()) { +}> + +<{ + } + } + + +}> +
+ + diff --git a/pages/menu.ecpp b/pages/menu.ecpp new file mode 100644 index 0000000..e461ad1 --- /dev/null +++ b/pages/menu.ecpp @@ -0,0 +1,7 @@ +<%pre> +#include +#include + + \ No newline at end of file diff --git a/pages/schedule.ecpp b/pages/schedule.ecpp new file mode 100644 index 0000000..76659b4 --- /dev/null +++ b/pages/schedule.ecpp @@ -0,0 +1,45 @@ +<%pre> +#include +#include +#include +#include + + +<%args> +int channel; + + + + ecpp-application testproject + + + + Programm für Channel Nummer <$ channel $>
+ +<{ + cSchedulesLock schedulesLock; + const cSchedules* schedules = cSchedules::Schedules(schedulesLock); + + cChannel* Channel = Channels.GetByNumber(channel); + if (Channel) { + const cSchedule *Schedule = schedules->GetSchedule(Channel); + if (Schedule) { + for (const cEvent *ev = Schedule->Events()->First(); ev; ev = Schedule->Events()->Next(ev)) { +}> + <$ ev->Title() $>
+ +<{ + } + } else { +}> + Kein Schedule für Channel <$ Channel->Number() $> +<{ + } + } else { +}> + Kein Channel mit der Nummer <$ channel $> +<{ + } +}> + + diff --git a/pages/whats_on_now.ecpp b/pages/whats_on_now.ecpp new file mode 100644 index 0000000..3511105 --- /dev/null +++ b/pages/whats_on_now.ecpp @@ -0,0 +1,65 @@ +<%pre> +#include +#include +#include +#include +#include +#include "tools.h" + +using namespace vdrlive; + + +<%args> + +<{ + +cSchedulesLock schedulesLock; +const cSchedules* Schedules = cSchedules::Schedules(schedulesLock); + + +}> + + + VDR-Live - <$ tr("What's on now?") $> + + + +
+<& menu > +
+
+
+ <$ tr("What's running at") $> <$ FormatDateTime(tr("%I.%M %p"), time(0)) $> +
+ +<{ + for (cChannel *Channel = Channels.First(); Channel; Channel = Channels.Next(Channel)) { + if (!Channel->GroupSep()) { + const cSchedule *Schedule = Schedules->GetSchedule(Channel); + if (Schedule) { + const cEvent *Event = Schedule->GetPresentEvent(); + if (Event) { + std::string title(Event->Title() ? Event->Title() : ""); + std::string short_description(Event->ShortText() ? Event->ShortText() : ""); + std::string description(Event->Description() ? Event->Description() : ""); +}> +
+
<$ Channel->Name() $>
+
+   +
+
+ <$ title $>
+ <$ short_description $> +
<$ description $>
+
+
+<{ + } + } + } + } +}> +
+ + -- cgit v1.2.3