summaryrefslogtreecommitdiff
path: root/menu.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2010-03-06 12:47:47 +0100
committerKlaus Schmidinger <vdr@tvdr.de>2010-03-06 12:47:47 +0100
commite7148f3beeb1d1b8efb34874c7a791410b3a6b59 (patch)
tree2db45f98521848a53217706634a24c8ec6d1fc74 /menu.c
parentab9af4cea16b6d3875e60b7809c02f3b6794e6b4 (diff)
downloadvdr-e7148f3beeb1d1b8efb34874c7a791410b3a6b59.tar.gz
vdr-e7148f3beeb1d1b8efb34874c7a791410b3a6b59.tar.bz2
The "Source" item in the "Edit channel" menu now wraps around the list of sources
Diffstat (limited to 'menu.c')
-rw-r--r--menu.c17
1 files changed, 12 insertions, 5 deletions
diff --git a/menu.c b/menu.c
index 655eb4c4..967084a2 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 2.17 2010/02/21 14:09:19 kls Exp $
+ * $Id: menu.c 2.18 2010/03/06 12:43:15 kls Exp $
*/
#include "menu.h"
@@ -160,16 +160,23 @@ eOSState cMenuEditSrcItem::ProcessKey(eKeys Key)
eOSState state = cMenuEditItem::ProcessKey(Key);
if (state == osUnknown) {
- if (NORMALKEY(Key) == kLeft) { // TODO might want to increase the delta if repeated quickly?
- if (source && source->Prev()) {
- source = (cSource *)source->Prev();
+ bool IsRepeat = Key & k_Repeat;
+ Key = NORMALKEY(Key);
+ if (Key == kLeft) { // TODO might want to increase the delta if repeated quickly?
+ if (source) {
+ if (source->Prev())
+ source = (cSource *)source->Prev();
+ else if (!IsRepeat)
+ source = Sources.Last();
*value = source->Code();
}
}
- else if (NORMALKEY(Key) == kRight) {
+ else if (Key == kRight) {
if (source) {
if (source->Next())
source = (cSource *)source->Next();
+ else if (!IsRepeat)
+ source = Sources.First();
}
else
source = Sources.First();