Added the new menu categories mcChannelEdit, mcTimerEdit, mcScheduleNow, mcScheduleNext, mcRecordingInfo, mcPluginSetup, mcSetupOsd, mcSetupEpg, mcSetupDvb, mcSetupLnb, mcSetupCam, mcSetupRecord, mcSetupReplay, mcSetupMisc and mcSetupPlugins

This commit is contained in:
Klaus Schmidinger 2012-12-21 11:22:26 +01:00
parent 62daedf95e
commit 65223eb8fd
3 changed files with 49 additions and 7 deletions

View File

@ -7449,3 +7449,6 @@ Video Disk Recorder Revision History
plugin), or apply the patch from plugin), or apply the patch from
ftp://ftp.tvdr.de/vdr/Developer/vdr-1.7.33-pluginmakefile.diff ftp://ftp.tvdr.de/vdr/Developer/vdr-1.7.33-pluginmakefile.diff
to your Makefile to make the necessary changes (see comments in that file for details). to your Makefile to make the necessary changes (see comments in that file for details).
- Added the new menu categories mcChannelEdit, mcTimerEdit, mcScheduleNow, mcScheduleNext,
mcRecordingInfo, mcPluginSetup, mcSetupOsd, mcSetupEpg, mcSetupDvb, mcSetupLnb,
mcSetupCam, mcSetupRecord, mcSetupReplay, mcSetupMisc and mcSetupPlugins.

19
menu.c
View File

@ -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 2.71 2012/12/07 13:48:15 kls Exp $ * $Id: menu.c 2.72 2012/12/21 11:11:14 kls Exp $
*/ */
#include "menu.h" #include "menu.h"
@ -172,7 +172,7 @@ public:
cMenuEditChannel::cMenuEditChannel(cChannel *Channel, bool New) cMenuEditChannel::cMenuEditChannel(cChannel *Channel, bool New)
:cOsdMenu(tr("Edit channel"), 16) :cOsdMenu(tr("Edit channel"), 16)
{ {
SetMenuCategory(mcChannel); SetMenuCategory(mcChannelEdit);
channel = Channel; channel = Channel;
sourceParam = NULL; sourceParam = NULL;
*name = 0; *name = 0;
@ -878,7 +878,7 @@ eOSState cMenuFolder::ProcessKey(eKeys Key)
cMenuEditTimer::cMenuEditTimer(cTimer *Timer, bool New) cMenuEditTimer::cMenuEditTimer(cTimer *Timer, bool New)
:cOsdMenu(tr("Edit timer"), 12) :cOsdMenu(tr("Edit timer"), 12)
{ {
SetMenuCategory(mcTimer); SetMenuCategory(mcTimerEdit);
file = NULL; file = NULL;
day = firstday = NULL; day = firstday = NULL;
timer = Timer; timer = Timer;
@ -1378,7 +1378,7 @@ const cEvent *cMenuWhatsOn::scheduleEvent = NULL;
cMenuWhatsOn::cMenuWhatsOn(const cSchedules *Schedules, bool Now, int CurrentChannelNr) cMenuWhatsOn::cMenuWhatsOn(const cSchedules *Schedules, bool Now, int CurrentChannelNr)
:cOsdMenu(Now ? tr("What's on now?") : tr("What's on next?"), CHNUMWIDTH, CHNAMWIDTH, 6, 4) :cOsdMenu(Now ? tr("What's on now?") : tr("What's on next?"), CHNUMWIDTH, CHNAMWIDTH, 6, 4)
{ {
SetMenuCategory(mcSchedule); SetMenuCategory(Now ? mcScheduleNow : mcScheduleNext);
now = Now; now = Now;
helpKeys = -1; helpKeys = -1;
timerState = 0; timerState = 0;
@ -2120,7 +2120,7 @@ public:
cMenuRecording::cMenuRecording(const cRecording *Recording, bool WithButtons) cMenuRecording::cMenuRecording(const cRecording *Recording, bool WithButtons)
:cOsdMenu(tr("Recording info")) :cOsdMenu(tr("Recording info"))
{ {
SetMenuCategory(mcRecording); SetMenuCategory(mcRecordingInfo);
recording = Recording; recording = Recording;
withButtons = WithButtons; withButtons = WithButtons;
if (withButtons) if (withButtons)
@ -2534,6 +2534,7 @@ public:
cMenuSetupOSD::cMenuSetupOSD(void) cMenuSetupOSD::cMenuSetupOSD(void)
{ {
SetMenuCategory(mcSetupOsd);
osdLanguageIndex = I18nCurrentLanguage(); osdLanguageIndex = I18nCurrentLanguage();
numSkins = Skins.Count(); numSkins = Skins.Count();
skinIndex = originalSkinIndex = Skins.Current()->Index(); skinIndex = originalSkinIndex = Skins.Current()->Index();
@ -2683,6 +2684,7 @@ public:
cMenuSetupEPG::cMenuSetupEPG(void) cMenuSetupEPG::cMenuSetupEPG(void)
{ {
SetMenuCategory(mcSetupEpg);
for (numLanguages = 0; numLanguages < I18nLanguages()->Size() && data.EPGLanguages[numLanguages] >= 0; numLanguages++) for (numLanguages = 0; numLanguages < I18nLanguages()->Size() && data.EPGLanguages[numLanguages] >= 0; numLanguages++)
; ;
originalNumLanguages = numLanguages; originalNumLanguages = numLanguages;
@ -2779,6 +2781,7 @@ public:
cMenuSetupDVB::cMenuSetupDVB(void) cMenuSetupDVB::cMenuSetupDVB(void)
{ {
SetMenuCategory(mcSetupDvb);
for (numAudioLanguages = 0; numAudioLanguages < I18nLanguages()->Size() && data.AudioLanguages[numAudioLanguages] >= 0; numAudioLanguages++) for (numAudioLanguages = 0; numAudioLanguages < I18nLanguages()->Size() && data.AudioLanguages[numAudioLanguages] >= 0; numAudioLanguages++)
; ;
for (numSubtitleLanguages = 0; numSubtitleLanguages < I18nLanguages()->Size() && data.SubtitleLanguages[numSubtitleLanguages] >= 0; numSubtitleLanguages++) for (numSubtitleLanguages = 0; numSubtitleLanguages < I18nLanguages()->Size() && data.SubtitleLanguages[numSubtitleLanguages] >= 0; numSubtitleLanguages++)
@ -2924,6 +2927,7 @@ public:
cMenuSetupLNB::cMenuSetupLNB(void) cMenuSetupLNB::cMenuSetupLNB(void)
:satCableNumbers(MAXDEVICES) :satCableNumbers(MAXDEVICES)
{ {
SetMenuCategory(mcSetupLnb);
satCableNumbers.FromString(data.DeviceBondings); satCableNumbers.FromString(data.DeviceBondings);
SetSection(tr("LNB")); SetSection(tr("LNB"));
Setup(); Setup();
@ -3025,6 +3029,7 @@ public:
cMenuSetupCAM::cMenuSetupCAM(void) cMenuSetupCAM::cMenuSetupCAM(void)
{ {
SetMenuCategory(mcSetupCam);
SetSection(tr("CAM")); SetSection(tr("CAM"));
SetCols(15); SetCols(15);
SetHasHotkeys(); SetHasHotkeys();
@ -3103,6 +3108,7 @@ public:
cMenuSetupRecord::cMenuSetupRecord(void) cMenuSetupRecord::cMenuSetupRecord(void)
{ {
SetMenuCategory(mcSetupRecord);
pauseKeyHandlingTexts[0] = tr("do not pause live video"); pauseKeyHandlingTexts[0] = tr("do not pause live video");
pauseKeyHandlingTexts[1] = tr("confirm pause live video"); pauseKeyHandlingTexts[1] = tr("confirm pause live video");
pauseKeyHandlingTexts[2] = tr("pause live video"); pauseKeyHandlingTexts[2] = tr("pause live video");
@ -3139,6 +3145,7 @@ public:
cMenuSetupReplay::cMenuSetupReplay(void) cMenuSetupReplay::cMenuSetupReplay(void)
{ {
SetMenuCategory(mcSetupReplay);
SetSection(tr("Replay")); SetSection(tr("Replay"));
Add(new cMenuEditBoolItem(tr("Setup.Replay$Multi speed mode"), &data.MultiSpeedMode)); Add(new cMenuEditBoolItem(tr("Setup.Replay$Multi speed mode"), &data.MultiSpeedMode));
Add(new cMenuEditBoolItem(tr("Setup.Replay$Show replay mode"), &data.ShowReplayMode)); Add(new cMenuEditBoolItem(tr("Setup.Replay$Show replay mode"), &data.ShowReplayMode));
@ -3164,6 +3171,7 @@ public:
cMenuSetupMisc::cMenuSetupMisc(void) cMenuSetupMisc::cMenuSetupMisc(void)
{ {
SetMenuCategory(mcSetupMisc);
SetSection(tr("Miscellaneous")); SetSection(tr("Miscellaneous"));
Add(new cMenuEditIntItem( tr("Setup.Miscellaneous$Min. event timeout (min)"), &data.MinEventTimeout)); Add(new cMenuEditIntItem( tr("Setup.Miscellaneous$Min. event timeout (min)"), &data.MinEventTimeout));
Add(new cMenuEditIntItem( tr("Setup.Miscellaneous$Min. user inactivity (min)"), &data.MinUserInactivity)); Add(new cMenuEditIntItem( tr("Setup.Miscellaneous$Min. user inactivity (min)"), &data.MinUserInactivity));
@ -3203,6 +3211,7 @@ public:
cMenuSetupPlugins::cMenuSetupPlugins(void) cMenuSetupPlugins::cMenuSetupPlugins(void)
{ {
SetMenuCategory(mcSetupPlugins);
SetSection(tr("Plugins")); SetSection(tr("Plugins"));
SetHasHotkeys(); SetHasHotkeys();
for (int i = 0; ; i++) { for (int i = 0; ; i++) {

34
skins.h
View File

@ -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: skins.h 2.8 2012/12/11 09:58:53 kls Exp $ * $Id: skins.h 2.9 2012/12/21 11:09:13 kls Exp $
*/ */
#ifndef __SKINS_H #ifndef __SKINS_H
@ -73,7 +73,37 @@ public:
*/ */
}; };
enum eMenuCategory { mcUndefined = -1, mcUnknown = 0, mcMain, mcSchedule, mcChannel, mcTimer, mcRecording, mcPlugin, mcSetup, mcCommand, mcEvent, mcText, mcFolder, mcCam }; enum eMenuCategory {
mcUndefined = -1,
mcUnknown = 0,
mcMain,
mcSchedule,
mcScheduleNow,
mcScheduleNext,
mcChannel,
mcChannelEdit,
mcTimer,
mcTimerEdit,
mcRecording,
mcRecordingInfo,
mcPlugin,
mcPluginSetup,
mcSetup,
mcSetupOsd,
mcSetupEpg,
mcSetupDvb,
mcSetupLnb,
mcSetupCam,
mcSetupRecord,
mcSetupReplay,
mcSetupMisc,
mcSetupPlugins,
mcCommand,
mcEvent,
mcText,
mcFolder,
mcCam
};
class cSkinDisplayMenu : public cSkinDisplay { class cSkinDisplayMenu : public cSkinDisplay {
///< This class implements the general purpose menu display, which is ///< This class implements the general purpose menu display, which is