summaryrefslogtreecommitdiff
path: root/menu.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2001-02-03 15:28:49 +0100
committerKlaus Schmidinger <vdr@tvdr.de>2001-02-03 15:28:49 +0100
commit7f6a2a7a0c001c425efdab381914e7c297f61166 (patch)
tree044a9b08d0aef5e2aa997a1f8e2a659ef552f82f /menu.c
parentcaa96c00eaecd5f0c67f0575468dd088f2c8ee1e (diff)
downloadvdr-7f6a2a7a0c001c425efdab381914e7c297f61166.tar.gz
vdr-7f6a2a7a0c001c425efdab381914e7c297f61166.tar.bz2
Implemented hotkeys for Main and Commands menu
Diffstat (limited to 'menu.c')
-rw-r--r--menu.c27
1 files changed, 18 insertions, 9 deletions
diff --git a/menu.c b/menu.c
index 777bd6c3..027c4661 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 1.59 2001/02/03 14:28:42 kls Exp $
+ * $Id: menu.c 1.60 2001/02/03 15:28:49 kls Exp $
*/
#include "menu.h"
@@ -1620,6 +1620,7 @@ cMenuCommands::cMenuCommands(void)
Add(new cOsdItem(command->Title()));
i++;
}
+ SetHasHotkeys();
}
eOSState cMenuCommands::Execute(void)
@@ -1650,18 +1651,25 @@ eOSState cMenuCommands::ProcessKey(eKeys Key)
#define STOP_RECORDING tr("Stop recording ")
+static const char *hk(int n, const char *s)
+{
+ static char buffer[32];
+ snprintf(buffer, sizeof(buffer), " %d %s", n, s);
+ return buffer;
+}
+
cMenuMain::cMenuMain(bool Replaying)
:cOsdMenu(tr("Main"))
{
- Add(new cOsdItem(tr("Schedule"), osSchedule));
- Add(new cOsdItem(tr("Channels"), osChannels));
- Add(new cOsdItem(tr("Timers"), osTimers));
- Add(new cOsdItem(tr("Recordings"), osRecordings));
- Add(new cOsdItem(tr("Setup"), osSetup));
+ Add(new cOsdItem(hk(1, tr("Schedule")), osSchedule));
+ Add(new cOsdItem(hk(2, tr("Channels")), osChannels));
+ Add(new cOsdItem(hk(3, tr("Timers")), osTimers));
+ Add(new cOsdItem(hk(4, tr("Recordings")), osRecordings));
+ Add(new cOsdItem(hk(5, tr("Setup")), osSetup));
if (Commands.Count())
- Add(new cOsdItem(tr("Commands"), osCommands));
+ Add(new cOsdItem(hk(6, tr("Commands")), osCommands));
if (Replaying)
- Add(new cOsdItem(tr("Stop replaying"), osStopReplay));
+ Add(new cOsdItem(tr(" Stop replaying"), osStopReplay));
const char *s = NULL;
while ((s = cRecordControls::GetInstantId(s)) != NULL) {
char *buffer = NULL;
@@ -1670,10 +1678,11 @@ cMenuMain::cMenuMain(bool Replaying)
delete buffer;
}
if (cVideoCutter::Active())
- Add(new cOsdItem(tr("Cancel editing"), osCancelEdit));
+ Add(new cOsdItem(tr(" Cancel editing"), osCancelEdit));
SetHelp(tr("Record"), NULL, NULL, cReplayControl::LastReplayed() ? tr("Resume") : NULL);
Display();
lastActivity = time(NULL);
+ SetHasHotkeys();
}
eOSState cMenuMain::ProcessKey(eKeys Key)