diff options
author | Klaus Schmidinger <kls (at) cadsoft (dot) de> | 2008-04-13 18:00:00 +0200 |
---|---|---|
committer | Klaus Schmidinger <kls (at) cadsoft (dot) de> | 2008-04-13 18:00:00 +0200 |
commit | 771986b89fc19b4ae65179ccf7dd8082512f8b7d (patch) | |
tree | 7c9b53c2f3008ea61bc3af93b2c4a5ac3e4a7b6a /menuitems.c | |
parent | fa56503b9a050ec0f0445d48f9bc167b9abe5ee1 (diff) | |
download | vdr-patch-lnbsharing-771986b89fc19b4ae65179ccf7dd8082512f8b7d.tar.gz vdr-patch-lnbsharing-771986b89fc19b4ae65179ccf7dd8082512f8b7d.tar.bz2 |
Version 1.7.0vdr-1.7.0
- Re-implemented handling of DVB-S2, which first appeared in version 1.5.14, but was
revoked in version 1.5.15 in favor of making a stable version 1.6.0. VDR now
requires the "multiproto" DVB driver, e.g. from http://jusst.de/hg/multiproto.
Note that the channels.conf file now supports additional parameters, so you may
want to make sure you have a backup of this file in case you need to go back to
the previous version of VDR!
- Fixed displaying transponder data when it is modified (thanks to Reinhard Nissl).
- Fixed handling the counter in detection of pre 1.3.19 PS data (thanks to Reinhard
Nissl).
- Improved logging system time changes to avoid problems on slow systems under
heavy load (suggested by Helmut Auer).
- Now setting the thread name, so that it can be seen in 'top -H' (thanks to Rolf
Ahrenberg).
- Fixed initializing the timer's flags in the cTimer copy constructor (thanks to
Andreas Mair).
- Fixed setting the OSD level in the 'osddemo' example (thanks to Wolfgang Rohdewald).
- Increased the time between checking the CAM status to 500ms to avoid problems
with some CAMs (reported by Arthur Konovalov).
Diffstat (limited to 'menuitems.c')
-rw-r--r-- | menuitems.c | 60 |
1 files changed, 59 insertions, 1 deletions
diff --git a/menuitems.c b/menuitems.c index 4aba66c..200834e 100644 --- a/menuitems.c +++ b/menuitems.c @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: menuitems.c 1.58 2008/02/10 16:03:30 kls Exp $ + * $Id: menuitems.c 2.1 2008/04/12 12:05:25 kls Exp $ */ #include "menuitems.h" @@ -936,6 +936,64 @@ eOSState cMenuEditTimeItem::ProcessKey(eKeys Key) return state; } +// --- cMenuEditMapItem ------------------------------------------------------ + +cMenuEditMapItem::cMenuEditMapItem(const char *Name, int *Value, const tChannelParameterMap *Map, const char *ZeroString) +:cMenuEditItem(Name) +{ + value = Value; + map = Map; + zeroString = ZeroString; + Set(); +} + +void cMenuEditMapItem::Set(void) +{ + const char *s = NULL; + int n = MapToUser(*value, map, &s); + if (n == 999) + SetValue(tr("auto")); + else if (n == 0 && zeroString) + SetValue(zeroString); + else if (n >= 0) { + if (s) + SetValue(s); + else { + char buf[16]; + snprintf(buf, sizeof(buf), "%d", n); + SetValue(buf); + } + } + else + SetValue("???"); +} + +eOSState cMenuEditMapItem::ProcessKey(eKeys Key) +{ + eOSState state = cMenuEditItem::ProcessKey(Key); + + if (state == osUnknown) { + int newValue = *value; + int n = DriverIndex(*value, map); + if (NORMALKEY(Key) == kLeft) { // TODO might want to increase the delta if repeated quickly? + if (n-- > 0) + newValue = map[n].driverValue; + } + else if (NORMALKEY(Key) == kRight) { + if (map[++n].userValue >= 0) + newValue = map[n].driverValue; + } + else + return state; + if (newValue != *value) { + *value = newValue; + Set(); + } + state = osContinue; + } + return state; +} + // --- cMenuSetupPage -------------------------------------------------------- cMenuSetupPage::cMenuSetupPage(void) |