summaryrefslogtreecommitdiff
path: root/interface.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2000-09-03 11:40:00 +0200
committerKlaus Schmidinger <vdr@tvdr.de>2000-09-03 11:40:00 +0200
commitd4eb96f725bed149762665ddee275301c9f069a6 (patch)
tree86490012d641fb095f933a0d3c4f350142f833b6 /interface.c
parent97ada9e02531e7db04e635aec262b056904fce8a (diff)
downloadvdr-d4eb96f725bed149762665ddee275301c9f069a6.tar.gz
vdr-d4eb96f725bed149762665ddee275301c9f069a6.tar.bz2
Added EIT support for current/next display0.6.2
Diffstat (limited to 'interface.c')
-rw-r--r--interface.c23
1 files changed, 20 insertions, 3 deletions
diff --git a/interface.c b/interface.c
index 244488aa..2ae49c33 100644
--- a/interface.c
+++ b/interface.c
@@ -4,13 +4,16 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: interface.c 1.10 2000/07/15 12:39:20 kls Exp $
+ * $Id: interface.c 1.11 2000/09/03 10:17:21 kls Exp $
*/
#include "interface.h"
#include <unistd.h>
+#include "eit.h"
#include "remote.h"
+cEIT EIT;
+
#if defined(REMOTE_RCU)
cRcIoRCU RcIo("/dev/ttyS1");
#elif defined(REMOTE_LIRC)
@@ -316,7 +319,7 @@ void cInterface::DisplayChannel(int Number, const char *Name)
{
RcIo.Number(Number);
if (Name && !Recording()) {
- Open(MenuColumns, 1);
+ Open(MenuColumns, EIT.IsValid() ? 5 : 1);
char buffer[MenuColumns + 1];
snprintf(buffer, sizeof(buffer), "%d %s", Number, Name ? Name : "");
Write(0, 0, buffer);
@@ -324,7 +327,21 @@ void cInterface::DisplayChannel(int Number, const char *Name)
struct tm *now = localtime(&t);
snprintf(buffer, sizeof(buffer), "%02d:%02d", now->tm_hour, now->tm_min);
Write(-5, 0, buffer);
- if (Wait(2, true) == kOk)
+ if (EIT.IsValid()) {
+ const int t = 7;
+ int w = MenuColumns - t;
+ Write(0, 1, EIT.GetRunningTime(), clrYellow, clrBackground);
+ snprintf(buffer, sizeof(buffer), "%.*s", w, EIT.GetRunningTitle());
+ Write(t, 1, buffer, clrCyan, clrBackground);
+ snprintf(buffer, sizeof(buffer), "%.*s", w, EIT.GetRunningSubtitle());
+ Write(t, 2, buffer, clrCyan, clrBackground);
+ Write(0, 3, EIT.GetNextTime(), clrYellow, clrBackground);
+ snprintf(buffer, sizeof(buffer), "%.*s", w, EIT.GetNextTitle());
+ Write(t, 3, buffer, clrCyan, clrBackground);
+ snprintf(buffer, sizeof(buffer), "%.*s", w, EIT.GetNextSubtitle());
+ Write(t, 4, buffer, clrCyan, clrBackground);
+ }
+ if (Wait(5, true) == kOk)
GetKey();
Close();
}