summaryrefslogtreecommitdiff
path: root/menuitems.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2008-02-08 13:48:31 +0100
committerKlaus Schmidinger <vdr@tvdr.de>2008-02-08 13:48:31 +0100
commitf54c810bcd80221f5f07590233a563d93f49ffe8 (patch)
tree9923341838637162ead901b5f6c03c4bae789d5e /menuitems.c
parent538cbdb26a7804408c368804def0dce0dc4821c9 (diff)
downloadvdr-f54c810bcd80221f5f07590233a563d93f49ffe8.tar.gz
vdr-f54c810bcd80221f5f07590233a563d93f49ffe8.tar.bz2
Revoked the switch to the "multiproto" driver in order to make a new stable version
Diffstat (limited to 'menuitems.c')
-rw-r--r--menuitems.c60
1 files changed, 1 insertions, 59 deletions
diff --git a/menuitems.c b/menuitems.c
index 15f729bd..44c9f892 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.56 2008/01/26 16:07:07 kls Exp $
+ * $Id: menuitems.c 1.57 2008/02/08 13:48:31 kls Exp $
*/
#include "menuitems.h"
@@ -937,64 +937,6 @@ 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)