mirror of
https://github.com/VDR4Arch/vdr.git
synced 2023-10-10 13:36:52 +02:00
Grouped the Setup parameters into several sub-menus
This commit is contained in:
parent
f9a3885ef2
commit
d9cfa43d85
@ -91,9 +91,12 @@ Henning Holtschneider <hh@holtschneider.com>
|
|||||||
Paulo Manuel Martins Lopes <pmml@netvita.pt>
|
Paulo Manuel Martins Lopes <pmml@netvita.pt>
|
||||||
for translating the OSD texts to the Portugese language
|
for translating the OSD texts to the Portugese language
|
||||||
|
|
||||||
Markus Lang <markus.lang@nissan-db.de> and Ulrich Röder <dynamite@efr-net.de>
|
Markus Lang <pretender@gaze.de> and Ulrich Röder <dynamite@efr-net.de>
|
||||||
for making DiSEqC support configurable
|
for making DiSEqC support configurable
|
||||||
|
|
||||||
|
Markus Lang <pretender@gaze.de>
|
||||||
|
for some initial code for grouping the Setup menu into several sub-menus
|
||||||
|
|
||||||
Jean-Claude Repetto <jc@repetto.org>
|
Jean-Claude Repetto <jc@repetto.org>
|
||||||
for translating the OSD texts to the French language
|
for translating the OSD texts to the French language
|
||||||
|
|
||||||
|
5
HISTORY
5
HISTORY
@ -1067,7 +1067,7 @@ Video Disk Recorder Revision History
|
|||||||
available on any DVB card).
|
available on any DVB card).
|
||||||
- Updated French language texts (thanks to Jean-Claude Repetto).
|
- Updated French language texts (thanks to Jean-Claude Repetto).
|
||||||
|
|
||||||
2002-03-08: Version 1.0.0pre4
|
2002-03-16: Version 1.0.0pre4
|
||||||
|
|
||||||
- Added 'Ca' code 201 for 'Cryptoworks, GOD-DIGITAL' to 'ca.conf' (thanks to
|
- Added 'Ca' code 201 for 'Cryptoworks, GOD-DIGITAL' to 'ca.conf' (thanks to
|
||||||
Bernd Schweikert).
|
Bernd Schweikert).
|
||||||
@ -1096,3 +1096,6 @@ Video Disk Recorder Revision History
|
|||||||
transponder shall be used to set the system time (see MANUAL for details).
|
transponder shall be used to set the system time (see MANUAL for details).
|
||||||
If you have been using the SetSystemTime option previously, you now MUST
|
If you have been using the SetSystemTime option previously, you now MUST
|
||||||
select a channel that you trust to have a reliable time base.
|
select a channel that you trust to have a reliable time base.
|
||||||
|
- Grouped the Setup parameters into several sub-menus, so that each group of
|
||||||
|
parameters fits on a single screen - unless the height of the OSD has been
|
||||||
|
set to a small value (based on code from Markus Lang).
|
||||||
|
83
i18n.c
83
i18n.c
@ -4,7 +4,7 @@
|
|||||||
* See the main source file 'vdr.c' for copyright information and
|
* See the main source file 'vdr.c' for copyright information and
|
||||||
* how to reach the author.
|
* how to reach the author.
|
||||||
*
|
*
|
||||||
* $Id: i18n.c 1.62 2002/03/10 10:43:46 kls Exp $
|
* $Id: i18n.c 1.63 2002/03/10 17:02:42 kls Exp $
|
||||||
*
|
*
|
||||||
* Slovenian translations provided by Miha Setina <mihasetina@softhome.net>
|
* Slovenian translations provided by Miha Setina <mihasetina@softhome.net>
|
||||||
* Italian translations provided by Alberto Carraro <bertocar@tin.it>
|
* Italian translations provided by Alberto Carraro <bertocar@tin.it>
|
||||||
@ -853,6 +853,87 @@ const tPhrase Phrases[] = {
|
|||||||
"", // TODO
|
"", // TODO
|
||||||
"Kovalevy lähes täynnä!",
|
"Kovalevy lähes täynnä!",
|
||||||
},
|
},
|
||||||
|
// Setup pages:
|
||||||
|
{ "OSD",
|
||||||
|
"OSD",
|
||||||
|
"", // TODO
|
||||||
|
"", // TODO
|
||||||
|
"", // TODO
|
||||||
|
"", // TODO
|
||||||
|
"", // TODO
|
||||||
|
"", // TODO
|
||||||
|
"", // TODO
|
||||||
|
},
|
||||||
|
{ "EPG",
|
||||||
|
"EPG",
|
||||||
|
"", // TODO
|
||||||
|
"", // TODO
|
||||||
|
"", // TODO
|
||||||
|
"", // TODO
|
||||||
|
"", // TODO
|
||||||
|
"", // TODO
|
||||||
|
"", // TODO
|
||||||
|
},
|
||||||
|
{ "DVB",
|
||||||
|
"DVB",
|
||||||
|
"", // TODO
|
||||||
|
"", // TODO
|
||||||
|
"", // TODO
|
||||||
|
"", // TODO
|
||||||
|
"", // TODO
|
||||||
|
"", // TODO
|
||||||
|
"", // TODO
|
||||||
|
},
|
||||||
|
{ "LNB",
|
||||||
|
"LNB",
|
||||||
|
"", // TODO
|
||||||
|
"", // TODO
|
||||||
|
"", // TODO
|
||||||
|
"", // TODO
|
||||||
|
"", // TODO
|
||||||
|
"", // TODO
|
||||||
|
"", // TODO
|
||||||
|
},
|
||||||
|
{ "CICAM",
|
||||||
|
"CICAM",
|
||||||
|
"", // TODO
|
||||||
|
"", // TODO
|
||||||
|
"", // TODO
|
||||||
|
"", // TODO
|
||||||
|
"", // TODO
|
||||||
|
"", // TODO
|
||||||
|
"", // TODO
|
||||||
|
},
|
||||||
|
{ "Recording",
|
||||||
|
"Aufnahme",
|
||||||
|
"", // TODO
|
||||||
|
"", // TODO
|
||||||
|
"", // TODO
|
||||||
|
"", // TODO
|
||||||
|
"", // TODO
|
||||||
|
"", // TODO
|
||||||
|
"", // TODO
|
||||||
|
},
|
||||||
|
{ "Replay",
|
||||||
|
"Wiedergabe",
|
||||||
|
"", // TODO
|
||||||
|
"", // TODO
|
||||||
|
"", // TODO
|
||||||
|
"", // TODO
|
||||||
|
"", // TODO
|
||||||
|
"", // TODO
|
||||||
|
"", // TODO
|
||||||
|
},
|
||||||
|
{ "Miscellaneous",
|
||||||
|
"Sonstiges",
|
||||||
|
"", // TODO
|
||||||
|
"", // TODO
|
||||||
|
"", // TODO
|
||||||
|
"", // TODO
|
||||||
|
"", // TODO
|
||||||
|
"", // TODO
|
||||||
|
"", // TODO
|
||||||
|
},
|
||||||
// Setup parameters:
|
// Setup parameters:
|
||||||
{ "OSD-Language",
|
{ "OSD-Language",
|
||||||
"OSD-Sprache",
|
"OSD-Sprache",
|
||||||
|
337
menu.c
337
menu.c
@ -4,7 +4,7 @@
|
|||||||
* See the main source file 'vdr.c' for copyright information and
|
* See the main source file 'vdr.c' for copyright information and
|
||||||
* how to reach the author.
|
* how to reach the author.
|
||||||
*
|
*
|
||||||
* $Id: menu.c 1.164 2002/03/10 12:45:58 kls Exp $
|
* $Id: menu.c 1.165 2002/03/16 10:00:41 kls Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "menu.h"
|
#include "menu.h"
|
||||||
@ -1917,81 +1917,41 @@ eOSState cMenuRecordings::ProcessKey(eKeys Key)
|
|||||||
return state;
|
return state;
|
||||||
}
|
}
|
||||||
|
|
||||||
// --- cMenuSetup ------------------------------------------------------------
|
// --- cMenuSetupPage --------------------------------------------------------
|
||||||
|
|
||||||
class cMenuSetup : public cOsdMenu {
|
class cMenuSetupPage : public cOsdMenu {
|
||||||
private:
|
protected:
|
||||||
cSetup data;
|
cSetup data;
|
||||||
int osdLanguage;
|
int osdLanguage;
|
||||||
void Set(void);
|
void SetupTitle(const char *s);
|
||||||
|
virtual void Set(void) = 0;
|
||||||
public:
|
public:
|
||||||
cMenuSetup(void);
|
cMenuSetupPage(void);
|
||||||
virtual eOSState ProcessKey(eKeys Key);
|
virtual eOSState ProcessKey(eKeys Key);
|
||||||
};
|
};
|
||||||
|
|
||||||
cMenuSetup::cMenuSetup(void)
|
cMenuSetupPage::cMenuSetupPage(void)
|
||||||
:cOsdMenu("", 25)
|
:cOsdMenu("", 30)
|
||||||
{
|
{
|
||||||
data = Setup;
|
data = Setup;
|
||||||
osdLanguage = Setup.OSDLanguage;
|
osdLanguage = Setup.OSDLanguage;
|
||||||
Set();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void cMenuSetup::Set(void)
|
void cMenuSetupPage::SetupTitle(const char *s)
|
||||||
{
|
{
|
||||||
Clear();
|
char buf[40]; // can't call tr() for more than one string at a time!
|
||||||
SetTitle(tr("Setup"));
|
char *q = buf + snprintf(buf, sizeof(buf), "%s - ", tr("Setup"));
|
||||||
Add(new cMenuEditStraItem(tr("OSD-Language"), &data.OSDLanguage, NumLanguages, Languages()));
|
snprintf(q, sizeof(buf) - strlen(buf), "%s", tr(s));
|
||||||
Add(new cMenuEditIntItem( tr("PrimaryDVB"), &data.PrimaryDVB, 1, cDvbApi::NumDvbApis));
|
SetTitle(buf);
|
||||||
Add(new cMenuEditBoolItem(tr("ShowInfoOnChSwitch"), &data.ShowInfoOnChSwitch));
|
|
||||||
Add(new cMenuEditBoolItem(tr("MenuScrollPage"), &data.MenuScrollPage));
|
|
||||||
Add(new cMenuEditBoolItem(tr("MarkInstantRecord"), &data.MarkInstantRecord));
|
|
||||||
Add(new cMenuEditStrItem( tr("NameInstantRecord"), data.NameInstantRecord, sizeof(data.NameInstantRecord), FileNameChars));
|
|
||||||
Add(new cMenuEditIntItem( tr("LnbSLOF"), &data.LnbSLOF));
|
|
||||||
Add(new cMenuEditIntItem( tr("LnbFrequLo"), &data.LnbFrequLo));
|
|
||||||
Add(new cMenuEditIntItem( tr("LnbFrequHi"), &data.LnbFrequHi));
|
|
||||||
Add(new cMenuEditBoolItem(tr("Setup$DiSEqC"), &data.DiSEqC));
|
|
||||||
Add(new cMenuEditBoolItem(tr("SetSystemTime"), &data.SetSystemTime));
|
|
||||||
Add(new cMenuEditTranItem(tr("TrustedTransponder"), &data.TrustedTransponder));
|
|
||||||
Add(new cMenuEditIntItem( tr("MarginStart"), &data.MarginStart));
|
|
||||||
Add(new cMenuEditIntItem( tr("MarginStop"), &data.MarginStop));
|
|
||||||
Add(new cMenuEditIntItem( tr("EPGScanTimeout"), &data.EPGScanTimeout));
|
|
||||||
Add(new cMenuEditIntItem( tr("EPGBugfixLevel"), &data.EPGBugfixLevel, 0, MAXEPGBUGFIXLEVEL));
|
|
||||||
Add(new cMenuEditIntItem( tr("SVDRPTimeout"), &data.SVDRPTimeout));
|
|
||||||
Add(new cMenuEditBoolItem(tr("SortTimers"), &data.SortTimers));
|
|
||||||
Add(new cMenuEditIntItem( tr("PrimaryLimit"), &data.PrimaryLimit, 0, MAXPRIORITY));
|
|
||||||
Add(new cMenuEditIntItem( tr("DefaultPriority"), &data.DefaultPriority, 0, MAXPRIORITY));
|
|
||||||
Add(new cMenuEditIntItem( tr("DefaultLifetime"), &data.DefaultLifetime, 0, MAXLIFETIME));
|
|
||||||
Add(new cMenuEditBoolItem(tr("UseSubtitle"), &data.UseSubtitle));
|
|
||||||
Add(new cMenuEditBoolItem(tr("RecordingDirs"), &data.RecordingDirs));
|
|
||||||
Add(new cMenuEditBoolItem(tr("VideoFormat"), &data.VideoFormat, "4:3", "16:9"));
|
|
||||||
Add(new cMenuEditBoolItem(tr("RecordDolbyDigital"), &data.RecordDolbyDigital));
|
|
||||||
Add(new cMenuEditBoolItem(tr("ChannelInfoPos"), &data.ChannelInfoPos, tr("bottom"), tr("top")));
|
|
||||||
Add(new cMenuEditIntItem( tr("OSDwidth"), &data.OSDwidth, MINOSDWIDTH, MAXOSDWIDTH));
|
|
||||||
Add(new cMenuEditIntItem( tr("OSDheight"), &data.OSDheight, MINOSDHEIGHT, MAXOSDHEIGHT));
|
|
||||||
Add(new cMenuEditIntItem( tr("OSDMessageTime"), &data.OSDMessageTime, 1, 60));
|
|
||||||
Add(new cMenuEditIntItem( tr("MaxVideoFileSize"), &data.MaxVideoFileSize, MINVIDEOFILESIZE, MAXVIDEOFILESIZE));
|
|
||||||
Add(new cMenuEditBoolItem(tr("SplitEditedFiles"), &data.SplitEditedFiles));
|
|
||||||
Add(new cMenuEditIntItem( tr("MinEventTimeout"), &data.MinEventTimeout));
|
|
||||||
Add(new cMenuEditIntItem( tr("MinUserInactivity"), &data.MinUserInactivity));
|
|
||||||
Add(new cMenuEditBoolItem(tr("MultiSpeedMode"), &data.MultiSpeedMode));
|
|
||||||
Add(new cMenuEditBoolItem(tr("ShowReplayMode"), &data.ShowReplayMode));
|
|
||||||
for (int d = 0; d < cDvbApi::NumDvbApis; d++) {
|
|
||||||
for (int i = 0; i < 2; i++) {
|
|
||||||
char buffer[32];
|
|
||||||
snprintf(buffer, sizeof(buffer), "%s%d %d", tr("CICAM DVB"), d + 1, i + 1);
|
|
||||||
Add(new cMenuEditCaItem(buffer, &data.CaCaps[d][i]));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
eOSState cMenuSetup::ProcessKey(eKeys Key)
|
eOSState cMenuSetupPage::ProcessKey(eKeys Key)
|
||||||
{
|
{
|
||||||
eOSState state = cOsdMenu::ProcessKey(Key);
|
eOSState state = cOsdMenu::ProcessKey(Key);
|
||||||
|
|
||||||
if (state == osUnknown) {
|
if (state == osUnknown) {
|
||||||
switch (Key) {
|
switch (Key) {
|
||||||
case kOk: state = (Setup.PrimaryDVB != data.PrimaryDVB) ? osSwitchDvb : osEnd;
|
case kOk: state = (Setup.PrimaryDVB != data.PrimaryDVB) ? osSwitchDvb : osBack;
|
||||||
cDvbApi::PrimaryDvbApi->SetVideoFormat(data.VideoFormat ? VIDEO_FORMAT_16_9 : VIDEO_FORMAT_4_3);
|
cDvbApi::PrimaryDvbApi->SetVideoFormat(data.VideoFormat ? VIDEO_FORMAT_16_9 : VIDEO_FORMAT_4_3);
|
||||||
Setup = data;
|
Setup = data;
|
||||||
Setup.Save();
|
Setup.Save();
|
||||||
@ -2011,6 +1971,223 @@ eOSState cMenuSetup::ProcessKey(eKeys Key)
|
|||||||
return state;
|
return state;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// --- cMenuSetupOSD ---------------------------------------------------------
|
||||||
|
|
||||||
|
class cMenuSetupOSD : public cMenuSetupPage {
|
||||||
|
private:
|
||||||
|
virtual void Set(void);
|
||||||
|
public:
|
||||||
|
cMenuSetupOSD(void) { Set(); }
|
||||||
|
};
|
||||||
|
|
||||||
|
void cMenuSetupOSD::Set(void)
|
||||||
|
{
|
||||||
|
Clear();
|
||||||
|
SetupTitle("OSD");
|
||||||
|
Add(new cMenuEditStraItem(tr("OSD-Language"), &data.OSDLanguage, NumLanguages, Languages()));
|
||||||
|
Add(new cMenuEditIntItem( tr("OSDwidth"), &data.OSDwidth, MINOSDWIDTH, MAXOSDWIDTH));
|
||||||
|
Add(new cMenuEditIntItem( tr("OSDheight"), &data.OSDheight, MINOSDHEIGHT, MAXOSDHEIGHT));
|
||||||
|
Add(new cMenuEditIntItem( tr("OSDMessageTime"), &data.OSDMessageTime, 1, 60));
|
||||||
|
Add(new cMenuEditBoolItem(tr("ChannelInfoPos"), &data.ChannelInfoPos, tr("bottom"), tr("top")));
|
||||||
|
Add(new cMenuEditBoolItem(tr("ShowInfoOnChSwitch"), &data.ShowInfoOnChSwitch));
|
||||||
|
Add(new cMenuEditBoolItem(tr("MenuScrollPage"), &data.MenuScrollPage));
|
||||||
|
Add(new cMenuEditBoolItem(tr("SortTimers"), &data.SortTimers));
|
||||||
|
Add(new cMenuEditBoolItem(tr("RecordingDirs"), &data.RecordingDirs));
|
||||||
|
}
|
||||||
|
|
||||||
|
// --- cMenuSetupEPG ---------------------------------------------------------
|
||||||
|
|
||||||
|
class cMenuSetupEPG : public cMenuSetupPage {
|
||||||
|
private:
|
||||||
|
virtual void Set(void);
|
||||||
|
public:
|
||||||
|
cMenuSetupEPG(void) { Set(); }
|
||||||
|
};
|
||||||
|
|
||||||
|
void cMenuSetupEPG::Set(void)
|
||||||
|
{
|
||||||
|
Clear();
|
||||||
|
SetupTitle("EPG");
|
||||||
|
Add(new cMenuEditIntItem( tr("EPGScanTimeout"), &data.EPGScanTimeout));
|
||||||
|
Add(new cMenuEditIntItem( tr("EPGBugfixLevel"), &data.EPGBugfixLevel, 0, MAXEPGBUGFIXLEVEL));
|
||||||
|
Add(new cMenuEditBoolItem(tr("SetSystemTime"), &data.SetSystemTime));
|
||||||
|
Add(new cMenuEditTranItem(tr("TrustedTransponder"), &data.TrustedTransponder));
|
||||||
|
}
|
||||||
|
|
||||||
|
// --- cMenuSetupDVB ---------------------------------------------------------
|
||||||
|
|
||||||
|
class cMenuSetupDVB : public cMenuSetupPage {
|
||||||
|
private:
|
||||||
|
virtual void Set(void);
|
||||||
|
public:
|
||||||
|
cMenuSetupDVB(void) { Set(); }
|
||||||
|
};
|
||||||
|
|
||||||
|
void cMenuSetupDVB::Set(void)
|
||||||
|
{
|
||||||
|
Clear();
|
||||||
|
SetupTitle("DVB");
|
||||||
|
Add(new cMenuEditIntItem( tr("PrimaryDVB"), &data.PrimaryDVB, 1, cDvbApi::NumDvbApis));
|
||||||
|
Add(new cMenuEditBoolItem(tr("VideoFormat"), &data.VideoFormat, "4:3", "16:9"));
|
||||||
|
}
|
||||||
|
|
||||||
|
// --- cMenuSetupLNB ---------------------------------------------------------
|
||||||
|
|
||||||
|
class cMenuSetupLNB : public cMenuSetupPage {
|
||||||
|
private:
|
||||||
|
virtual void Set(void);
|
||||||
|
public:
|
||||||
|
cMenuSetupLNB(void) { Set(); }
|
||||||
|
};
|
||||||
|
|
||||||
|
void cMenuSetupLNB::Set(void)
|
||||||
|
{
|
||||||
|
Clear();
|
||||||
|
SetupTitle("LNB");
|
||||||
|
Add(new cMenuEditIntItem( tr("LnbSLOF"), &data.LnbSLOF));
|
||||||
|
Add(new cMenuEditIntItem( tr("LnbFrequLo"), &data.LnbFrequLo));
|
||||||
|
Add(new cMenuEditIntItem( tr("LnbFrequHi"), &data.LnbFrequHi));
|
||||||
|
Add(new cMenuEditBoolItem(tr("Setup$DiSEqC"), &data.DiSEqC));
|
||||||
|
}
|
||||||
|
|
||||||
|
// --- cMenuSetupCICAM -------------------------------------------------------
|
||||||
|
|
||||||
|
class cMenuSetupCICAM : public cMenuSetupPage {
|
||||||
|
private:
|
||||||
|
virtual void Set(void);
|
||||||
|
public:
|
||||||
|
cMenuSetupCICAM(void) { Set(); }
|
||||||
|
};
|
||||||
|
|
||||||
|
void cMenuSetupCICAM::Set(void)
|
||||||
|
{
|
||||||
|
Clear();
|
||||||
|
SetupTitle("CICAM");
|
||||||
|
for (int d = 0; d < cDvbApi::NumDvbApis; d++) {
|
||||||
|
for (int i = 0; i < 2; i++) {
|
||||||
|
char buffer[32];
|
||||||
|
snprintf(buffer, sizeof(buffer), "%s%d %d", tr("CICAM DVB"), d + 1, i + 1);
|
||||||
|
Add(new cMenuEditCaItem(buffer, &data.CaCaps[d][i]));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// --- cMenuSetupRecord ------------------------------------------------------
|
||||||
|
|
||||||
|
class cMenuSetupRecord : public cMenuSetupPage {
|
||||||
|
private:
|
||||||
|
virtual void Set(void);
|
||||||
|
public:
|
||||||
|
cMenuSetupRecord(void) { Set(); }
|
||||||
|
};
|
||||||
|
|
||||||
|
void cMenuSetupRecord::Set(void)
|
||||||
|
{
|
||||||
|
Clear();
|
||||||
|
SetupTitle("Recording");
|
||||||
|
Add(new cMenuEditIntItem( tr("MarginStart"), &data.MarginStart));
|
||||||
|
Add(new cMenuEditIntItem( tr("MarginStop"), &data.MarginStop));
|
||||||
|
Add(new cMenuEditIntItem( tr("PrimaryLimit"), &data.PrimaryLimit, 0, MAXPRIORITY));
|
||||||
|
Add(new cMenuEditIntItem( tr("DefaultPriority"), &data.DefaultPriority, 0, MAXPRIORITY));
|
||||||
|
Add(new cMenuEditIntItem( tr("DefaultLifetime"), &data.DefaultLifetime, 0, MAXLIFETIME));
|
||||||
|
Add(new cMenuEditBoolItem(tr("UseSubtitle"), &data.UseSubtitle));
|
||||||
|
Add(new cMenuEditBoolItem(tr("MarkInstantRecord"), &data.MarkInstantRecord));
|
||||||
|
Add(new cMenuEditStrItem( tr("NameInstantRecord"), data.NameInstantRecord, sizeof(data.NameInstantRecord), FileNameChars));
|
||||||
|
Add(new cMenuEditBoolItem(tr("RecordDolbyDigital"), &data.RecordDolbyDigital));
|
||||||
|
Add(new cMenuEditIntItem( tr("MaxVideoFileSize"), &data.MaxVideoFileSize, MINVIDEOFILESIZE, MAXVIDEOFILESIZE));
|
||||||
|
Add(new cMenuEditBoolItem(tr("SplitEditedFiles"), &data.SplitEditedFiles));
|
||||||
|
}
|
||||||
|
|
||||||
|
// --- cMenuSetupReplay ------------------------------------------------------
|
||||||
|
|
||||||
|
class cMenuSetupReplay : public cMenuSetupPage {
|
||||||
|
private:
|
||||||
|
virtual void Set(void);
|
||||||
|
public:
|
||||||
|
cMenuSetupReplay(void) { Set(); }
|
||||||
|
};
|
||||||
|
|
||||||
|
void cMenuSetupReplay::Set(void)
|
||||||
|
{
|
||||||
|
Clear();
|
||||||
|
SetupTitle("Replay");
|
||||||
|
Add(new cMenuEditBoolItem(tr("MultiSpeedMode"), &data.MultiSpeedMode));
|
||||||
|
Add(new cMenuEditBoolItem(tr("ShowReplayMode"), &data.ShowReplayMode));
|
||||||
|
}
|
||||||
|
|
||||||
|
// --- cMenuSetupMisc --------------------------------------------------------
|
||||||
|
|
||||||
|
class cMenuSetupMisc : public cMenuSetupPage {
|
||||||
|
private:
|
||||||
|
virtual void Set(void);
|
||||||
|
public:
|
||||||
|
cMenuSetupMisc(void) { Set(); }
|
||||||
|
};
|
||||||
|
|
||||||
|
void cMenuSetupMisc::Set(void)
|
||||||
|
{
|
||||||
|
Clear();
|
||||||
|
SetupTitle("Miscellaneous");
|
||||||
|
Add(new cMenuEditIntItem( tr("MinEventTimeout"), &data.MinEventTimeout));
|
||||||
|
Add(new cMenuEditIntItem( tr("MinUserInactivity"), &data.MinUserInactivity));
|
||||||
|
Add(new cMenuEditIntItem( tr("SVDRPTimeout"), &data.SVDRPTimeout));
|
||||||
|
}
|
||||||
|
|
||||||
|
// --- cMenuSetup ------------------------------------------------------------
|
||||||
|
|
||||||
|
class cMenuSetup : public cOsdMenu {
|
||||||
|
private:
|
||||||
|
virtual void Set(void);
|
||||||
|
public:
|
||||||
|
cMenuSetup(void);
|
||||||
|
virtual eOSState ProcessKey(eKeys Key);
|
||||||
|
};
|
||||||
|
|
||||||
|
cMenuSetup::cMenuSetup(void)
|
||||||
|
:cOsdMenu("")
|
||||||
|
{
|
||||||
|
Set();
|
||||||
|
}
|
||||||
|
|
||||||
|
void cMenuSetup::Set(void)
|
||||||
|
{
|
||||||
|
Clear();
|
||||||
|
SetTitle(tr("Setup"));
|
||||||
|
SetHasHotkeys();
|
||||||
|
Add(new cOsdItem(hk(tr("OSD")), osUser1));
|
||||||
|
Add(new cOsdItem(hk(tr("EPG")), osUser2));
|
||||||
|
Add(new cOsdItem(hk(tr("DVB")), osUser3));
|
||||||
|
Add(new cOsdItem(hk(tr("LNB")), osUser4));
|
||||||
|
Add(new cOsdItem(hk(tr("CICAM")), osUser5));
|
||||||
|
Add(new cOsdItem(hk(tr("Recording")), osUser6));
|
||||||
|
Add(new cOsdItem(hk(tr("Replay")), osUser7));
|
||||||
|
Add(new cOsdItem(hk(tr("Miscellaneous")), osUser8));
|
||||||
|
}
|
||||||
|
|
||||||
|
eOSState cMenuSetup::ProcessKey(eKeys Key)
|
||||||
|
{
|
||||||
|
int osdLanguage = Setup.OSDLanguage;
|
||||||
|
eOSState state = cOsdMenu::ProcessKey(Key);
|
||||||
|
|
||||||
|
switch (state) {
|
||||||
|
case osUser1: return AddSubMenu(new cMenuSetupOSD);
|
||||||
|
case osUser2: return AddSubMenu(new cMenuSetupEPG);
|
||||||
|
case osUser3: return AddSubMenu(new cMenuSetupDVB);
|
||||||
|
case osUser4: return AddSubMenu(new cMenuSetupLNB);
|
||||||
|
case osUser5: return AddSubMenu(new cMenuSetupCICAM);
|
||||||
|
case osUser6: return AddSubMenu(new cMenuSetupRecord);
|
||||||
|
case osUser7: return AddSubMenu(new cMenuSetupReplay);
|
||||||
|
case osUser8: return AddSubMenu(new cMenuSetupMisc);
|
||||||
|
default: ;
|
||||||
|
}
|
||||||
|
if (Setup.OSDLanguage != osdLanguage) {
|
||||||
|
Set();
|
||||||
|
if (!HasSubMenu())
|
||||||
|
Display();
|
||||||
|
}
|
||||||
|
return state;
|
||||||
|
}
|
||||||
|
|
||||||
// --- cMenuCommands ---------------------------------------------------------
|
// --- cMenuCommands ---------------------------------------------------------
|
||||||
|
|
||||||
class cMenuCommands : public cOsdMenu {
|
class cMenuCommands : public cOsdMenu {
|
||||||
@ -2024,6 +2201,7 @@ public:
|
|||||||
cMenuCommands::cMenuCommands(void)
|
cMenuCommands::cMenuCommands(void)
|
||||||
:cOsdMenu(tr("Commands"))
|
:cOsdMenu(tr("Commands"))
|
||||||
{
|
{
|
||||||
|
SetHasHotkeys();
|
||||||
int i = 0;
|
int i = 0;
|
||||||
cCommand *command;
|
cCommand *command;
|
||||||
|
|
||||||
@ -2031,7 +2209,6 @@ cMenuCommands::cMenuCommands(void)
|
|||||||
Add(new cOsdItem(command->Title()));
|
Add(new cOsdItem(command->Title()));
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
SetHasHotkeys();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
eOSState cMenuCommands::Execute(void)
|
eOSState cMenuCommands::Execute(void)
|
||||||
@ -2064,10 +2241,24 @@ eOSState cMenuCommands::ProcessKey(eKeys Key)
|
|||||||
#define ON_PRIMARY_INTERFACE tr("on primary interface")
|
#define ON_PRIMARY_INTERFACE tr("on primary interface")
|
||||||
|
|
||||||
cMenuMain::cMenuMain(bool Replaying, eOSState State)
|
cMenuMain::cMenuMain(bool Replaying, eOSState State)
|
||||||
:cOsdMenu(tr("Main"))
|
:cOsdMenu("")
|
||||||
{
|
{
|
||||||
digit = 0;
|
|
||||||
replaying = Replaying;
|
replaying = Replaying;
|
||||||
|
Set();
|
||||||
|
|
||||||
|
// Initial submenus:
|
||||||
|
|
||||||
|
switch (State) {
|
||||||
|
case osRecordings: AddSubMenu(new cMenuRecordings(NULL, 0, true)); break;
|
||||||
|
default: break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void cMenuMain::Set(void)
|
||||||
|
{
|
||||||
|
Clear();
|
||||||
|
//SetTitle(tr("Main")); // this is done below, including disk usage
|
||||||
|
SetHasHotkeys();
|
||||||
|
|
||||||
// Title with disk usage:
|
// Title with disk usage:
|
||||||
|
|
||||||
@ -2123,29 +2314,11 @@ cMenuMain::cMenuMain(bool Replaying, eOSState State)
|
|||||||
SetHelp(tr("Record"), cDvbApi::PrimaryDvbApi->CanToggleAudioTrack() ? tr("Language") : NULL, NULL, replaying ? tr("Button$Stop") : cReplayControl::LastReplayed() ? tr("Resume") : NULL);
|
SetHelp(tr("Record"), cDvbApi::PrimaryDvbApi->CanToggleAudioTrack() ? tr("Language") : NULL, NULL, replaying ? tr("Button$Stop") : cReplayControl::LastReplayed() ? tr("Resume") : NULL);
|
||||||
Display();
|
Display();
|
||||||
lastActivity = time(NULL);
|
lastActivity = time(NULL);
|
||||||
SetHasHotkeys();
|
|
||||||
|
|
||||||
// Initial submenus:
|
|
||||||
|
|
||||||
switch (State) {
|
|
||||||
case osRecordings: AddSubMenu(new cMenuRecordings(NULL, 0, true)); break;
|
|
||||||
default: break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
const char *cMenuMain::hk(const char *s)
|
|
||||||
{
|
|
||||||
static char buffer[32];
|
|
||||||
if (digit < 9) {
|
|
||||||
snprintf(buffer, sizeof(buffer), " %d %s", ++digit, s);
|
|
||||||
return buffer;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
return s;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
eOSState cMenuMain::ProcessKey(eKeys Key)
|
eOSState cMenuMain::ProcessKey(eKeys Key)
|
||||||
{
|
{
|
||||||
|
int osdLanguage = Setup.OSDLanguage;
|
||||||
eOSState state = cOsdMenu::ProcessKey(Key);
|
eOSState state = cOsdMenu::ProcessKey(Key);
|
||||||
|
|
||||||
switch (state) {
|
switch (state) {
|
||||||
@ -2191,8 +2364,14 @@ eOSState cMenuMain::ProcessKey(eKeys Key)
|
|||||||
default: break;
|
default: break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (Key != kNone)
|
if (Key != kNone) {
|
||||||
lastActivity = time(NULL);
|
lastActivity = time(NULL);
|
||||||
|
if (Setup.OSDLanguage != osdLanguage) {
|
||||||
|
Set();
|
||||||
|
if (!HasSubMenu())
|
||||||
|
Display();
|
||||||
|
}
|
||||||
|
}
|
||||||
else if (time(NULL) - lastActivity > MENUTIMEOUT)
|
else if (time(NULL) - lastActivity > MENUTIMEOUT)
|
||||||
state = osEnd;
|
state = osEnd;
|
||||||
return state;
|
return state;
|
||||||
|
5
menu.h
5
menu.h
@ -4,7 +4,7 @@
|
|||||||
* See the main source file 'vdr.c' for copyright information and
|
* See the main source file 'vdr.c' for copyright information and
|
||||||
* how to reach the author.
|
* how to reach the author.
|
||||||
*
|
*
|
||||||
* $Id: menu.h 1.39 2002/03/09 15:54:24 kls Exp $
|
* $Id: menu.h 1.40 2002/03/16 09:51:10 kls Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef _MENU_H
|
#ifndef _MENU_H
|
||||||
@ -17,9 +17,8 @@
|
|||||||
class cMenuMain : public cOsdMenu {
|
class cMenuMain : public cOsdMenu {
|
||||||
private:
|
private:
|
||||||
time_t lastActivity;
|
time_t lastActivity;
|
||||||
int digit;
|
|
||||||
bool replaying;
|
bool replaying;
|
||||||
const char *hk(const char *s);
|
void Set(void);
|
||||||
public:
|
public:
|
||||||
cMenuMain(bool Replaying, eOSState State = osUnknown);
|
cMenuMain(bool Replaying, eOSState State = osUnknown);
|
||||||
virtual eOSState ProcessKey(eKeys Key);
|
virtual eOSState ProcessKey(eKeys Key);
|
||||||
|
19
osd.c
19
osd.c
@ -4,7 +4,7 @@
|
|||||||
* See the main source file 'vdr.c' for copyright information and
|
* See the main source file 'vdr.c' for copyright information and
|
||||||
* how to reach the author.
|
* how to reach the author.
|
||||||
*
|
*
|
||||||
* $Id: osd.c 1.20 2002/01/26 11:09:58 kls Exp $
|
* $Id: osd.c 1.21 2002/03/10 16:18:06 kls Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "osd.h"
|
#include "osd.h"
|
||||||
@ -102,6 +102,23 @@ cOsdMenu::~cOsdMenu()
|
|||||||
Interface->Close();
|
Interface->Close();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const char *cOsdMenu::hk(const char *s)
|
||||||
|
{
|
||||||
|
static char buffer[32];
|
||||||
|
if (digit < 9) {
|
||||||
|
snprintf(buffer, sizeof(buffer), " %d %s", ++digit, s);
|
||||||
|
return buffer;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
return s;
|
||||||
|
}
|
||||||
|
|
||||||
|
void cOsdMenu::SetHasHotkeys(void)
|
||||||
|
{
|
||||||
|
hasHotkeys = true;
|
||||||
|
digit = 0;
|
||||||
|
}
|
||||||
|
|
||||||
void cOsdMenu::SetStatus(const char *s)
|
void cOsdMenu::SetStatus(const char *s)
|
||||||
{
|
{
|
||||||
delete status;
|
delete status;
|
||||||
|
16
osd.h
16
osd.h
@ -4,7 +4,7 @@
|
|||||||
* See the main source file 'vdr.c' for copyright information and
|
* See the main source file 'vdr.c' for copyright information and
|
||||||
* how to reach the author.
|
* how to reach the author.
|
||||||
*
|
*
|
||||||
* $Id: osd.h 1.26 2002/02/24 12:55:16 kls Exp $
|
* $Id: osd.h 1.27 2002/03/10 16:18:11 kls Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef __OSD_H
|
#ifndef __OSD_H
|
||||||
@ -33,6 +33,16 @@ enum eOSState { osUnknown,
|
|||||||
osSwitchDvb,
|
osSwitchDvb,
|
||||||
osBack,
|
osBack,
|
||||||
osEnd,
|
osEnd,
|
||||||
|
os_User, // the following values can be used locally
|
||||||
|
osUser1,
|
||||||
|
osUser2,
|
||||||
|
osUser3,
|
||||||
|
osUser4,
|
||||||
|
osUser5,
|
||||||
|
osUser6,
|
||||||
|
osUser7,
|
||||||
|
osUser8,
|
||||||
|
osUser9,
|
||||||
};
|
};
|
||||||
|
|
||||||
class cOsdItem : public cListObject {
|
class cOsdItem : public cListObject {
|
||||||
@ -77,9 +87,12 @@ private:
|
|||||||
cOsdMenu *subMenu;
|
cOsdMenu *subMenu;
|
||||||
const char *helpRed, *helpGreen, *helpYellow, *helpBlue;
|
const char *helpRed, *helpGreen, *helpYellow, *helpBlue;
|
||||||
const char *status;
|
const char *status;
|
||||||
|
int digit;
|
||||||
bool hasHotkeys;
|
bool hasHotkeys;
|
||||||
protected:
|
protected:
|
||||||
bool visible;
|
bool visible;
|
||||||
|
const char *hk(const char *s);
|
||||||
|
void SetHasHotkeys(void);
|
||||||
virtual void Clear(void);
|
virtual void Clear(void);
|
||||||
bool SpecialItem(int idx);
|
bool SpecialItem(int idx);
|
||||||
void SetCurrent(cOsdItem *Item);
|
void SetCurrent(cOsdItem *Item);
|
||||||
@ -100,7 +113,6 @@ protected:
|
|||||||
public:
|
public:
|
||||||
cOsdMenu(const char *Title, int c0 = 0, int c1 = 0, int c2 = 0, int c3 = 0, int c4 = 0);
|
cOsdMenu(const char *Title, int c0 = 0, int c1 = 0, int c2 = 0, int c3 = 0, int c4 = 0);
|
||||||
virtual ~cOsdMenu();
|
virtual ~cOsdMenu();
|
||||||
void SetHasHotkeys(void) { hasHotkeys = true; }
|
|
||||||
int Current(void) { return current; }
|
int Current(void) { return current; }
|
||||||
void Add(cOsdItem *Item, bool Current = false);
|
void Add(cOsdItem *Item, bool Current = false);
|
||||||
void Display(void);
|
void Display(void);
|
||||||
|
Loading…
Reference in New Issue
Block a user