From 549a8ee8dc07767ca19e89ff828b35c246b36697 Mon Sep 17 00:00:00 2001 From: Sascha Volkenandt Date: Fri, 5 Jan 2007 22:17:12 +0000 Subject: - added timer data to editor - timers don't show date in case of a weekday timer --- pages/Makefile | 2 +- pages/edit_timer.ecpp | 62 +++++++++++++++++++++++++++++---------------------- pages/timers.ecpp | 4 ++-- 3 files changed, 38 insertions(+), 30 deletions(-) diff --git a/pages/Makefile b/pages/Makefile index de2011d..246a6c5 100644 --- a/pages/Makefile +++ b/pages/Makefile @@ -17,7 +17,7 @@ VDRDIR ?= ../../../.. OBJS = menu.o event_widget.o channels.o recordings.o schedule.o \ screenshot.o timers.o whats_on_now.o whats_on_next.o \ - keypress.o remote.o channels_widget.o edit_timer.o + keypress.o remote.o channels_widget.o edit_timer.o ### Default rules: diff --git a/pages/edit_timer.ecpp b/pages/edit_timer.ecpp index aa0ec63..5995a3b 100644 --- a/pages/edit_timer.ecpp +++ b/pages/edit_timer.ecpp @@ -32,6 +32,24 @@ timerid; return DECLINED; // XXX error page } + bool active = timer ? timer->Flags() & tfActive : true; + std::string channel = timer ? *timer->Channel()->GetChannelID().ToString() : ""; + std::string title = timer ? timer->File() : ""; + int day = ( !timer || timer->Day() ) ? StringToInt( FormatDateTime( "%d", timer ? timer->Day() : time( 0 ) ) ) : 0; + bool wday_mon = timer ? timer->WeekDays() & 0x01 : false; + bool wday_tue = timer ? timer->WeekDays() & 0x02 : false; + bool wday_wed = timer ? timer->WeekDays() & 0x04 : false; + bool wday_thu = timer ? timer->WeekDays() & 0x08 : false; + bool wday_fri = timer ? timer->WeekDays() & 0x10 : false; + bool wday_sat = timer ? timer->WeekDays() & 0x20 : false; + bool wday_sun = timer ? timer->WeekDays() & 0x40 : false; + int start_h = timer ? ( timer->Start() / 100 ) % 100 : StringToInt( FormatDateTime( "%H", time( 0 ) ) ); + int start_m = timer ? timer->Start() % 100 : StringToInt( FormatDateTime( "%M", time( 0 ) ) ); + int end_h = timer ? ( timer->Stop() / 100 ) % 100 : StringToInt( FormatDateTime( "%H", time( 0 ) ) ); + int end_m = timer ? timer->Stop() % 100 : StringToInt( FormatDateTime( "%M", time( 0 ) ) ); + bool vps = timer ? timer->Flags() & tfVps : ::Setup.UseVps; + int priority = timer ? timer->Priority() : ::Setup.DefaultPriority; + int lifetime = timer ? timer->Lifetime() : ::Setup.DefaultLifetime; }> @@ -51,8 +69,8 @@ timerid; Timer aktiv: - Ja - Nein + type="radio">Ja + type="radio">Nein @@ -60,67 +78,57 @@ timerid; Kanal: - +<& channels_widget name=("channel") selected=(channel) &> Titel - + Tag der Aufnahme - + Wochentag - Montag - Dienstag - Mittwoch - Donnerstag - Freitag - Samstag - Sonntag + /> Montag + /> Dienstag + /> Mittwoch + /> Donnerstag + /> Freitag + /> Samstag + /> Sonntag Startzeit: - : + : Endzeit: - : + : VPS verwenden - + /> Priorität: - + Lebensdauer: - + diff --git a/pages/timers.ecpp b/pages/timers.ecpp index 8fc9e16..7c07fe6 100644 --- a/pages/timers.ecpp +++ b/pages/timers.ecpp @@ -53,9 +53,9 @@ using namespace vdrlive; }> "> - .png" alt="Aktiv?" /> + .png" alt="Aktiv?" /> <$ timer->Channel()->Name() $> - <$ FormatDateTime(tr("%a, %b %d"), timer->Day()) $> + <$ timer->Day() > 0 ? FormatDateTime(tr("%a, %b %d"), timer->Day()) : " " $> <$ FormatDateTime(tr("%I:%M %p"), timer->StartTime()) $> <$ FormatDateTime(tr("%I:%M %p"), timer->StopTime()) $> <{ if (timer->Flags() & 8) { }>Record<{ } }> -- cgit v1.2.3