Mailing List archive

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

[vdr] [PATCH] calendar-0.1.4_vdr-1.3.6.patch



My life first post to mailing list :))
Hopefully no one yet posted this kind of patch. Anyway this one should work
for you since works for me.


--- calendar/menuitem.c.bak	2004-04-04 08:45:41.000000000 +0400
+++ calendar-0.1.4/menuitem.c	2004-04-04 09:18:14.000000000 +0400
@@ -299,13 +299,20 @@
     _now_in_pixel = -1;
 
 
+#if VDRVERSNUM>=10306
+  for (int i = 0; i < ( _schedule->Events() )->Count(); ++i) {
+#else
   for (int i = 0; i < _schedule->NumEvents(); ++i) {
+#endif
+
+#if VDRVERSNUM>=10306
+                const cEvent* inf = ( _schedule->Events() )->Get(i);
+#elif VDRVERSNUM>=10300
+                const cEvent* inf = _schedule->GetEventNumber(i);
+#else
+                const cEventInfo* inf = _schedule->GetEventNumber(i);
+#endif
 
-#ifndef USEVDR010300
-    const cEventInfo* inf = _schedule->GetEventNumber(i);
-#else /* USEVDR010300 */
-    const cEvent* inf = _schedule->GetEventNumber(i);
-#endif /* USEVDR010300 */
     if (inf) {
 
 #ifndef USEVDR010300
@@ -354,8 +361,11 @@
 
     // Determine timers
     for (cTimer *ti = Timers.First(); ti; ti = Timers.Next(ti)) {
-
+#if VDRVERSNUM>=10306
+      if (config.showTimers == eStAll || config.showTimers == eStActive &&
ti->HasFlags(tfActive)) {
+#else
       if (config.showTimers == eStAll || config.showTimers == eStActive &&
ti->Active()) {
+#endif
 
 #ifndef USEVDR010300
         if (ti->Channel()->GetChannelID() == _schedule->GetChannelID()) {
@@ -364,9 +374,11 @@
 #endif /* USEVDR010300 */
 
           if (ti->IsSingleEvent()) {
-
+#if VDRVERSNUM>=10306
+	    AddTimerIfValid(ti->HasFlags(tfActive), ti->StartTime() - *_now,
ti->StopTime() - *_now);
+#else
             AddTimerIfValid(ti->Active(), ti->StartTime() - *_now,
ti->StopTime() - *_now);
-
+#endif
           } else {
 
             // Check if the timer falls on one of our days to display
@@ -384,7 +396,11 @@
                 if (ti->DayMatches(day)) {
 //printf("matched - start %d (%d) stop %d (%d) ", ti->Start(),
ti->TimeToInt(ti->Start()), ti->Stop(), ti->TimeToInt(ti->Stop()));
 //                  AddTimerIfValid(ti->Active(), day +
ti->TimeToInt(ti->Start()) - *_now, day + ti->TimeToInt(ti->Stop()) -
*_now);
+#if VDRVERSNUM>=10306
+                  AddTimerIfValid(ti->HasFlags(tfActive), ti->SetTime(day,
ti->TimeToInt(ti->Start())) - *_now, ti->SetTime(day,
ti->TimeToInt(ti->Stop())) - *_now);
+#else
                   AddTimerIfValid(ti->Active(), ti->SetTime(day,
ti->TimeToInt(ti->Start())) - *_now, ti->SetTime(day,
ti->TimeToInt(ti->Stop())) - *_now);
+#endif
                 }
               }
             }


-- 
Info:
To unsubscribe send a mail to ecartis@linuxtv.org with "unsubscribe vdr" as subject.



Home | Main Index | Thread Index