1
0
mirror of https://github.com/VDR4Arch/vdr.git synced 2023-10-10 13:36:52 +02:00

The kInfo key is now propagated to any open menu

This commit is contained in:
Klaus Schmidinger 2007-11-25 15:27:10 +01:00
parent ade33990f5
commit bd411a6620
5 changed files with 21 additions and 6 deletions

View File

@ -1600,6 +1600,8 @@ Andreas Brugger <brougs78@gmx.net>
for reporting a typo in the change to the "Use small font" setup option in version for reporting a typo in the change to the "Use small font" setup option in version
1.3.47 in the HISTORY and CONTRIBUTORS file 1.3.47 in the HISTORY and CONTRIBUTORS file
for reporting a missing 'const' in cRecordingInfo::ChannelID() for reporting a missing 'const' in cRecordingInfo::ChannelID()
for suggesting to propagate the kInfo key to any open menu, so that it can react to
it in a context sensitive manner
Dino Ravnic <dino.ravnic@fer.hr> Dino Ravnic <dino.ravnic@fer.hr>
for fixing some characters in the iso8859-2 font file for fixing some characters in the iso8859-2 font file

View File

@ -5535,3 +5535,6 @@ Video Disk Recorder Revision History
Gregoire Favre). Gregoire Favre).
- The new setup option "Miscellaneous/Emergency exit" can be used to turn off - The new setup option "Miscellaneous/Emergency exit" can be used to turn off
the automatic restart of VDR in case a recording fails for some reason. the automatic restart of VDR in case a recording fails for some reason.
- The kInfo key is now propagated to any open menu, so that it can react to it
in a context sensitive manner (suggested by Andreas Brugger). If there is
no menu open it will show the info of the current broadcast or replay.

3
MANUAL
View File

@ -37,7 +37,8 @@ Version 1.4
If your remote control provides additional keys, they can be used for the If your remote control provides additional keys, they can be used for the
following functions: following functions:
Info display information on the currently viewed programme or recording Info display information on the currently viewed programme or recording,
or on the current item in a menu
Play resume normal replay Play resume normal replay
Pause pause replay or live video Pause pause replay or live video
Stop stop replay Stop stop replay

8
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 1.466 2007/11/25 13:47:38 kls Exp $ * $Id: menu.c 1.467 2007/11/25 14:52:03 kls Exp $
*/ */
#include "menu.h" #include "menu.h"
@ -931,6 +931,7 @@ eOSState cMenuTimers::ProcessKey(eKeys Key)
case kRed: state = OnOff(); break; // must go through SetHelpKeys()! case kRed: state = OnOff(); break; // must go through SetHelpKeys()!
case kGreen: return New(); case kGreen: return New();
case kYellow: state = Delete(); break; case kYellow: state = Delete(); break;
case kInfo:
case kBlue: return Info(); case kBlue: return Info();
break; break;
default: break; default: break;
@ -986,6 +987,7 @@ eOSState cMenuEvent::ProcessKey(eKeys Key)
DisplayMenu()->Scroll(NORMALKEY(Key) == kUp || NORMALKEY(Key) == kLeft, NORMALKEY(Key) == kLeft || NORMALKEY(Key) == kRight); DisplayMenu()->Scroll(NORMALKEY(Key) == kUp || NORMALKEY(Key) == kLeft, NORMALKEY(Key) == kLeft || NORMALKEY(Key) == kRight);
cStatus::MsgOsdTextItem(NULL, NORMALKEY(Key) == kUp || NORMALKEY(Key) == kLeft); cStatus::MsgOsdTextItem(NULL, NORMALKEY(Key) == kUp || NORMALKEY(Key) == kLeft);
return osContinue; return osContinue;
case kInfo: return osBack;
default: break; default: break;
} }
@ -1216,6 +1218,7 @@ eOSState cMenuWhatsOn::ProcessKey(eKeys Key)
} }
break; break;
case kBlue: return Switch(); case kBlue: return Switch();
case kInfo:
case kOk: if (Count()) case kOk: if (Count())
return AddSubMenu(new cMenuEvent(((cMenuScheduleItem *)Get(Current()))->event, true, true)); return AddSubMenu(new cMenuEvent(((cMenuScheduleItem *)Get(Current()))->event, true, true));
break; break;
@ -1486,6 +1489,7 @@ eOSState cMenuSchedule::ProcessKey(eKeys Key)
case kBlue: if (Count() && otherChannel) case kBlue: if (Count() && otherChannel)
return Switch(); return Switch();
break; break;
case kInfo:
case kOk: if (Count()) case kOk: if (Count())
return AddSubMenu(new cMenuEvent(((cMenuScheduleItem *)Get(Current()))->event, otherChannel, true)); return AddSubMenu(new cMenuEvent(((cMenuScheduleItem *)Get(Current()))->event, otherChannel, true));
break; break;
@ -1815,6 +1819,7 @@ eOSState cMenuRecording::ProcessKey(eKeys Key)
DisplayMenu()->Scroll(NORMALKEY(Key) == kUp || NORMALKEY(Key) == kLeft, NORMALKEY(Key) == kLeft || NORMALKEY(Key) == kRight); DisplayMenu()->Scroll(NORMALKEY(Key) == kUp || NORMALKEY(Key) == kLeft, NORMALKEY(Key) == kLeft || NORMALKEY(Key) == kRight);
cStatus::MsgOsdTextItem(NULL, NORMALKEY(Key) == kUp || NORMALKEY(Key) == kLeft); cStatus::MsgOsdTextItem(NULL, NORMALKEY(Key) == kUp || NORMALKEY(Key) == kLeft);
return osContinue; return osContinue;
case kInfo: return osBack;
default: break; default: break;
} }
@ -2112,6 +2117,7 @@ eOSState cMenuRecordings::ProcessKey(eKeys Key)
case kRed: return (helpKeys > 1 && RecordingCommands.Count()) ? Commands() : Play(); case kRed: return (helpKeys > 1 && RecordingCommands.Count()) ? Commands() : Play();
case kGreen: return Rewind(); case kGreen: return Rewind();
case kYellow: return Delete(); case kYellow: return Delete();
case kInfo:
case kBlue: return Info(); case kBlue: return Info();
case k1...k9: return Commands(Key); case k1...k9: return Commands(Key);
case kNone: if (Recordings.StateChanged(recordingsState)) case kNone: if (Recordings.StateChanged(recordingsState))

9
vdr.c
View File

@ -22,7 +22,7 @@
* *
* The project's page is at http://www.cadsoft.de/vdr * The project's page is at http://www.cadsoft.de/vdr
* *
* $Id: vdr.c 1.302 2007/11/03 14:46:29 kls Exp $ * $Id: vdr.c 1.303 2007/11/25 15:11:33 kls Exp $
*/ */
#include <getopt.h> #include <getopt.h>
@ -914,9 +914,11 @@ int main(int argc, char *argv[])
break; break;
// Info: // Info:
case kInfo: { case kInfo: {
bool WasInfoMenu = IsInfoMenu; if (IsInfoMenu) {
key = kNone; // nobody else needs to see this key
DELETE_MENU; DELETE_MENU;
if (!WasInfoMenu) { }
else if (!Menu) {
IsInfoMenu = true; IsInfoMenu = true;
if (cControl::Control()) { if (cControl::Control()) {
cControl::Control()->Hide(); cControl::Control()->Hide();
@ -930,6 +932,7 @@ int main(int argc, char *argv[])
cRemote::Put(kOk, true); cRemote::Put(kOk, true);
cRemote::Put(kSchedule, true); cRemote::Put(kSchedule, true);
} }
key = kNone; // nobody else needs to see this key
} }
} }
break; break;