]> git.vomp.tv Git - vompclient-marten.git/commitdiff
More EPG tweaks, fix a freeze changing to a non-transmitting channel
authorChris Tallon <chris@vomp.tv>
Tue, 13 Dec 2005 00:29:10 +0000 (00:29 +0000)
committerChris Tallon <chris@vomp.tv>
Tue, 13 Dec 2005 00:29:10 +0000 (00:29 +0000)
13 files changed:
box.cc
box.h
command.cc
command.h
language-data.h
main.cc
message.h
vepg.cc
vlivebanner.cc
vvideolive.cc
wselectlist.cc
wtextbox.cc
wtextbox.h

diff --git a/box.cc b/box.cc
index 2a72bc532cc9611747ca82658201d1726e8c4143..f110d62e70a8695a99cdfe8a7b40ed07ad645726 100644 (file)
--- a/box.cc
+++ b/box.cc
@@ -32,6 +32,8 @@ Box::Box()
   offsetX = 0;
   offsetY = 0;
 
+  gap = 6; // default gap for drawPara
+
   numBoxes++;
   Log::getInstance()->log("Box", Log::DEBUG, "Construct, now %u", numBoxes);
 
@@ -60,6 +62,11 @@ void Box::setSurfaceOffset(UINT x, UINT y)
   offsetY = y;
 }
 
+void Box::setGap(UINT tgap)
+{
+  gap = tgap;
+}
+
 void Box::show()
 {
   blt(area);
@@ -112,7 +119,7 @@ void Box::fillColour(Colour& colour)
 void Box::drawPara(char* text, int x, int y, Colour& colour)
 {
   char line[256];
-  int lineHeight = surface->getFontHeight() + 6;
+  int lineHeight = surface->getFontHeight() + gap;
 
   int lineWidth;
   int thisCharWidth;
diff --git a/box.h b/box.h
index b9ea1a323999d0a74133ec2b15c322c81f6f333f..4d9feb8b6bbdfa51db8c546a7e2f08aea369b56f 100644 (file)
--- a/box.h
+++ b/box.h
@@ -37,6 +37,7 @@ class Box
 
     void setScreenPos(int x, int y); // Even numbers only!!!
     void setSurfaceOffset(UINT x, UINT y);
+    void setGap(UINT gap);
 
     void show(); // Obselete
     void blt(Region& r); // For use only by ViewMan
@@ -78,6 +79,8 @@ class Box
     UINT offsetX;
     UINT offsetY;
 
+    UINT gap;
+
     static char numBoxes;
 
     static const int paraMargin = 10;
index 2ac60ad6fe21bf6347e9c0b1dddcf099bcce005a..5c7731339dbe29e20ba0e0479ed3c2c0f2b15d03 100644 (file)
@@ -215,17 +215,16 @@ void Command::processMessage(Message* m)
       // objects deriving from messagequeues, make them derive from
       // messagereceiver - then one messagequeue can deliver any message to anywhere
 
-      // Try to segfault
-      logger->log("Command", Log::DEBUG, "1: %p", m);
-      logger->log("Command", Log::DEBUG, "2: %p", m->to);
-      logger->log("Command", Log::DEBUG, "3: %lu", m->parameter);
-
       // deliver timer
 
       ((TimerReceiver*)m->to)->timercall(m->parameter);
       handleCommand(Remote::NA_NONE); // in case any timer has posted messages to viewman,
                                       // run viewman message queue here. FIXME improve this!
-      // FIXME unlock main mutex
+      break;
+    }
+    case Message::SCREENSHOT:
+    {
+      Osd::getInstance()->screenShot("/out.jpg");
     }
   }
 }
@@ -263,14 +262,17 @@ void Command::handleCommand(int button)
       doStandby();
       return;
     }
+  }
+}
+
+void Command::sig1()
+{
 #ifdef DEV
-    case Remote::RECORD:
-    {
-      Osd::getInstance()->screenShot("/out.jpg");
-      return;
-    }
+  Message* m = new Message();
+  m->message = Message::SCREENSHOT;
+  m->to = this;
+  postMessage(m);
 #endif
-  }
 }
 
 void Command::doStandby()
index ccd651ff73d1c0f863b1a33100710a8c4da4aa8d..3fe958ec61d8bbf6646ae25e57c96d8a57d64130 100644 (file)
--- a/command.h
+++ b/command.h
@@ -69,6 +69,7 @@ class Command : public MessageQueue
     void doReboot();
     void postMessage(Message* m); // override of MessageQueue::postMessage
     bool postMessageIfNotBusy(Message* m); // for timers, when masterMutex might be locked
+    void sig1();
 
   private:
     void handleCommand(int);
index d64e157308472900785244661f3d0871caf3d074..bdbb189ba998e3d4083c08dcdb0ccd1e88d1d399 100644 (file)
@@ -57,7 +57,7 @@
 
 #ifdef I18N_HEADER
 
-#define NUM_LANGUAGES 4
+#define NUM_LANGUAGES 5
 #define DEFAULT_LANGUAGE_INDEX 0
 
 #else
@@ -66,8 +66,9 @@
 const char* const I18n::Languages[] =
 {
   "English",
-  "Deutsch", // By André Jagusch
-  "Svenska", // By Lars Fredriksson
+  "Deutsch", // German by André Jagusch
+  "Svenska", // Swedish by Lars Fredriksson
+  "Magyar",  // Hungarian by Pák Gergely
   "Test"
 };
 
@@ -77,6 +78,7 @@ const char* const I18n::charSets[] =
   "iso8859-1",
   "iso8859-1",
   "iso8859-1",
+  "iso8859-1",
   "iso8859-1"
 };
 
@@ -86,6 +88,7 @@ const char* const I18n::languageCodes[] =
   "eng,dos",
   "deu,ger",
   "sve,swe",
+  "hun",
   "tst,xxx"
 };
 
@@ -97,65 +100,78 @@ const I18n::tI18nPhrase I18n::Phrases[] =
     "VDR",
     "VDR",
     "VDR",
+    "VDR",
   },
   { "Schedule",
     "Programm",
     "Program",
+    "Müsor",
     "0",
   },
   // Welcome screen
   { "Welcome",
     "Willkommen",
     "Välkommen",
+    "Üdvözöljük",
     "1",
   },
   { "1. Live TV",
     "1. Fernsehen",
     "1. TV",
+    "1. TV",
     "2",
   },
   { "2. Radio",
     "2. Radio",
     "2. Radio",
+    "2. Rádió",
     "3",
   },
   { "3. Recordings",
     "3. Aufnahmen",
     "3. Inspelningar",
+    "3. Felvételek",
     "4",
   },
   { "4. Options",
     "4. Einstellungen",
     "4. Inställningar",
+    "4. Beállítások",
     "5",
   },
   { "5. Stand by",
     "5. Stand-by",
     "5. Stäng av",
+    "5. Készenlét",
     "6",
   },
   { "6. Reboot",
     "6. Neustart",
     "6. Starta om",
+    "6. Újraindítás",
     "7",
   },
   { "Downloading recordings list",
     "Lade die Aufnahmen-Liste",
     "Laddar lista över inspelningar",
+    "Felvétellista letöltése",
     "8",
   },
   // Recordings list
   { "Recordings - %s",
     "Aufnahmen - %s",
     "Inspelningar - %s",
+    "Felvételek - %s",
     "9 - %s",
   },
   { "Recordings",
     "Aufnahmen",
     "Inspelningar",
+    "Felvételek",
     "10",
   },
   { "<dir> %lu\t%s",
+    "<dir> %lu\t%s",
     "<dir> %lu\t%s",
     "<dir> %lu\t%s",
     "11 %lu\t%s",
@@ -163,79 +179,94 @@ const I18n::tI18nPhrase I18n::Phrases[] =
   { "[ok] = menu",
     "[ok] = Menü",
     "[ok] = meny",
+    "[ok] = menü",
     "12",
   },
   { "%lu%% used, %iGB free",
     "%lu%% belegt, %iGB frei",
     "%lu% använt, %iGB ledigt",
+    "%lu% felhasznált, %iGB szabad",
     "13 %lu%% %i",
   },
   { "%i to %i of %i", // Also used in channels list
     "%i bis %i (von %i)",
     "%i av %i till %i",
+    "%i - %i (összesen %i)",
     "14 %i %i %i",
   },
   // Question
   { "Yes",
     "Ja",
     "Ja",
+    "Igen",
     "15",
   },
   { "No",
     "Nein",
     "Nej",
+    "Nem",
     "16",
   },
   // Recording Menu
   { "Programme menu",
     "Programm-Menü",
     "Programmeny",
+    "Müsor menü",
     "17",
   },
   { "Play",
     "Wiedergeben",
     "Spela upp",
+    "Lejátszás",
     "18",
   },
   { "Resume",
     "Fortsetzen",
     "Återuppta",
+    "Folytatás",
     "19",
   },
   { "Summary",
     "Inhalt",
     "Sammanfattning",
+    "Tartalom",
     "20",
   },
   { "Delete",
     "Löschen",
     "Ta bort",
+    "Törlés",
     "21",
   },
   { "Programme summary",
     "Programminhalt",
     "Programsammanfattning",
+    "Müsor tartalom",
     "22",
   },
   { "Summary unavailable",
     "Inhalt nicht verfügbar",
     "Ingen sammanfattning tillgänglig",
+    "Tartalom nem elérhetö",
     "23",
   },
   { "Delete recording",
     "Aufnahme löschen",
     "Ta bort inspelning",
+    "Felvétel törlése",
     "24",
   },
   { "Are you sure you want to delete this recording?",
     "Sind Sie sich sicher, dass Sie diese Aufnahme löschen möchten?",
     "Är du säker att du vill ta bort den här inspelningen",
+    "Biztosan törölni szeretné ezt a felvételt?",
     "25",
   },
   // Server select
   { "Choose a VDR server",
     "Wählen Sie einen VDR-Server",
     "Välj VDR server",
+    "Válasszon egy VDR szervert",
     "26",
   },
 
@@ -243,70 +274,84 @@ const I18n::tI18nPhrase I18n::Phrases[] =
   { "Options",
     "Einstellungen",
     "Inställningar",
+    "Beállitások",
     "27",
   },
   { "TV connection type",
     "TV-Anschlußart",
     "Typ av TV-anslutning",
+    "TV csatlakozás tipusa",
     "28",
   },
   { "Remote control type",
     "Fernbedienungstyp",
     "Fjärrkontroll",
+    "Távirányitó tipusa",
     "29",
   },
   { "TV aspect ratio",
     "Seitenverhältnis",
     "TV-format",
+    "TV képformátum",
     "30",
   },
   { "16:9 on 4:3 display mode",
     "16:9 auf 4:3-Modus",
     "16:9 på 4:3-skärm",
+    "16:9 a 4:3-as képernyön",
     "30a",
   },
   { "Power state after bootup",
     "Einschalten nach Neustart",
     "Läge efter strömborfall",
+    "Bekapcsolás utáni állapot",
     "31",
   },
   { "Display channels",
     "Kanäle anzeigen",
     "Visa kanaler",
+    "Csatornák megjelenítése",
     "32",
   },
   { "Language",
     "Sprache",
     "Språk",
+    "Nyelv",
     "33",
   },
   { "Press back to exit, <, > or [ok] to change",
     "Zum Verlassen back drücken, <, > oder [ok] zum Wechseln",
     "Tryck [back] för att avsluta, eller [ok] för att ändra",
+    "[back] gombbal kilép, [<], [>] vagy [ok] gombbal választ",
     "34",
   },
   { "VDR-Pri 0=OK !See forums!",
     "VDR-Pri 0=OK !Siehe Forum!",
     "VDR-Prio 0=OK !Se forum!",
+    "VDR-Pri 0=OK !lásd. fórum!",
     "34a",
   },
   // Option choices
   { "Old",
     "Alt",
     "Gammal modell",
+    "Régi",
     "35",
   },
   { "New",
     "Neu",
     "Ny modell",
+    "Új",
     "36",
   },
   { "RGB+composite",
     "RGB+composite",
     "RGB+komposit",
+    "RGB+composite",
     "37",
   },
   { "S-Video",
+    "S-Video",
     "S-Video",
     "S-Video",
     "38",
@@ -314,9 +359,11 @@ const I18n::tI18nPhrase I18n::Phrases[] =
   { "Chop sides",
     "Seiten abschneiden",
     "Ta bort på sidorna",
+    "Szélek levágva",
     "39",
   },
   { "Letterbox",
+    "Letterbox",
     "Letterbox",
     "Letterbox",
     "40",
@@ -324,26 +371,31 @@ const I18n::tI18nPhrase I18n::Phrases[] =
   { "Last state",
     "Letzter Zustand",
     "Återgå til senaste läge",
+    "Utolsó állapot",
     "41",
   },
   { "All",
     "Alle",
     "Alla",
+    "Összes",
     "42",
   },
   { "FTA only",
     "nur FTA",
     "Endast FTA",
+    "Csak FTA",
     "43",
   },
   { "On",
     "An",
     "På",
+    "Be",
     "44",
   },
   { "Off",
     "Aus",
     "Av",
+    "Ki",
     "45",
   },
 
@@ -351,62 +403,134 @@ const I18n::tI18nPhrase I18n::Phrases[] =
   { "Channels",
     "Fernsehkanäle",
     "Kanaler",
+    "Csatornák",
     "46",
   },
   { "Radio Stations",
     "Radiokanäle",
     "Radiostationer",
+    "Rádiócsatornák",
     "47",
   },
   // Banners
   { "No channel data available",
     "Keine Daten für diesen Kanal verfügbar",
     "Ingen programinformation tillgänglig",
+    "Csatorna-adatok nem állnak rendelkezésre",
     "48",
   },
   { "info",
     "Info",
     "Info",
+    "Infó",
     "49",
   },
   { "info",
     "Info",
     "Info",
+    "Infó",
     "50",
   },
   { "Channel unavailable",
     "Kanal nicht verfügbar",
     "Kanalen är inte tillgänglig",
+    "A csatorna nem elérhetö",
     "51",
   },
   // Connect screen
   { "Locating server",
     "Lokalisiere Server",
     "Letar efter server",
+    "Szerver keresése",
     "52",
   },
   { "Connecting to VDR",
     "Verbinde zum VDR",
     "Ansluter till VDR",
+    "Csatlakozás a VDR-hez",
     "53",
   },
   { "Login failed",
     "Login fehlgeschlagen",
     "Inloggning misslycklades",
+    "Bejelentkezés sikertelen",
     "54",
   },
   { "Connection failed",
     "Verbindung fehlgeschlagen",
     "Anslutning misslyckades",
+    "Kapcsolódás sikertelen",
     "55",
   },
   // Command
   { "Connected, loading config",
     "Verbunden, lade Einstellungen",
     "Ansluten, laddar konfigurering",
+    "Kapcsolódva, beállitások betöltése",
     "56",
   },
-  // End marker.
+  // EPG
+  { "EPG",
+    "EPG",
+    "EPG",
+    "EPG",
+    "57",
+  },
+  { "Page up",
+    "Seite hoch",
+    "",
+    "Visszalapozás",
+    "58",
+  },
+  { "Page down",
+    "Seite runter",
+    "",
+    "Elörelapozás",
+    "59",
+  },
+  { "-24 hours",
+    "-24 Stunden",
+    "",
+    "-24 óra",
+    "60",
+  },
+  { "+24 hours",
+    "+24 Stunden",
+    "",
+    "+24 óra",
+    "61",
+  },
+  { "Guide / Back: Close",
+    "EPG / Zurück: Schließen",
+    "",
+    "Guide / Back: Bezárás",
+    "62",
+  },
+  { "Rec: Set timer",
+    "Rec: Aufnahme programmieren",
+    "",
+    "Rec: Felvétel beállítása",
+    "63",
+  },
+  { "Sel channel",
+    "Kanal auswählen",
+    "",
+    "Csatornaválasztás",
+    "64",
+  },
+  { "There are no programme details available for this period",
+    "Es sind keine Programminformationen für diesen Zeitraum verfügbar",
+    "",
+    "Nincs programinformáció ehhez az idöszakhoz",
+    "65",
+  },
+  { "No programme details",
+    "Keine Programminformation",
+    "",
+    "Nincs programinformáció",
+    "66",
+  },
+ // End marker.
   { NULL }
 };
 
diff --git a/main.cc b/main.cc
index 4dfbbc2f51d67649ec69f1e629e38bb453cb9527..723ea6b5c9a51aa5f5682d4da7fb551a97805cd7 100644 (file)
--- a/main.cc
+++ b/main.cc
@@ -139,12 +139,14 @@ int main(int argc, char** argv)
     logger->log("Core", Log::EMERG, "Could not set up signal handler for SIGUSR1. Aborting.");
     shutdown(1);
   }
+/*
   sigtest = signal(SIGUSR2, sighandler);
   if (sigtest == SIG_ERR)
   {
     logger->log("Core", Log::EMERG, "Could not set up signal handler for SIGUSR2. Aborting.");
     shutdown(1);
   }
+*/
   sigtest = signal(SIGURG, sighandler);
   if (sigtest == SIG_ERR)
   {
@@ -207,7 +209,7 @@ int main(int argc, char** argv)
   else if (videoFormat == Video::NTSC) logger->log("Core", Log::INFO, "Read from MTD: NTSC 720x480");
   else                                 logger->log("Core", Log::INFO, "No help from MTD. Assuming NTSC 720x480");
 
-  //videoFormat = Video::NTSC; // enable this line to test NTSC in PAL land
+//  videoFormat = Video::NTSC; // enable this line to test NTSC in PAL land
 
   success = video->init(videoFormat);
   if (success)
@@ -378,7 +380,7 @@ void shutdown(int code)
 
 void sighandler(int signalReceived)
 {
-  logger->log("Core", Log::NOTICE, "Signal %i received", signal);
+  logger->log("Core", Log::NOTICE, "Signal %i received", signalReceived);
 
   switch (signalReceived)
   {
@@ -394,6 +396,12 @@ void sighandler(int signalReceived)
       command->stop(); // FIXME this is probably not safe - use the messaging system / is that even safe?
       break;
     }
+    case SIGUSR1:
+    {
+      command->sig1();
+      break;
+    }
+/*
     case SIGUSR1:
     {
       logger->log("Core", Log::DEBUG, "SIGUSR1 caught");
@@ -406,6 +414,7 @@ void sighandler(int signalReceived)
       logger->downLogLevel();
       break;
     }
+*/
     case SIGURG:
     {
       logger->log("Core", Log::DEBUG, "SIGURG caught");
index b238ec4ce8baf6a401656d7c632f2b3ff596c673..4caf10d31eb141bbc97a099503d36b3774fb5a4f 100644 (file)
--- a/message.h
+++ b/message.h
@@ -41,6 +41,7 @@ class Message
     const static ULONG CLOSE_ME = 2;
     const static ULONG PLAY_SELECTED_RECORDING = 3;
     const static ULONG DELETE_SELECTED_RECORDING = 4;
+    const static ULONG SCREENSHOT = 5;
     const static ULONG CHANNEL_CHANGE = 6;
     const static ULONG RESUME_SELECTED_RECORDING = 7;
     const static ULONG STANDBY = 8;
diff --git a/vepg.cc b/vepg.cc
index 88e38a2d12bcc23f89a756123618b37fb6d02e4c..af6d2dae804126e4d2fdb041cf5243ef2eed6539 100644 (file)
--- a/vepg.cc
+++ b/vepg.cc
 \r
 VEpg::VEpg(VVideoLive* v, UINT currentChannel)\r
 {\r
+  // initialise variables and pointers
   viewman = ViewMan::getInstance();\r
+  videoLive = v;
+  eventList = NULL;
+  chanList = VDR::getInstance()->getChannelsList(VDR::VIDEO); //TODO want to be able to display video and radio together
+  e = 0;
 \r
   for(UINT listIndex = 0; listIndex < 7; listIndex++)\r
   {\r
@@ -43,46 +48,48 @@ VEpg::VEpg(VVideoLive* v, UINT currentChannel)
     eventLista[listIndex] = NULL;\r
   }\r
 \r
-\r
-// Create pallet on which to paint our epg view and position it in centre of screen.\r
-// Need to reduce size to deal with overscanning TVs.\r
-  videoLive = v;\r
-//  create(640, 530);\r
-//TODO: have size for ntsc\r
+  // Create pallet on which to paint our epg view and position it in centre of screen.\r
+  // Need to reduce size to deal with overscanning TVs.\r
+
+  // FIXME have size for ntsc\r
   if (Video::getInstance()->getFormat() == Video::PAL)\r
   {\r
-    create(632, 520);\r
-    setScreenPos(60, 30);\r
+    create(632, 541);\r
+    setScreenPos(60, 16);\r
   }\r
   else\r
   {\r
-  // what can we do about poor ntsc?\r
-    create(512, 384);\r
-    setScreenPos(64, 51);\r
+    create(632, 440);\r
+    setScreenPos(50, 10);\r
   }\r
 \r
 // beautify\r
   Colour transparent = Colour(0, 0, 0, 0);\r
   setBackgroundColour(transparent);\r
-// initialise variables and pointers\r
-  eventList = NULL;\r
-  chanList = VDR::getInstance()->getChannelsList(VDR::VIDEO); //TODO want to be able to display video and radio together\r
-  e = 0;\r
+
   progTitle.setSurface(surface);\r
   progTitle.setSurfaceOffset(0,0);\r
-  progTitle.setDimensions(300,(Surface::getFontHeight() + 6) * 2 + 2); //paragraph line seperation is 6 pixels\r
+  progTitle.setDimensions(300,(Surface::getFontHeight() + 6) * 2 + 16); //paragraph line seperation is 6 pixels\r
   progTitle.setBackgroundColour(Colour::TITLEBARBACKGROUND);\r
+  progTitle.setTextPos(5, 16);
+
   progInfo.setSurface(surface);\r
   progInfo.setSurfaceOffset(0, progTitle.getOffsetY() + progTitle.getHeight());\r
-  progInfo.setDimensions(300,(Surface::getFontHeight() + 6) * 8 + 2);\r
+  progInfo.setDimensions(300,(Surface::getFontHeight() + 4) * 8 + 12);\r
+  progInfo.setGap(4);
+
   chanName.setSurface(surface);\r
   chanName.setDimensions(510, (Surface::getFontHeight() + 4));\r
-  chanName.setSurfaceOffset(305,230);\r
+  chanName.setSurfaceOffset(305,244);\r
   chanName.setBackgroundColour(Colour(0, 0, 0, 90));\r
-// create area to display list of channels\r
+
+  // create area to display list of channels\r
   chanListbox.setSurface(surface); // add channel list\r
   chanListbox.setSurfaceOffset(0, progInfo.getOffsetY() + progInfo.getHeight() + Surface::getFontHeight() + 8); // position channel list\r
-  chanListbox.setDimensions(150, (Surface::getFontHeight() + 1) * 7 + 5); //listbox line seperation is 1 pixel\r
+  chanListbox.setDimensions(150, (Surface::getFontHeight() + 2) * 7 + 5); //listbox line seperation is 1 pixel\r
+  chanListbox.setGap(2);
+
+
 // populate channel list\r
   Channel* chan;\r
   int first = 1;\r
@@ -150,13 +157,11 @@ void VEpg::draw()
 \r
   // Moved all the dynamic data drawing to a seperate function\r
 \r
-\r
-  Log::getInstance()->log("EPG", Log::DEBUG, "START TIME");\r
   // Display the status and key stuff at the bottom\r
   int keyx = chanListbox.getOffsetX();\r
   int keyy = chanListbox.getOffsetY() + chanListbox.getHeight() + 2;\r
-  surface->fillblt(keyx, keyy, 610, Surface::getFontHeight() * 2 + 14, surface->rgba(100, 100, 100, 255));\r
-\r
+  surface->fillblt(keyx, keyy, 605, Surface::getFontHeight() * 2 + 14, surface->rgba(100, 100, 100, 255));\r
+
   WSymbol w;\r
   w.setSurface(surface);\r
 \r
@@ -206,9 +211,6 @@ void VEpg::draw()
   surface->fillblt(keyx + 474, keyy + Surface::getFontHeight() + 8, 128, Surface::getFontHeight() + 2, surface->rgba( 180, 180, 180, 255));\r
   drawText(tr("Go: Preview"), keyx + 476, keyy + Surface::getFontHeight() + 9, Colour::LIGHTTEXT);\r
 \r
-\r
-  Log::getInstance()->log("EPG", Log::DEBUG, "END TIME");\r
-\r
   // Draw all the dynamic data\r
   drawData();\r
 }\r
@@ -222,7 +224,7 @@ void VEpg::drawData()
   rectangle(\r
     chanListbox.getOffsetX(),\r
     chanListbox.getOffsetY() - Surface::getFontHeight() - 3,\r
-    610, // FIXME make this dynamic\r
+    155 + WINDOW_WIDTH * MINUTE_SCALE,\r
     chanListbox.getHeight() + Surface::getFontHeight() + 3,\r
     Colour::BLACK);\r
 \r
@@ -489,7 +491,7 @@ void VEpg::drawgrid() // redraws grid and select programme
         paintCell(&noevent, y, bg, fg);\r
       }\r
     }\r
-    y += Surface::getFontHeight() + 1;\r
+    y += Surface::getFontHeight() + 2;\r
   }\r
   setInfo(&thisEvent);\r
 }\r
index fd48254c28df5fdb561fb47a6fc7150dc3236b91..e1770b4ff3e4f0f042083eca115f45648c938d77 100644 (file)
@@ -138,10 +138,10 @@ void VLiveBanner::draw()
   rectangle(0, area.h - 30, area.w, 30, titleBarColour);
 
   rectangle(7, area.h - 24, 18, 16, Colour::RED);
-  drawText(tr("info"), 32, area.h - 25, Colour::LIGHTTEXT);
+  drawText(tr("EPG"), 32, area.h - 25, Colour::LIGHTTEXT);
 
   rectangle(110, area.h - 24, 18, 16, Colour::GREEN);
-  drawText(tr("EPG"), 135, area.h - 25, Colour::LIGHTTEXT);
+  drawText(tr("info"), 135, area.h - 25, Colour::LIGHTTEXT);
 
   drawClock();
 }
@@ -212,7 +212,7 @@ int VLiveBanner::handleCommand(int command)
       ViewMan::getInstance()->postMessage(m);
       return 2;
     }
-    case Remote::RED:
+    case Remote::GREEN:
     case Remote::MENU:
     {
       if (!eventList) return 2;
@@ -253,7 +253,8 @@ int VLiveBanner::handleCommand(int command)
       }
       return 2; // should not get here
     }
-    case Remote::GREEN:
+    case Remote::GUIDE:
+    case Remote::RED:
     {
       // full epg
       Timers::getInstance()->cancelTimer(this, 1); // if it exists
index 082e7f67a6bfdce72fe952acaf79313042eb9d64..a340c9633002531938786a2fb3e07d313fc6977e 100644 (file)
@@ -215,7 +215,7 @@ void VVideoLive::processMessage(Message* m)
   {
     Log::getInstance()->log("VVideoLive", Log::DEBUG, "streamEnd");
     stop();
-    play(1);
+    showUnavailable(1);
   }
   else if (m->message == Message::EPG)
   {
@@ -280,7 +280,7 @@ void VVideoLive::showUnavailable(int active)
   else
   {
     unavailable = 0;
-    ViewMan::getInstance()->removeView(unavailableView);
+    viewman->removeView(unavailableView);
     unavailableView = NULL;
   }
 }
@@ -347,12 +347,15 @@ UINT VVideoLive::getCurrentChannelIndex()
 void VVideoLive::showEPG()
 {
   if (unavailable) showUnavailable(0);
-  vepg = new VEpg(this, currentChannel);
-  ViewMan::getInstance()->add(vepg);
+
   Video::getInstance()->setMode(Video::QUARTER);
   Video::getInstance()->setPosition(170, 5); //TODO need to deal with 4:3 switching
+
+  vepg = new VEpg(this, currentChannel);
   vepg->draw();
-  vepg->show();
+
+  viewman->add(vepg);
+  viewman->updateView(vepg);
 }
 
 void VVideoLive::setEpgMode(bool mode)
index 2cd7c9eb4e8dc499f9e4c1770f7f54fb5ef247b5..9942ff5b268302db3da6374358ba61dcbc480f23 100644 (file)
@@ -27,6 +27,7 @@ WSelectList::WSelectList()
   numOptionsDisplayable = 0;
   numColumns = 0;
   noLoop = 0;
+  gap = 1;
 }
 
 WSelectList::~WSelectList()
@@ -78,7 +79,7 @@ int WSelectList::addOption(char* text, int selected)
 void WSelectList::draw()
 {
   int fontHeight = surface->getFontHeight();
-  int ySeperation = fontHeight + 1;
+  int ySeperation = fontHeight + gap;
 
   numOptionsDisplayable = (area.h - 5) / ySeperation;
 
index 33fb99dad5ddb41c4aae2519e91dd9d028e2b7a8..1d2deed5153871300027d947108b59eba147cf84 100644 (file)
@@ -28,6 +28,8 @@ WTextbox::WTextbox()
   text = NULL;\r
   foreColour = Colour::LIGHTTEXT;\r
   backColour = Colour::VIEWBACKGROUND;\r
+  textX = 5;\r
+  textY = 2;\r
 }\r
 \r
 WTextbox::~WTextbox()\r
@@ -56,6 +58,11 @@ void WTextbox::draw()
 {\r
   fillColour(backColour);\r
   if (text)\r
-    drawPara(text, 5, 2, foreColour);\r
+    drawPara(text, textX, textY, foreColour);\r
 }\r
 \r
+void WTextbox::setTextPos(int x, int y)\r
+{\r
+  textX = x;\r
+  textY = y;\r
+}\r
index 1037d3e5d30a0537065b7ebf4d610223d28091c0..53bd72190b799f6104222c265c3f61bdc4fb15cb 100644 (file)
@@ -37,12 +37,15 @@ class WTextbox : public Widget
     void draw();\r
     void setBackgroundColour(Colour bcolour);\r
     void setForegroundColour(Colour fcolour);\r
+    void setTextPos(int x, int y); // optional\r
 \r
   private:\r
 \r
     char* text;\r
     Colour foreColour;\r
     Colour backColour;\r
+    int textX;\r
+    int textY;\r
 };\r
 \r
 #endif\r