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

Fixed double call to MainMenuAction() of a plugin if invoked via a hotkey

This commit is contained in:
Klaus Schmidinger 2003-05-02 10:54:00 +02:00
parent 240529710d
commit 03a4a3a618
5 changed files with 22 additions and 9 deletions

View File

@ -624,3 +624,6 @@ Andreas Mair <Andreas.Mair@linogate.com>
Olivier Jacques <jacquesolivier@hotmail.com>) Olivier Jacques <jacquesolivier@hotmail.com>)
for translating OSD texts to the French language for translating OSD texts to the French language
Kai Moeller <moeller.ki@gmx.de>
for reporting a double call to MainMenuAction() of a plugin if invoked via a hotkey

View File

@ -2092,3 +2092,5 @@ Video Disk Recorder Revision History
- Fixed paging through lists with repeated Left/Right keys. - Fixed paging through lists with repeated Left/Right keys.
- Fixed setting the PCR-PID in case it is equal to one of the other PIDs (thanks - Fixed setting the PCR-PID in case it is equal to one of the other PIDs (thanks
to Oliver Endriss for reporting this one). to Oliver Endriss for reporting this one).
- Fixed double call to MainMenuAction() of a plugin if invoked via a hotkey (thanks
to Kai Moeller for reporting this one).

5
osd.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: osd.c 1.40 2003/03/23 15:41:54 kls Exp $ * $Id: osd.c 1.41 2003/05/02 10:46:13 kls Exp $
*/ */
#include "osd.h" #include "osd.h"
@ -578,7 +578,8 @@ eOSState cOsdMenu::HotKey(eKeys Key)
if (s && (s = skipspace(s)) != NULL) { if (s && (s = skipspace(s)) != NULL) {
if (*s == Key - k1 + '1') { if (*s == Key - k1 + '1') {
current = item->Index(); current = item->Index();
return ProcessKey(kOk); cRemote::Put(kOk, true);
break;
} }
} }
} }

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: remote.c 1.37 2003/05/01 14:44:55 kls Exp $ * $Id: remote.c 1.38 2003/05/02 10:49:50 kls Exp $
*/ */
#include "remote.h" #include "remote.h"
@ -58,7 +58,7 @@ void cRemote::Clear(void)
} }
} }
bool cRemote::Put(eKeys Key) bool cRemote::Put(eKeys Key, bool AtFront)
{ {
if (Key != kNone) { if (Key != kNone) {
cMutexLock MutexLock(&mutex); cMutexLock MutexLock(&mutex);
@ -68,9 +68,16 @@ bool cRemote::Put(eKeys Key)
if (d <= 0) if (d <= 0)
d = MaxKeys + d; d = MaxKeys + d;
if (d - 1 > 0) { if (d - 1 > 0) {
keys[in] = Key; if (AtFront) {
if (++in >= MaxKeys) if (--out < 0)
in = 0; out = MaxKeys - 1;
keys[out] = Key;
}
else {
keys[in] = Key;
if (++in >= MaxKeys)
in = 0;
}
keyPressed.Broadcast(); keyPressed.Broadcast();
return true; return true;
} }

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: remote.h 1.27 2003/05/01 14:45:00 kls Exp $ * $Id: remote.h 1.28 2003/05/02 10:41:35 kls Exp $
*/ */
#ifndef __REMOTE_H #ifndef __REMOTE_H
@ -42,7 +42,7 @@ public:
const char *Name(void) { return name; } const char *Name(void) { return name; }
static void SetLearning(cRemote *Learning) { learning = Learning; } static void SetLearning(cRemote *Learning) { learning = Learning; }
static void Clear(void); static void Clear(void);
static bool Put(eKeys Key); static bool Put(eKeys Key, bool AtFront = false);
static bool PutMacro(eKeys Key); static bool PutMacro(eKeys Key);
static const char *GetPlugin(void) { return plugin; } static const char *GetPlugin(void) { return plugin; }
static bool HasKeys(void); static bool HasKeys(void);