summaryrefslogtreecommitdiff
path: root/menuitems.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2004-02-29 14:21:22 +0100
committerKlaus Schmidinger <vdr@tvdr.de>2004-02-29 14:21:22 +0100
commit198fcf437b46d32beea411313f1dbd4aa200a62b (patch)
tree7dda9e4e3bb1b7ed3358db5ccf53a8f9ac5bde08 /menuitems.c
parent4063d727606382e22ce1e0a41d0fab17e88e9f06 (diff)
downloadvdr-198fcf437b46d32beea411313f1dbd4aa200a62b.tar.gz
vdr-198fcf437b46d32beea411313f1dbd4aa200a62b.tar.bz2
Implemented VPS controlled timers1.3.5
Diffstat (limited to 'menuitems.c')
-rw-r--r--menuitems.c19
1 files changed, 18 insertions, 1 deletions
diff --git a/menuitems.c b/menuitems.c
index e6641541..49874f11 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.14 2004/01/25 15:40:55 kls Exp $
+ * $Id: menuitems.c 1.15 2004/02/24 12:38:43 kls Exp $
*/
#include "menuitems.h"
@@ -113,6 +113,23 @@ void cMenuEditBoolItem::Set(void)
SetValue(buf);
}
+// --- cMenuEditBitItem ------------------------------------------------------
+
+cMenuEditBitItem::cMenuEditBitItem(const char *Name, int *Value, int Mask, const char *FalseString, const char *TrueString)
+:cMenuEditBoolItem(Name, &bit, FalseString, TrueString)
+{
+ value = Value;
+ bit = (*value & Mask) != 0;
+ mask = Mask;
+ Set();
+}
+
+void cMenuEditBitItem::Set(void)
+{
+ *value = bit ? *value | mask : *value & ~mask;
+ cMenuEditBoolItem::Set();
+}
+
// --- cMenuEditNumItem ------------------------------------------------------
cMenuEditNumItem::cMenuEditNumItem(const char *Name, char *Value, int Length, bool Blind)