diff -Naur live-0.2.0.org/pages/edit_timer.ecpp live-0.2.0/pages/edit_timer.ecpp --- live-0.2.0.org/pages/edit_timer.ecpp 2008-04-10 16:06:05.000000000 -0400 +++ live-0.2.0/pages/edit_timer.ecpp 2008-10-14 12:04:10.000000000 -0400 @@ -38,8 +38,9 @@ int end_h = 0; int end_m = 0; bool vps = 0; - int priority = 0; - int lifetime = 0; + int priority = 50; + int lifetime = 99; + string timeraction = "1"; string aux = ""; <%session scope="global"> @@ -54,6 +55,8 @@ <%cpp> if (!logged_in && LiveSetup().UseAuth()) return reply.redirect("login.html"); +#define SELECTIF(x) reply.out() << ( (x) ? "selected=\"selected\"" : "" ); + bool ajaxReq = !async.empty() && (lexical_cast(async) != 0); tChannelID channelid = tChannelID(); @@ -86,7 +89,7 @@ { time_t tdate = GetDateFromDatePicker(date, tr("mm/dd/yyyy")); string sdate = DatePickerToC(tdate, "yyyy-mm-dd"); - LiveTimerManager().UpdateTimer( timer, flags, channel, weekdays, sdate, start, stop, priority, lifetime, title, aux ); + LiveTimerManager().UpdateTimer( timer, flags, channel, weekdays, sdate, start, stop, priority, lifetime, timeraction, title, aux ); timerNotifier.SetTimerModification(); return reply.redirect(!edit_timerreferer.empty()?edit_timerreferer:"timers.html"); } @@ -132,6 +135,7 @@ vps = timer->Flags() & tfVps; priority = timer->Priority(); lifetime = timer->Lifetime(); + timeraction = itoa(timer->Action()); aux = timer->Aux() ? timer->Aux() : ""; } @@ -245,6 +249,15 @@ +
<$ tr("Action") $>:
+ + + +
<$ trVDR("Priority") $>:
diff -Naur live-0.2.0.org/timers.cpp live-0.2.0/timers.cpp --- live-0.2.0.org/timers.cpp 2008-04-10 16:06:05.000000000 -0400 +++ live-0.2.0/timers.cpp 2008-10-14 12:04:10.000000000 -0400 @@ -131,14 +131,14 @@ } void TimerManager::UpdateTimer( cTimer* timer, int flags, tChannelID& channel, string const& weekdays, string const& day, - int start, int stop, int priority, int lifetime, string const& title, string const& aux ) + int start, int stop, int priority, int lifetime, string const& timeraction, string const& title, string const& aux ) { cMutexLock lock( this ); ostringstream builder; builder << flags << ":" << channel << ":" << ( weekdays != "-------" ? weekdays : "" ) << ( weekdays == "-------" || day.empty() ? "" : "@" ) << day << ":" << start << ":" << stop << ":" - << priority << ":" << lifetime << ":" << title << ":" << aux; + << priority << ":" << lifetime << ":" << timeraction << ":" << title << ":" << aux; // dsyslog("%s", builder.str().c_str()); TimerPair timerData( timer, builder.str() ); diff -Naur live-0.2.0.org/timers.h live-0.2.0/timers.h --- live-0.2.0.org/timers.h 2008-04-10 15:57:20.000000000 -0400 +++ live-0.2.0/timers.h 2008-10-14 12:04:10.000000000 -0400 @@ -45,7 +45,7 @@ SortedTimers& GetTimers() { return m_timers; } void UpdateTimer( cTimer* timer, int flags, tChannelID& channel, std::string const& weekdays, std::string const& day, - int start, int stop, int priority, int lifetime, std::string const& title, std::string const& aux ); + int start, int stop, int priority, int lifetime, std::string const& timeraction, std::string const& title, std::string const& aux ); void DelTimer( cTimer* timer); void ToggleTimerActive( cTimer* timer);