Patch to add a new setup option to hide main menu. Fri Oct 23 09:12:33 CEST 2009 Manuel Reimer diff -U 6 -pr osdteletext-0.8.3.org/menu.c osdteletext-0.8.3/menu.c --- osdteletext-0.8.3.org/menu.c 2009-01-11 15:28:37.000000000 +0100 +++ osdteletext-0.8.3/menu.c 2009-10-21 17:15:32.622604164 +0200 @@ -653,12 +653,13 @@ TeletextSetup::TeletextSetup() { mapKeyToAction[2]=HalfPage; mapKeyToAction[0]=SwitchChannel; showClock=true; suspendReceiving=false; autoUpdatePage=true; + HideMainMenu=false; //OSDHeight+width default values given in Start() OSDHAlign=50; OSDVAlign=50; //use the value set for VDR's min user inactivity. //Initially this value could be changed via the plugin's setup, but I removed that diff -U 6 -pr osdteletext-0.8.3.org/osdteletext.c osdteletext-0.8.3/osdteletext.c --- osdteletext-0.8.3.org/osdteletext.c 2009-06-02 22:32:23.000000000 +0200 +++ osdteletext-0.8.3/osdteletext.c 2009-10-21 17:20:30.980072004 +0200 @@ -41,13 +41,13 @@ public: virtual const char *Version(void) { return VERSION; } virtual const char *Description(void) { return tr(DESCRIPTION); } virtual const char *CommandLineHelp(void); virtual bool ProcessArgs(int argc, char *argv[]); virtual bool Start(void); virtual void Housekeeping(void); - virtual const char *MainMenuEntry(void) { return tr(MAINMENUENTRY); } + virtual const char *MainMenuEntry(void); virtual cOsdObject *MainMenuAction(void); virtual cMenuSetupPage *SetupMenu(void); virtual bool SetupParse(const char *Name, const char *Value); }; class cTeletextSetupPage; @@ -217,12 +217,17 @@ void cPluginTeletextosd::initTexts() { void cPluginTeletextosd::Housekeeping(void) { // Perform any cleanup or other regular tasks. } +const char *cPluginTeletextosd::MainMenuEntry(void) +{ + return ttSetup.HideMainMenu ? 0 : tr(MAINMENUENTRY); +} + cOsdObject *cPluginTeletextosd::MainMenuAction(void) { // Perform the action when selected from the main VDR menu. return new TeletextBrowser(txtStatus); } @@ -246,12 +251,13 @@ bool cPluginTeletextosd::SetupParse(cons else if (!strcasecmp(Name, "autoUpdatePage")) ttSetup.autoUpdatePage=atoi(Value); else if (!strcasecmp(Name, "OSDheight")) ttSetup.OSDheight=atoi(Value); else if (!strcasecmp(Name, "OSDwidth")) ttSetup.OSDwidth=atoi(Value); else if (!strcasecmp(Name, "OSDHAlign")) ttSetup.OSDHAlign=atoi(Value); else if (!strcasecmp(Name, "OSDVAlign")) ttSetup.OSDVAlign=atoi(Value); else if (!strcasecmp(Name, "inactivityTimeout")) /*ttSetup.inactivityTimeout=atoi(Value)*/; + else if (!strcasecmp(Name, "HideMainMenu")) ttSetup.HideMainMenu=atoi(Value); else { for (int i=0;i> 24)); @@ -300,12 +307,13 @@ void cTeletextSetupPage::Store(void) { //SetupStore("suspendReceiving", ttSetup.suspendReceiving); SetupStore("autoUpdatePage", ttSetup.autoUpdatePage); SetupStore("OSDheight", ttSetup.OSDheight); SetupStore("OSDwidth", ttSetup.OSDwidth); SetupStore("OSDHAlign", ttSetup.OSDHAlign); SetupStore("OSDVAlign", ttSetup.OSDVAlign); + SetupStore("HideMainMenu", ttSetup.HideMainMenu); //SetupStore("inactivityTimeout", ttSetup.inactivityTimeout); } cTeletextSetupPage::cTeletextSetupPage(void) { cString buf; @@ -326,14 +334,15 @@ cTeletextSetupPage::cTeletextSetupPage(v temp.suspendReceiving=ttSetup.suspendReceiving; temp.autoUpdatePage=ttSetup.autoUpdatePage; temp.OSDheight=ttSetup.OSDheight; temp.OSDwidth=ttSetup.OSDwidth; temp.OSDHAlign=ttSetup.OSDHAlign; temp.OSDVAlign=ttSetup.OSDVAlign; + temp.HideMainMenu=ttSetup.HideMainMenu; //temp.inactivityTimeout=ttSetup.inactivityTimeout; - + Add(new cMenuEditIntItem(tr("Background transparency"), &tempConfiguredClrBackground, 0, 255)); Add(new cMenuEditBoolItem(tr("Show clock"), &temp.showClock )); //Add(new cMenuEditBoolItem(tr("Setup$Suspend receiving"), &temp.suspendReceiving )); @@ -341,12 +350,13 @@ cTeletextSetupPage::cTeletextSetupPage(v Add(new cMenuEditIntItem(tr("OSD height"), &temp.OSDheight, 250, MAXOSDHEIGHT)); Add(new cMenuEditIntItem(tr("OSD width"), &temp.OSDwidth, 320, MAXOSDWIDTH)); Add(new cMenuEditIntItem(tr("OSD horizontal align"), &temp.OSDHAlign, 0, 100)); Add(new cMenuEditIntItem(tr("OSD vertical align"), &temp.OSDVAlign, 0, 100)); + Add(new cMenuEditBoolItem(tr("Hide mainmenu entry"), &temp.HideMainMenu)); //Using same string as VDR's setup menu //Add(new cMenuEditIntItem(tr("Setup.Miscellaneous$Min. user inactivity (min)"), &temp.inactivityTimeout)); buf = cString::sprintf("%s:", tr("Key bindings")); item = new cOsdItem(*buf); diff -U 6 -pr osdteletext-0.8.3.org/po/ca_ES.po osdteletext-0.8.3/po/ca_ES.po --- osdteletext-0.8.3.org/po/ca_ES.po 2009-05-25 20:32:18.000000000 +0200 +++ osdteletext-0.8.3/po/ca_ES.po 2009-10-21 17:34:12.322135054 +0200 @@ -6,13 +6,13 @@ # Jordi Vil , 2003 # msgid "" msgstr "" "Project-Id-Version: VDR 1.5.7\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2008-12-20 10:45+0100\n" +"POT-Creation-Date: 2009-10-21 19:27+0200\n" "PO-Revision-Date: 2008-05-04 15:33+0200\n" "Last-Translator: Jordi Vil \n" "Language-Team: Catalanian\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=ISO-8859-1\n" "Content-Transfer-Encoding: 8bit\n" @@ -65,11 +65,14 @@ msgstr "Amplria OSD" msgid "OSD horizontal align" msgstr "" msgid "OSD vertical align" msgstr "" +msgid "Hide mainmenu entry" +msgstr "" + msgid "Key bindings" msgstr "" msgid " Page number" msgstr " Nombre de pgina" diff -U 6 -pr osdteletext-0.8.3.org/po/de_DE.po osdteletext-0.8.3/po/de_DE.po --- osdteletext-0.8.3.org/po/de_DE.po 2009-05-25 20:32:18.000000000 +0200 +++ osdteletext-0.8.3/po/de_DE.po 2009-10-21 17:36:05.769735267 +0200 @@ -4,13 +4,13 @@ # Klaus Schmidinger , 2000 # msgid "" msgstr "" "Project-Id-Version: VDR 1.5.7\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2008-12-20 10:45+0100\n" +"POT-Creation-Date: 2009-10-21 19:27+0200\n" "PO-Revision-Date: 2008-05-04 15:33+0200\n" "Last-Translator: Klaus Schmidinger \n" "Language-Team: German\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=ISO-8859-15\n" "Content-Transfer-Encoding: 8bit\n" @@ -63,11 +63,14 @@ msgstr "OSD-Breite" msgid "OSD horizontal align" msgstr "OSD horizontale Anordnung" msgid "OSD vertical align" msgstr "OSD vertikale Anordnung" +msgid "Hide mainmenu entry" +msgstr "Hauptmeneintrag verstecken" + msgid "Key bindings" msgstr "Tastenzuweisung" msgid " Page number" msgstr " Seitenzahl" diff -U 6 -pr osdteletext-0.8.3.org/po/es_ES.po osdteletext-0.8.3/po/es_ES.po --- osdteletext-0.8.3.org/po/es_ES.po 2009-05-25 20:32:18.000000000 +0200 +++ osdteletext-0.8.3/po/es_ES.po 2009-10-21 17:34:12.322135054 +0200 @@ -4,13 +4,13 @@ # Ruben Nunez Francisco , 2002 # msgid "" msgstr "" "Project-Id-Version: VDR 1.5.7\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2008-12-20 10:45+0100\n" +"POT-Creation-Date: 2009-10-21 19:27+0200\n" "PO-Revision-Date: 2008-05-04 15:33+0200\n" "Last-Translator: Ruben Nunez Francisco \n" "Language-Team: Spanish\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=ISO-8859-15\n" "Content-Transfer-Encoding: 8bit\n" @@ -63,11 +63,14 @@ msgstr "Anchura OSD" msgid "OSD horizontal align" msgstr "" msgid "OSD vertical align" msgstr "" +msgid "Hide mainmenu entry" +msgstr "" + msgid "Key bindings" msgstr "" msgid " Page number" msgstr " Nmero de pgina" diff -U 6 -pr osdteletext-0.8.3.org/po/fi_FI.po osdteletext-0.8.3/po/fi_FI.po --- osdteletext-0.8.3.org/po/fi_FI.po 2009-05-25 20:32:18.000000000 +0200 +++ osdteletext-0.8.3/po/fi_FI.po 2009-10-21 17:34:12.326135467 +0200 @@ -4,13 +4,13 @@ # Rolf Ahrenberg , 2003 # msgid "" msgstr "" "Project-Id-Version: VDR 1.5.7\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2008-12-20 10:45+0100\n" +"POT-Creation-Date: 2009-10-21 19:27+0200\n" "PO-Revision-Date: 2008-05-04 15:33+0200\n" "Last-Translator: Rolf Ahrenberg \n" "Language-Team: Finnish\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" @@ -63,11 +63,14 @@ msgstr "Leveys" msgid "OSD horizontal align" msgstr "Pystykeskitys" msgid "OSD vertical align" msgstr "Vaakakeskitys" +msgid "Hide mainmenu entry" +msgstr "" + msgid "Key bindings" msgstr "Näppäintoiminnot" msgid " Page number" msgstr " Sivunumero" diff -U 6 -pr osdteletext-0.8.3.org/po/fr_FR.po osdteletext-0.8.3/po/fr_FR.po --- osdteletext-0.8.3.org/po/fr_FR.po 2009-05-25 20:32:19.000000000 +0200 +++ osdteletext-0.8.3/po/fr_FR.po 2009-10-21 17:34:12.326135467 +0200 @@ -7,13 +7,13 @@ # Nicolas Huillard , 2005 # msgid "" msgstr "" "Project-Id-Version: VDR 1.5.7\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2008-12-20 10:45+0100\n" +"POT-Creation-Date: 2009-10-21 19:27+0200\n" "PO-Revision-Date: 2009-01-10 19:32+0100\n" "Last-Translator: Nival Michaël\n" "Language-Team: French\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" @@ -66,12 +66,14 @@ msgstr "Largeur OSD" msgid "OSD horizontal align" msgstr "Alignement horizontal de l'OSD" msgid "OSD vertical align" msgstr "Alignement vertical de l'OSD" +msgid "Hide mainmenu entry" +msgstr "" + msgid "Key bindings" msgstr "Attribution des touches" msgid " Page number" msgstr " Nombre de pages" - diff -U 6 -pr osdteletext-0.8.3.org/po/it_IT.po osdteletext-0.8.3/po/it_IT.po --- osdteletext-0.8.3.org/po/it_IT.po 2009-05-25 20:32:19.000000000 +0200 +++ osdteletext-0.8.3/po/it_IT.po 2009-10-21 17:34:12.326135467 +0200 @@ -8,13 +8,13 @@ # Diego Pierotto , 2008 # msgid "" msgstr "" "Project-Id-Version: VDR 1.5.7\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2008-12-20 10:45+0100\n" +"POT-Creation-Date: 2009-10-21 19:27+0200\n" "PO-Revision-Date: 2009-01-12 00:47+0100\n" "Last-Translator: Diego Pierotto \n" "Language-Team: Italian\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" @@ -69,12 +69,14 @@ msgstr "Larghezza OSD" msgid "OSD horizontal align" msgstr "Allineamento orizzontale OSD" msgid "OSD vertical align" msgstr "Allineamento verticale OSD" +msgid "Hide mainmenu entry" +msgstr "" + msgid "Key bindings" msgstr "Tasti associati" msgid " Page number" msgstr " Numero pagina" - diff -U 6 -pr osdteletext-0.8.3.org/po/pt_PT.po osdteletext-0.8.3/po/pt_PT.po --- osdteletext-0.8.3.org/po/pt_PT.po 2009-05-25 20:32:19.000000000 +0200 +++ osdteletext-0.8.3/po/pt_PT.po 2009-10-21 17:34:12.326135467 +0200 @@ -4,13 +4,13 @@ # Klaus Schmidinger , 2000 # msgid "" msgstr "" "Project-Id-Version: VDR 1.5.7\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2008-12-20 10:45+0100\n" +"POT-Creation-Date: 2009-10-21 19:27+0200\n" "PO-Revision-Date: 2008-05-04 15:33+0200\n" "Last-Translator: Chris Silva \n" "Language-Team: Portuguese\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=ISO-8859-15\n" "Content-Transfer-Encoding: 8bit\n" @@ -63,11 +63,14 @@ msgstr "Largura do OSD" msgid "OSD horizontal align" msgstr "Alinhamento Horizontal do OSD" msgid "OSD vertical align" msgstr "Alinhamento Vertical do OSD" +msgid "Hide mainmenu entry" +msgstr "" + msgid "Key bindings" msgstr "Tecla alocada" msgid " Page number" msgstr " Nmero de Pgina" diff -U 6 -pr osdteletext-0.8.3.org/po/ru_RU.po osdteletext-0.8.3/po/ru_RU.po --- osdteletext-0.8.3.org/po/ru_RU.po 2009-05-26 09:08:50.000000000 +0200 +++ osdteletext-0.8.3/po/ru_RU.po 2009-10-21 17:34:12.326135467 +0200 @@ -4,13 +4,13 @@ # Vyacheslav Dikonov , 2004 # msgid "" msgstr "" "Project-Id-Version: VDR 1.5.7\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2008-12-20 10:45+0100\n" +"POT-Creation-Date: 2009-10-21 19:27+0200\n" "PO-Revision-Date: 2008-12-30 13:52+0100\n" "Last-Translator: Oleg Roitburd \n" "Language-Team: Russian\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=ISO-8859-5\n" "Content-Transfer-Encoding: 8bit\n" @@ -64,12 +64,14 @@ msgstr " " msgid "OSD horizontal align" msgstr " OSD" msgid "OSD vertical align" msgstr " OSD" +msgid "Hide mainmenu entry" +msgstr "" + msgid "Key bindings" msgstr " " msgid " Page number" msgstr " " - diff -U 6 -pr osdteletext-0.8.3.org/po/uk_UA.po osdteletext-0.8.3/po/uk_UA.po --- osdteletext-0.8.3.org/po/uk_UA.po 2009-06-02 22:31:18.000000000 +0200 +++ osdteletext-0.8.3/po/uk_UA.po 2009-10-21 17:34:12.326135467 +0200 @@ -4,13 +4,13 @@ # Yarema P. aka Knedlyk , 2008 # msgid "" msgstr "" "Project-Id-Version: VDR 1.5.7\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2008-12-20 21:45+0100\n" +"POT-Creation-Date: 2009-10-21 19:27+0200\n" "PO-Revision-Date: 2009-05-25 20:33+0200\n" "Last-Translator: Yarema P. aka Knedlyk \n" "Language-Team: Ukrainian\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" @@ -63,11 +63,14 @@ msgstr "Ширина OSD" msgid "OSD horizontal align" msgstr "Горизонтальне положення OSD" msgid "OSD vertical align" msgstr "Вертикальне положення OSD" +msgid "Hide mainmenu entry" +msgstr "" + msgid "Key bindings" msgstr "Призначення клавіш" msgid " Page number" -msgstr " Номер сторінки" \ No newline at end of file +msgstr " Номер сторінки" diff -U 6 -pr osdteletext-0.8.3.org/setup.h osdteletext-0.8.3/setup.h --- osdteletext-0.8.3.org/setup.h 2008-12-19 22:20:54.000000000 +0100 +++ osdteletext-0.8.3/setup.h 2009-10-21 16:53:41.757004941 +0200 @@ -42,11 +42,12 @@ public: int autoUpdatePage; int OSDheight; int OSDwidth; int OSDHAlign; int OSDVAlign; int inactivityTimeout; + int HideMainMenu; }; extern TeletextSetup ttSetup; #endif