summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2019-03-18 16:20:17 +0100
committerKlaus Schmidinger <vdr@tvdr.de>2019-03-18 16:20:17 +0100
commitbd3b6f17e476d3da80283715fe8eef4665a2957a (patch)
tree90aa85b922eddd9eb91283fa98b8348e166c0025
parent1fa861ecb9fa6327af7e8b6af213ead16fe76f47 (diff)
downloadvdr-bd3b6f17e476d3da80283715fe8eef4665a2957a.tar.gz
vdr-bd3b6f17e476d3da80283715fe8eef4665a2957a.tar.bz2
Fixed updating the cursor position when switching channels with the Channel+/- keys while the Channels menu is open
-rw-r--r--HISTORY2
-rw-r--r--menu.c18
2 files changed, 18 insertions, 2 deletions
diff --git a/HISTORY b/HISTORY
index a89a8a5f..a11eb99e 100644
--- a/HISTORY
+++ b/HISTORY
@@ -9387,3 +9387,5 @@ Video Disk Recorder Revision History
SI::ExtensionDescriptor (reported by Helmut Binder).
- Fixed sorting recordings alphabetically.
- Fixed dropping capabilities in case cap_sys_time is not available.
+- Fixed updating the cursor position when switching channels with the Channel+/- keys
+ while the Channels menu is open.
diff --git a/menu.c b/menu.c
index b9133456..22bdab57 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 4.78 2018/07/16 09:29:57 kls Exp $
+ * $Id: menu.c 4.79 2019/03/18 16:14:06 kls Exp $
*/
#include "menu.h"
@@ -576,7 +576,7 @@ eOSState cMenuChannels::ProcessKey(eKeys Key)
break;
default:
if (state == osUnknown) {
- switch (Key) {
+ switch (int(Key)) {
case k0 ... k9:
return Number(Key);
case kOk: return Switch();
@@ -586,6 +586,20 @@ eOSState cMenuChannels::ProcessKey(eKeys Key)
case kBlue: if (!HasSubMenu())
Mark();
break;
+ case kChanUp|k_Repeat:
+ case kChanUp:
+ case kChanDn|k_Repeat:
+ case kChanDn: {
+ LOCK_CHANNELS_READ;
+ int CurrentChannelNr = cDevice::CurrentChannel();
+ for (cMenuChannelItem *ci = (cMenuChannelItem *)First(); ci; ci = (cMenuChannelItem *)ci->Next()) {
+ if (!ci->Channel()->GroupSep() && ci->Channel()->Number() == CurrentChannelNr) {
+ SetCurrent(ci);
+ Display();
+ break;
+ }
+ }
+ }
default: break;
}
}