summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--HISTORY1
-rw-r--r--dxr3.c14
-rw-r--r--dxr3.h1
-rw-r--r--dxr3configdata.c1
-rw-r--r--dxr3configdata.h10
-rw-r--r--dxr3i18n.c26
6 files changed, 51 insertions, 2 deletions
diff --git a/HISTORY b/HISTORY
index 0e5835f..19cf8ee 100644
--- a/HISTORY
+++ b/HISTORY
@@ -286,3 +286,4 @@ NOTE: I havent found time to include all of the languages, will be done in pre2
- improve recovery and avoid lockups caused by bad streams (Jon Burgess)
- use VDR's facilities for logging (no more dxr3plugin.log), make it less
noisy (Ville Skyttä, Christian Gmeiner)
+- add setup option for hiding the main menu entry (Ville Skyttä)
diff --git a/dxr3.c b/dxr3.c
index 96102d3..b39a5b8 100644
--- a/dxr3.c
+++ b/dxr3.c
@@ -3,7 +3,7 @@
*
* See the README file for copyright information and how to reach the author.
*
- * $Id: dxr3.c,v 1.1.2.13 2005/06/22 16:57:58 scop Exp $
+ * $Id: dxr3.c,v 1.1.2.14 2005/07/06 18:04:46 scop Exp $
*
*/
@@ -80,6 +80,8 @@ cMenuSetupDxr3::cMenuSetupDxr3(void)
menuVideoModes[2] = tr("NTSC");
Add(new cMenuEditStraItem(tr("Video mode"),
&newVideoMode, 3, menuVideoModes));
+ newHideMenu = cDxr3ConfigData::Instance().GetHideMenu();
+ Add(new cMenuEditBoolItem(tr("Hide main menu entry"), &newHideMenu));
}
// ==================================
@@ -92,6 +94,8 @@ void cMenuSetupDxr3::Store(void)
cDxr3ConfigData::Instance().SetDxr3Card(newDxr3Card));
SetupStore("Dxr3VideoMode",
cDxr3ConfigData::Instance().SetVideoMode((eVideoMode) newVideoMode));
+ SetupStore("HideMenu",
+ cDxr3ConfigData::Instance().SetHideMenu(newHideMenu));
}
// ==================================
@@ -192,6 +196,11 @@ bool cPluginDxr3::SetupParse(const char *Name, const char *Value)
cDxr3ConfigData::Instance().SetVideoMode((eVideoMode) atoi(Value));
return true;
}
+ if (!strcasecmp(Name, "HideMenu"))
+ {
+ cDxr3ConfigData::Instance().SetHideMenu(atoi(Value));
+ return true;
+ }
return false;
}
@@ -199,7 +208,8 @@ bool cPluginDxr3::SetupParse(const char *Name, const char *Value)
// ==================================
const char* cPluginDxr3::MainMenuEntry()
{
- return tr(MAINMENUENTRY);
+ return cDxr3ConfigData::Instance().GetHideMenu() ?
+ NULL : tr(MAINMENUENTRY);
}
// ==================================
diff --git a/dxr3.h b/dxr3.h
index 350d591..cae4988 100644
--- a/dxr3.h
+++ b/dxr3.h
@@ -18,6 +18,7 @@ private:
int newDxr3Card;
int newVideoMode;
const char *menuVideoModes[3];
+ int newHideMenu;
};
diff --git a/dxr3configdata.c b/dxr3configdata.c
index 35a1544..86afb37 100644
--- a/dxr3configdata.c
+++ b/dxr3configdata.c
@@ -35,6 +35,7 @@ cDxr3ConfigData::cDxr3ConfigData()
m_brightness = 500;
m_contrast = 500;
m_saturation = 500;
+ m_hidemenu = 0;
}
// Local variables:
diff --git a/dxr3configdata.h b/dxr3configdata.h
index fe6a4f6..e13eb53 100644
--- a/dxr3configdata.h
+++ b/dxr3configdata.h
@@ -129,6 +129,15 @@ public:
return m_saturation = value;
}
+ int GetHideMenu() const
+ {
+ return m_hidemenu;
+ }
+ int SetHideMenu(int value)
+ {
+ return m_hidemenu = value;
+ }
+
protected:
eVideoMode m_videomode;
eMenuMode m_menumode;
@@ -140,6 +149,7 @@ protected:
int m_brightness;
int m_contrast;
int m_saturation;
+ int m_hidemenu;
};
#endif /*_DXR3_CONFIGDATA_H_*/
diff --git a/dxr3i18n.c b/dxr3i18n.c
index 4fcb0e9..50fc83d 100644
--- a/dxr3i18n.c
+++ b/dxr3i18n.c
@@ -544,6 +544,32 @@ const tI18nPhrase Phrases[] = {
#endif
#endif
},
+ {
+ "Hide main menu entry",
+ "Hauptmenüeintrag verstecken",
+ "", // Slovenski
+ "Nascondi voce menù",
+ "", // Nederlands
+ "", // Português
+ "", // Français
+ "", // Norsk
+ "Piilota valinta päävalikosta",
+ "", // Polski
+ "", // Español
+ "", // ÅëëçíéêÜ (Greek)
+ "", // Svenska
+ "", // Românã
+ "", // Magyar
+ "", // Català
+ "ÁÚàëâì ÚÞÜÐÝÔã Ò ÓÛÐÒÝÞÜ ÜÕÝî",
+ "", // Hrvatski
+#if VDRVERSNUM > 10312
+ "Peida valik peamenüüs",
+#if VDRVERSNUM > 10315
+ "", // Dansk
+#endif
+#endif
+ },
{ NULL }
};