summaryrefslogtreecommitdiff
path: root/menuitems.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2015-09-08 11:08:06 +0200
committerKlaus Schmidinger <vdr@tvdr.de>2015-09-08 11:08:06 +0200
commit4e3325b7f7e30d1013798d74b8e7e0b8471813b1 (patch)
treec5082d2ea7afddbec5cfeda720daee873d9f11aa /menuitems.c
parent3284e941c6ab7f59c4fbfa78d4976d756aec0731 (diff)
downloadvdr-4e3325b7f7e30d1013798d74b8e7e0b8471813b1.tar.gz
vdr-4e3325b7f7e30d1013798d74b8e7e0b8471813b1.tar.bz2
Implemented setup options for SVDRP peering
Diffstat (limited to 'menuitems.c')
-rw-r--r--menuitems.c22
1 files changed, 21 insertions, 1 deletions
diff --git a/menuitems.c b/menuitems.c
index c07ad2a7..659c1a58 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 4.1 2015/07/18 10:38:31 kls Exp $
+ * $Id: menuitems.c 4.2 2015/09/08 10:25:23 kls Exp $
*/
#include "menuitems.h"
@@ -774,6 +774,26 @@ void cMenuEditStraItem::Set(void)
SetValue(strings[*value]);
}
+// --- cMenuEditStrlItem -----------------------------------------------------
+
+cMenuEditStrlItem::cMenuEditStrlItem(const char *Name, char *Value, int Length, const cStringList *Strings)
+:cMenuEditIntItem(Name, &index, 0, Strings->Size() - 1)
+{
+ strings = Strings;
+ value = Value;
+ length = Length;
+ index = strings->Find(value);
+ if (index < 0)
+ index = 0;
+ Set();
+}
+
+void cMenuEditStrlItem::Set(void)
+{
+ strn0cpy(value, strings->At(index), length);
+ SetValue(value);
+}
+
// --- cMenuEditChanItem -----------------------------------------------------
cMenuEditChanItem::cMenuEditChanItem(const char *Name, int *Value, const char *NoneString)