summaryrefslogtreecommitdiff
path: root/menu.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2011-08-27 09:55:35 +0200
committerKlaus Schmidinger <vdr@tvdr.de>2011-08-27 09:55:35 +0200
commit048d0df54a0fa8b81c4a63bb3b20bd7eac8addd1 (patch)
treead77a7ddbc435128ce7964c32ea79b49b3aa0e66 /menu.c
parente4892e536c4d40c539e40470f838e8a7033d2c28 (diff)
downloadvdr-048d0df54a0fa8b81c4a63bb3b20bd7eac8addd1.tar.gz
vdr-048d0df54a0fa8b81c4a63bb3b20bd7eac8addd1.tar.bz2
The Audio and Subtitles options are now available through the Green and Yellow keys in the Setup/DVB menu
Diffstat (limited to 'menu.c')
-rw-r--r--menu.c87
1 files changed, 49 insertions, 38 deletions
diff --git a/menu.c b/menu.c
index 88e98540..1a2d62b5 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 2.30 2011/08/21 11:09:19 kls Exp $
+ * $Id: menu.c 2.31 2011/08/26 13:20:23 kls Exp $
*/
#include "menu.h"
@@ -2770,6 +2770,7 @@ cMenuSetupDVB::cMenuSetupDVB(void)
updateChannelsTexts[5] = tr("add new transponders");
SetSection(tr("DVB"));
+ SetHelp(NULL, tr("Button$Audio"), tr("Button$Subtitles"), NULL);
Setup();
}
@@ -2815,46 +2816,56 @@ eOSState cMenuSetupDVB::ProcessKey(eKeys Key)
eOSState state = cMenuSetupBase::ProcessKey(Key);
if (Key != kNone) {
- bool DoSetup = data.VideoFormat != newVideoFormat;
- DoSetup |= data.DisplaySubtitles != newDisplaySubtitles;
- if (numAudioLanguages != oldnumAudioLanguages) {
- for (int i = oldnumAudioLanguages; i < numAudioLanguages; i++) {
- data.AudioLanguages[i] = 0;
- for (int l = 0; l < I18nLanguages()->Size(); l++) {
- int k;
- for (k = 0; k < oldnumAudioLanguages; k++) {
- if (data.AudioLanguages[k] == l)
- break;
- }
- if (k >= oldnumAudioLanguages) {
- data.AudioLanguages[i] = l;
- break;
+ switch (Key) {
+ case kGreen: cRemote::Put(kAudio, true);
+ state = osEnd;
+ break;
+ case kYellow: cRemote::Put(kSubtitles, true);
+ state = osEnd;
+ break;
+ default: {
+ bool DoSetup = data.VideoFormat != newVideoFormat;
+ DoSetup |= data.DisplaySubtitles != newDisplaySubtitles;
+ if (numAudioLanguages != oldnumAudioLanguages) {
+ for (int i = oldnumAudioLanguages; i < numAudioLanguages; i++) {
+ data.AudioLanguages[i] = 0;
+ for (int l = 0; l < I18nLanguages()->Size(); l++) {
+ int k;
+ for (k = 0; k < oldnumAudioLanguages; k++) {
+ if (data.AudioLanguages[k] == l)
+ break;
+ }
+ if (k >= oldnumAudioLanguages) {
+ data.AudioLanguages[i] = l;
+ break;
+ }
+ }
}
- }
- }
- data.AudioLanguages[numAudioLanguages] = -1;
- DoSetup = true;
- }
- if (numSubtitleLanguages != oldnumSubtitleLanguages) {
- for (int i = oldnumSubtitleLanguages; i < numSubtitleLanguages; i++) {
- data.SubtitleLanguages[i] = 0;
- for (int l = 0; l < I18nLanguages()->Size(); l++) {
- int k;
- for (k = 0; k < oldnumSubtitleLanguages; k++) {
- if (data.SubtitleLanguages[k] == l)
- break;
- }
- if (k >= oldnumSubtitleLanguages) {
- data.SubtitleLanguages[i] = l;
- break;
+ data.AudioLanguages[numAudioLanguages] = -1;
+ DoSetup = true;
+ }
+ if (numSubtitleLanguages != oldnumSubtitleLanguages) {
+ for (int i = oldnumSubtitleLanguages; i < numSubtitleLanguages; i++) {
+ data.SubtitleLanguages[i] = 0;
+ for (int l = 0; l < I18nLanguages()->Size(); l++) {
+ int k;
+ for (k = 0; k < oldnumSubtitleLanguages; k++) {
+ if (data.SubtitleLanguages[k] == l)
+ break;
+ }
+ if (k >= oldnumSubtitleLanguages) {
+ data.SubtitleLanguages[i] = l;
+ break;
+ }
+ }
}
- }
+ data.SubtitleLanguages[numSubtitleLanguages] = -1;
+ DoSetup = true;
+ }
+ if (DoSetup)
+ Setup();
}
- data.SubtitleLanguages[numSubtitleLanguages] = -1;
- DoSetup = true;
- }
- if (DoSetup)
- Setup();
+ }
}
if (state == osBack && Key == kOk) {
if (::Setup.PrimaryDVB != oldPrimaryDVB)