mirror of
https://github.com/VDR4Arch/vdr.git
synced 2023-10-10 13:36:52 +02:00
Suppressing automatic hotkey assignment if entry starts with digit and blank
This commit is contained in:
parent
b83ff7ab5d
commit
9bfb79e15e
2
HISTORY
2
HISTORY
@ -1145,3 +1145,5 @@ Video Disk Recorder Revision History
|
|||||||
performance under heavy system load.
|
performance under heavy system load.
|
||||||
- New 'make' target 'install', which copies the manual pages and executables
|
- New 'make' target 'install', which copies the manual pages and executables
|
||||||
to their appropriate system locations.
|
to their appropriate system locations.
|
||||||
|
- Automatic hotkey assignment is now suppressed if the first entry in
|
||||||
|
commands.conf starts with a digit in the range '1'...'9', followed by a blank.
|
||||||
|
10
osd.c
10
osd.c
@ -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: osd.c 1.22 2002/03/24 11:23:23 kls Exp $
|
* $Id: osd.c 1.23 2002/03/29 16:34:03 kls Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "osd.h"
|
#include "osd.h"
|
||||||
@ -76,6 +76,7 @@ eOSState cOsdItem::ProcessKey(eKeys Key)
|
|||||||
|
|
||||||
cOsdMenu::cOsdMenu(const char *Title, int c0, int c1, int c2, int c3, int c4)
|
cOsdMenu::cOsdMenu(const char *Title, int c0, int c1, int c2, int c3, int c4)
|
||||||
{
|
{
|
||||||
|
digit = 0;
|
||||||
hasHotkeys = false;
|
hasHotkeys = false;
|
||||||
visible = false;
|
visible = false;
|
||||||
title = NULL;
|
title = NULL;
|
||||||
@ -105,11 +106,14 @@ cOsdMenu::~cOsdMenu()
|
|||||||
const char *cOsdMenu::hk(const char *s)
|
const char *cOsdMenu::hk(const char *s)
|
||||||
{
|
{
|
||||||
static char buffer[32];
|
static char buffer[32];
|
||||||
|
if (s && hasHotkeys) {
|
||||||
|
if (digit == 0 && '1' <= *s && *s <= '9' && *(s + 1) == ' ')
|
||||||
|
digit = 10; // prevents automatic hotkeys - input already has them
|
||||||
if (digit < 9) {
|
if (digit < 9) {
|
||||||
snprintf(buffer, sizeof(buffer), " %d %s", ++digit, s);
|
snprintf(buffer, sizeof(buffer), " %d %s", ++digit, s);
|
||||||
return buffer;
|
s = buffer;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
|
||||||
return s;
|
return s;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
11
vdr.5
11
vdr.5
@ -8,7 +8,7 @@
|
|||||||
.\" License as specified in the file COPYING that comes with the
|
.\" License as specified in the file COPYING that comes with the
|
||||||
.\" vdr distribution.
|
.\" vdr distribution.
|
||||||
.\"
|
.\"
|
||||||
.\" $Id: vdr.5 1.1 2002/03/29 14:05:31 kls Exp $
|
.\" $Id: vdr.5 1.2 2002/03/29 16:45:36 kls Exp $
|
||||||
.\"
|
.\"
|
||||||
.TH vdr 5 "29 Mar 2002" "1.0.0" "Video Disk Recorder Files"
|
.TH vdr 5 "29 Mar 2002" "1.0.0" "Video Disk Recorder Files"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
@ -221,6 +221,13 @@ and \fBcommand\fR is the actual command string that will be executed when this
|
|||||||
option is selected. The delimiting ':' may be surrounded by any number of
|
option is selected. The delimiting ':' may be surrounded by any number of
|
||||||
white space characters.
|
white space characters.
|
||||||
|
|
||||||
|
By default the menu entries in the "Commands" menu will be numbered '1'...'9'
|
||||||
|
to make them selectable by pressing the corresponding number key. If you want
|
||||||
|
to use your own numbering scheme (maybe to skip certain numbers), just precede
|
||||||
|
the \fBtitle\fRs with the numbers of your choice. \fBvdr\fR will suppress its
|
||||||
|
automatic numbering if the first entry in \fIcommands.conf\fR starts with a
|
||||||
|
digit in the range '1'...'9', followed by a blank.
|
||||||
|
|
||||||
In order to avoid error messages to the console, every command should have
|
In order to avoid error messages to the console, every command should have
|
||||||
\fIstderr\fR redirected to \fIstdout\fR. Everything the command prints to
|
\fIstderr\fR redirected to \fIstdout\fR. Everything the command prints to
|
||||||
\fIstdout\fR will be displayed in a result window, with \fBtitle\fR as its title.
|
\fIstdout\fR will be displayed in a result window, with \fBtitle\fR as its title.
|
||||||
@ -232,6 +239,8 @@ Check for new mail: /usr/local/bin/checkmail 2>&1
|
|||||||
CPU status : /usr/local/bin/cpustatus 2>&1
|
CPU status : /usr/local/bin/cpustatus 2>&1
|
||||||
.br
|
.br
|
||||||
Disk space : df -h | grep '/video' | awk '{ print 100 - $5 "% free"; }'
|
Disk space : df -h | grep '/video' | awk '{ print 100 - $5 "% free"; }'
|
||||||
|
.br
|
||||||
|
Calendar : date;echo;cal
|
||||||
|
|
||||||
Note that the commands 'checkmail' and 'cpustatus' are only \fBexamples\fR!
|
Note that the commands 'checkmail' and 'cpustatus' are only \fBexamples\fR!
|
||||||
Don't send emails to the author asking where to find these ;-)
|
Don't send emails to the author asking where to find these ;-)
|
||||||
|
Loading…
Reference in New Issue
Block a user