summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2006-01-04 13:22:53 +0100
committerKlaus Schmidinger <vdr@tvdr.de>2006-01-04 13:22:53 +0100
commitb1836290c9bba8c96039475f2b836b3e9cff26ff (patch)
treee6bf0b193b9f38665a003df22ee68516110148bc
parentfa0af7065e92abc566346b264740570991ae3f13 (diff)
downloadvdr-b1836290c9bba8c96039475f2b836b3e9cff26ff.tar.gz
vdr-b1836290c9bba8c96039475f2b836b3e9cff26ff.tar.bz2
The "Menu" key now behaves consistently
-rw-r--r--CONTRIBUTORS1
-rw-r--r--HISTORY4
-rw-r--r--MANUAL2
-rw-r--r--vdr.c40
4 files changed, 17 insertions, 30 deletions
diff --git a/CONTRIBUTORS b/CONTRIBUTORS
index 002934aa..600ca030 100644
--- a/CONTRIBUTORS
+++ b/CONTRIBUTORS
@@ -1433,6 +1433,7 @@ Chris Warren <dvb@ixalon.net>
Luca Olivetti <luca@ventoso.org>
for making cDevice::AttachPlayer() keep the track language codes and descriptions
in Transfer Mode
+ for suggesting to make the "Menu" key behave consistently
Mikko Salo <mikko.salo@ppe.inet.fi>
for suggesting to make the setup option "DVB/Video display format" available only
diff --git a/HISTORY b/HISTORY
index 7d0b7f4e..122c755a 100644
--- a/HISTORY
+++ b/HISTORY
@@ -4079,3 +4079,7 @@ Video Disk Recorder Revision History
- Added cMenuEditStrItem::InEditMode() (suggested by Christian Wieninger).
- Now using FE_READ_STATUS to read the current frontend status (suggested by
Holger Wächtler).
+- The "Menu" key now behaves consistently. If there is anything on the OSD, it
+ is closed when the "Menu" key is pressed, and if there is nothing on the OSD,
+ the "Menu" key opens the main menu (suggested by Luca Olivetti).
+
diff --git a/MANUAL b/MANUAL
index 5d4f2b5e..9a10b13a 100644
--- a/MANUAL
+++ b/MANUAL
@@ -18,7 +18,7 @@ Version 1.2
Left Prev group - Page up Page up Decrement Page up Search back Sel. channel
Right Next group - Page down Page down Increment Page down Search forward Sel. channel
Ok Ch display Select Switch Edit Accept Play Progress disp. Switch & Close
- Menu Menu on Menu off Menu off Menu off Menu off Menu off Menu on Menu on
+ Menu Menu on Menu off Menu off Menu off Menu off Menu off Menu off Menu off
Back - Menu off VDR menu VDR menu Discard VDR menu Recordings menu Close
Red - Record Edit Edit ABC/abc Play/Commands(2) Jump -
Green - Audio New New Ins/Ovr Rewind Skip -60s -
diff --git a/vdr.c b/vdr.c
index c5c3c180..d3204dd9 100644
--- a/vdr.c
+++ b/vdr.c
@@ -22,7 +22,7 @@
*
* The project's page is at http://www.cadsoft.de/vdr
*
- * $Id: vdr.c 1.225 2006/01/03 10:20:41 kls Exp $
+ * $Id: vdr.c 1.226 2006/01/04 13:01:13 kls Exp $
*/
#include <getopt.h>
@@ -480,7 +480,6 @@ int main(int argc, char *argv[])
// Main program loop variables - need to be here to have them initialized before any EXIT():
cOsdObject *Menu = NULL;
- cOsdObject *Temp = NULL;
int LastChannel = -1;
int LastTimerChannel = -1;
int PreviousChannel[2] = { 1, 1 };
@@ -718,7 +717,7 @@ int main(int argc, char *argv[])
// Channel display:
if (!EITScanner.Active() && cDevice::CurrentChannel() != LastChannel) {
if (!Menu)
- Menu = Temp = new cDisplayChannel(cDevice::CurrentChannel(), LastChannel > 0);
+ Menu = new cDisplayChannel(cDevice::CurrentChannel(), LastChannel > 0);
LastChannel = cDevice::CurrentChannel();
LastChannelChanged = time(NULL);
}
@@ -786,22 +785,18 @@ int main(int argc, char *argv[])
// Menu control:
case kMenu:
key = kNone; // nobody else needs to see this key
- if (Menu) {
+ if (Menu)
DELETENULL(Menu);
- if (!Temp)
- break;
- }
- if (cControl::Control())
+ else if (cControl::Control() && cOsd::IsOpen())
cControl::Control()->Hide();
- Menu = new cMenuMain;
- Temp = NULL;
+ else
+ Menu = new cMenuMain;
break;
#define DirectMainFunction(function)\
DELETENULL(Menu);\
if (cControl::Control())\
cControl::Control()->Hide();\
Menu = new cMenuMain(function);\
- Temp = NULL;\
key = kNone; // nobody else needs to see this key
case kSchedule: DirectMainFunction(osSchedule); break;
case kChannels: DirectMainFunction(osChannels); break;
@@ -812,12 +807,11 @@ int main(int argc, char *argv[])
case kUser1 ... kUser9: cRemote::PutMacro(key); key = kNone; break;
case k_Plugin: {
DELETENULL(Menu);
- Temp = NULL;
if (cControl::Control())
cControl::Control()->Hide();
cPlugin *plugin = cPluginManager::GetPlugin(cRemote::GetPlugin());
if (plugin) {
- Menu = Temp = plugin->MainMenuAction();
+ Menu = plugin->MainMenuAction();
if (Menu) {
Menu->Show();
if (Menu->IsMenu())
@@ -851,7 +845,7 @@ int main(int argc, char *argv[])
else
cDevice::PrimaryDevice()->SetVolume(NORMALKEY(key) == kVolDn ? -VOLUMEDELTA : VOLUMEDELTA);
if (!Menu && !cOsd::IsOpen())
- Menu = Temp = cDisplayVolume::Create();
+ Menu = cDisplayVolume::Create();
cDisplayVolume::Process(key);
key = kNone; // nobody else needs to see these keys
break;
@@ -859,12 +853,10 @@ int main(int argc, char *argv[])
case kAudio:
if (cControl::Control())
cControl::Control()->Hide();
- if (Temp && !cDisplayTracks::IsOpen()) {
+ if (!cDisplayTracks::IsOpen()) {
DELETENULL(Menu);
- Temp = NULL;
+ Menu = cDisplayTracks::Create();
}
- if (!Menu && !cOsd::IsOpen())
- Menu = Temp = cDisplayTracks::Create();
else
cDisplayTracks::Process(key);
key = kNone;
@@ -873,7 +865,6 @@ int main(int argc, char *argv[])
case kPause:
if (!cControl::Control()) {
DELETENULL(Menu);
- Temp = NULL;
if (!cRecordControls::PauseLiveVideo())
Skins.Message(mtError, tr("No free DVB device to record!"));
key = kNone; // nobody else needs to see this key
@@ -892,7 +883,6 @@ int main(int argc, char *argv[])
// Power off:
case kPower: isyslog("Power button pressed");
DELETENULL(Menu);
- Temp = NULL;
if (!Shutdown) {
Skins.Message(mtError, tr("Can't shutdown - option '-s' not given!"));
break;
@@ -924,12 +914,10 @@ int main(int argc, char *argv[])
switch (state) {
case osPause: DELETENULL(Menu);
cControl::Shutdown(); // just in case
- Temp = NULL;
if (!cRecordControls::PauseLiveVideo())
Skins.Message(mtError, tr("No free DVB device to record!"));
break;
case osRecord: DELETENULL(Menu);
- Temp = NULL;
if (cRecordControls::Start())
;//XXX Skins.Message(mtInfo, tr("Recording"));
else
@@ -938,28 +926,24 @@ int main(int argc, char *argv[])
case osRecordings:
DELETENULL(Menu);
cControl::Shutdown();
- Temp = NULL;
Menu = new cMenuMain(osRecordings);
break;
case osReplay: DELETENULL(Menu);
cControl::Shutdown();
- Temp = NULL;
cControl::Launch(new cReplayControl);
break;
case osStopReplay:
DELETENULL(Menu);
cControl::Shutdown();
- Temp = NULL;
break;
case osSwitchDvb:
DELETENULL(Menu);
cControl::Shutdown();
- Temp = NULL;
Skins.Message(mtInfo, tr("Switching primary DVB..."));
cDevice::SetPrimaryDevice(Setup.PrimaryDVB);
break;
case osPlugin: DELETENULL(Menu);
- Menu = Temp = cMenuMain::PluginOsdObject();
+ Menu = cMenuMain::PluginOsdObject();
if (Menu)
Menu->Show();
break;
@@ -968,7 +952,6 @@ int main(int argc, char *argv[])
DELETENULL(Menu);
else
cControl::Shutdown();
- Temp = NULL;
break;
default: ;
}
@@ -1007,7 +990,6 @@ int main(int argc, char *argv[])
case kPlay:
if (cReplayControl::LastReplayed()) {
cControl::Shutdown();
- Temp = NULL;
cControl::Launch(new cReplayControl);
}
break;