Mailing List archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[vdr] [PATCH] Show weekdays in timer list



Hi

When you have created many timers it is sometimes hard to know exactly
what day a specific timer refers to without a calendar, especially if it
refers to a program a week from now.

The attached patch displays the name of the weekday next to the date in
the timers list to make it a little easier.


-- 
Oskar Signell <oskar@signell.net>
--- menu.c.orig	2003-07-01 01:00:20.000000000 +0300
+++ menu.c	2003-07-01 21:19:45.000000000 +0300
@@ -957,10 +957,14 @@
 void cMenuTimerItem::Set(void)
 {
   char *buffer = NULL;
-  asprintf(&buffer, "%c\t%d\t%s\t%02d:%02d\t%02d:%02d\t%s",
+  int day=timer->GetWDay(timer->StartTime());
+  day=(day == 6 ? 0 : day + 1);
+
+  asprintf(&buffer, "%c\t%d\t%s %s\t%02d:%02d\t%02d:%02d\t%s",
                     !timer->Active() ? ' ' : timer->FirstDay() ? '!' : timer->Recording() ? '#' : '>',
                     timer->Channel()->Number(),
                     timer->PrintDay(timer->Day()),
+                    !(timer->Day() & 0x80000000) ? WeekDayName(day):"",
                     timer->Start() / 100,
                     timer->Start() % 100,
                     timer->Stop() / 100,

Home | Main Index | Thread Index