diff options
author | Klaus Schmidinger <vdr@tvdr.de> | 2017-05-21 13:18:26 +0200 |
---|---|---|
committer | Klaus Schmidinger <vdr@tvdr.de> | 2017-05-21 13:18:26 +0200 |
commit | 354910faab19e9d32dd3f1a7492ba9f685923ba8 (patch) | |
tree | 0ea4a7122148942e14af83d33e50457f01ebfe40 /menu.c | |
parent | 0f1f2778198c161db2c1b20bdd29ff4a6e9326e1 (diff) | |
download | vdr-354910faab19e9d32dd3f1a7492ba9f685923ba8.tar.gz vdr-354910faab19e9d32dd3f1a7492ba9f685923ba8.tar.bz2 |
If the Channel+/- keys are pressed while in the Schedules menu, the menu is now switched to the EPG of the new current channel
Diffstat (limited to 'menu.c')
-rw-r--r-- | menu.c | 29 |
1 files changed, 26 insertions, 3 deletions
@@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: menu.c 4.28 2017/05/20 13:00:21 kls Exp $ + * $Id: menu.c 4.29 2017/05/21 13:18:26 kls Exp $ */ #include "menu.h" @@ -1691,7 +1691,7 @@ eOSState cMenuWhatsOn::ProcessKey(eKeys Key) eOSState state = cOsdMenu::ProcessKey(Key); if (state == osUnknown) { - switch (Key) { + switch (int(Key)) { case kRecord: case kRed: return Record(); case kYellow: state = osBack; @@ -1707,6 +1707,20 @@ eOSState cMenuWhatsOn::ProcessKey(eKeys Key) case kBlue: if (canSwitch) return Switch(); break; + case kChanUp|k_Repeat: + case kChanUp: + case kChanDn|k_Repeat: + case kChanDn: if (!HasSubMenu()) { + for (cOsdItem *item = First(); item; item = Next(item)) { + if (((cMenuScheduleItem *)item)->channel->Number() == cDevice::CurrentChannel()) { + SetCurrent(item); + Display(); + SetHelpKeys(); + break; + } + } + } + break; case kInfo: case kOk: if (Count()) { LOCK_TIMERS_READ; @@ -1993,7 +2007,7 @@ eOSState cMenuSchedule::ProcessKey(eKeys Key) eOSState state = cOsdMenu::ProcessKey(Key); if (state == osUnknown) { - switch (Key) { + switch (int(Key)) { case k0: return Number(); case kRecord: case kRed: return Record(); @@ -2023,6 +2037,15 @@ eOSState cMenuSchedule::ProcessKey(eKeys Key) case kBlue: if (canSwitch) return Switch(); break; + case kChanUp|k_Repeat: + case kChanUp: + case kChanDn|k_Repeat: + case kChanDn: if (!HasSubMenu()) { + LOCK_CHANNELS_READ; + if (const cChannel *Channel = Channels->GetByNumber(cDevice::CurrentChannel())) + Set(Channel, true); + } + break; case kInfo: case kOk: if (Count()) { LOCK_TIMERS_READ; |