summaryrefslogtreecommitdiff
path: root/menu.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <kls (at) cadsoft (dot) de>2004-01-11 18:00:00 +0100
committerKlaus Schmidinger <kls (at) cadsoft (dot) de>2004-01-11 18:00:00 +0100
commita76a03c0d815680e3e8fc52f24f60a30177d3021 (patch)
tree50c39ea8e54d1d4242f10ab636e8500505201e5b /menu.c
parent93a94b18b540fbcb9bcdaaea9abd26cdf23d6ee6 (diff)
downloadvdr-patch-lnbsharing-a76a03c0d815680e3e8fc52f24f60a30177d3021.tar.gz
vdr-patch-lnbsharing-a76a03c0d815680e3e8fc52f24f60a30177d3021.tar.bz2
Version 1.3.1vdr-1.3.1
- Fixed a lockup in the EPG scanner when no non-primary device was available (thanks to Martin Holst for reporting this one). - Fixed a compiler warning about virtual cConfig::Load() functions (thanks to Lauri Tischler for reporting this one). - Fixed a warning about character comparison in libsi/si.c (thanks to Lauri Tischler for reporting this one). - The new parameter "Update channels" in the "Setup/DVB" menu can be used to control if and how channels will be automatically updated (see MANUAL). This has already been part of the 'autopid' patch by Andreas Schultz and has now been adopted. - Fixed a crash in case there is no DVB hardware present (thanks to Sascha Volkenandt for reporting this one). - Changed calculation of channel ids to make it work for tv stations that use the undefined NID value 0 (thanks to Teemu Rantanen for reporting this one). - Enhanced the SDT filter to handle multi part sections. - Added support for selecting preferred EPG languages (based upon a patch by Teemu Rantanen). - Fixed a 'const' in libsi/si.h (thanks to Marcel Wiesweg). - Fixed the 'su' call in 'runvdr' to make it work on systems that require the user name to appear before the command option (thanks to Robert Huitl). - Fixed testing for matching section filters in case they are turned off (thanks to Marcel Wiesweg). - In case of incomplete sections an error message is now logged only every 10 seconds. - Fixed a possible NULL pointer access in cEITScanner::Process() (thanks to Andreas Kool). - The actual transponder data is now taken from the NIT and existing channels are adjusted if necessary. If the NIT contains new transponders, they are scanned for channels during the next EPG scan. Note that only the satellite branches are tested, cable and terrestrial need to be tested by somebody who actually has such equipment.
Diffstat (limited to 'menu.c')
-rw-r--r--menu.c79
1 files changed, 77 insertions, 2 deletions
diff --git a/menu.c b/menu.c
index 5e628bb..cf9d8eb 100644
--- a/menu.c
+++ b/menu.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: menu.c 1.276 2004/01/04 11:12:43 kls Exp $
+ * $Id: menu.c 1.279 2004/01/11 15:40:32 kls Exp $
*/
#include "menu.h"
@@ -2029,22 +2029,90 @@ eOSState cMenuSetupOSD::ProcessKey(eKeys Key)
// --- cMenuSetupEPG ---------------------------------------------------------
class cMenuSetupEPG : public cMenuSetupBase {
+private:
+ int originalNumLanguages;
+ int numLanguages;
+ void Setup(void);
public:
cMenuSetupEPG(void);
+ virtual eOSState ProcessKey(eKeys Key);
};
cMenuSetupEPG::cMenuSetupEPG(void)
{
+ for (numLanguages = 0; numLanguages < I18nNumLanguages && data.EPGLanguages[numLanguages] >= 0; numLanguages++)
+ ;
+ originalNumLanguages = numLanguages;
SetSection(tr("EPG"));
+ Setup();
+}
+
+void cMenuSetupEPG::Setup(void)
+{
+ int current = Current();
+
+ Clear();
+
Add(new cMenuEditIntItem( tr("Setup.EPG$EPG scan timeout (h)"), &data.EPGScanTimeout));
Add(new cMenuEditIntItem( tr("Setup.EPG$EPG bugfix level"), &data.EPGBugfixLevel, 0, MAXEPGBUGFIXLEVEL));
Add(new cMenuEditBoolItem(tr("Setup.EPG$Set system time"), &data.SetSystemTime));
- Add(new cMenuEditTranItem(tr("Setup.EPG$Use time from transponder"), &data.TimeTransponder));
+ if (data.SetSystemTime)
+ Add(new cMenuEditTranItem(tr("Setup.EPG$Use time from transponder"), &data.TimeTransponder));
+ Add(new cMenuEditIntItem( tr("Setup.EPG$Preferred languages"), &numLanguages, 0, I18nNumLanguages));
+ for (int i = 0; i < numLanguages; i++)
+ Add(new cMenuEditStraItem(tr("Setup.EPG$Preferred language"), &data.EPGLanguages[i], I18nNumLanguages, I18nLanguages()));
+
+ SetCurrent(Get(current));
+ Display();
+}
+
+eOSState cMenuSetupEPG::ProcessKey(eKeys Key)
+{
+ int oldnumLanguages = numLanguages;
+ int oldSetSystemTime = data.SetSystemTime;
+
+ eOSState state = cMenuSetupBase::ProcessKey(Key);
+ if (Key == kOk) {
+ bool Modified = numLanguages != originalNumLanguages;
+ if (!Modified) {
+ for (int i = 0; i < numLanguages; i++) {
+ if (data.EPGLanguages[i] != ::Setup.EPGLanguages[i]) {
+ Modified = true;
+ break;
+ }
+ }
+ }
+ if (Modified)
+ cSchedules::ResetVersions();
+ }
+ else if (Key != kNone) {
+ if (numLanguages != oldnumLanguages || data.SetSystemTime != oldSetSystemTime) {
+ for (int i = oldnumLanguages; i < numLanguages; i++) {
+ data.EPGLanguages[i] = 0;
+ for (int l = 0; l < I18nNumLanguages; l++) {
+ int k;
+ for (k = 0; k < oldnumLanguages; k++) {
+ if (data.EPGLanguages[k] == l)
+ break;
+ }
+ if (k >= oldnumLanguages) {
+ data.EPGLanguages[i] = l;
+ break;
+ }
+ }
+ }
+ data.EPGLanguages[numLanguages] = -1;
+ Setup();
+ }
+ }
+ return state;
}
// --- cMenuSetupDVB ---------------------------------------------------------
class cMenuSetupDVB : public cMenuSetupBase {
+private:
+ const char *updateChannelsTexts[5];
public:
cMenuSetupDVB(void);
virtual eOSState ProcessKey(eKeys Key);
@@ -2052,9 +2120,16 @@ public:
cMenuSetupDVB::cMenuSetupDVB(void)
{
+ updateChannelsTexts[0] = tr("no");
+ updateChannelsTexts[1] = tr("names only");
+ updateChannelsTexts[2] = tr("names and PIDs");
+ updateChannelsTexts[3] = tr("add new channels");
+ updateChannelsTexts[4] = tr("add new transponders");
+
SetSection(tr("DVB"));
Add(new cMenuEditIntItem( tr("Setup.DVB$Primary DVB interface"), &data.PrimaryDVB, 1, cDevice::NumDevices()));
Add(new cMenuEditBoolItem(tr("Setup.DVB$Video format"), &data.VideoFormat, "4:3", "16:9"));
+ Add(new cMenuEditStraItem(tr("Setup.DVB$Update channels"), &data.UpdateChannels, 5, updateChannelsTexts));
}
eOSState cMenuSetupDVB::ProcessKey(eKeys Key)