From d0179ea21969cdc9c8d98154b84fd0106be83078 Mon Sep 17 00:00:00 2001 From: Klaus Schmidinger Date: Sun, 16 Jul 2000 15:02:33 +0200 Subject: Improved handling of blanks in channel and timer names --- menu.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'menu.c') diff --git a/menu.c b/menu.c index db3730fe..1a8103ce 100644 --- a/menu.c +++ b/menu.c @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: menu.c 1.18 2000/07/16 13:42:29 kls Exp $ + * $Id: menu.c 1.19 2000/07/16 14:52:48 kls Exp $ */ #include "menu.h" @@ -16,7 +16,7 @@ #define MENUTIMEOUT 120 // seconds -const char *FileNameChars = "aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ0123456789-.# "; +const char *FileNameChars = " aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ0123456789-.#^"; // --- cMenuEditItem --------------------------------------------------------- @@ -429,7 +429,7 @@ void cMenuEditStrItem::Set(void) char buf[1000]; if (pos >= 0) { strncpy(buf, value, pos); - const char *s = value[pos] != ' ' ? value + pos + 1 : ""; + const char *s = value[pos] != '^' ? value + pos + 1 : ""; snprintf(buf + pos, sizeof(buf) - pos - 2, "[%c]%s", *(value + pos), s); SetValue(buf); } @@ -455,12 +455,12 @@ eOSState cMenuEditStrItem::ProcessKey(eKeys Key) { switch (Key) { case kLeft: if (pos > 0) { - if (value[pos] == ' ') + if (value[pos] == '^') value[pos] = 0; pos--; } break; - case kRight: if (pos < length && value[pos] != ' ') { + case kRight: if (pos < length && value[pos] != '^' && (pos < int(strlen(value) - 1) || value[pos] != ' ')) { if (++pos >= int(strlen(value))) { value[pos] = ' '; value[pos + 1] = 0; @@ -474,7 +474,7 @@ eOSState cMenuEditStrItem::ProcessKey(eKeys Key) return cMenuEditItem::ProcessKey(Key); break; case kOk: if (pos >= 0) { - if (value[pos] == ' ') + if (value[pos] == '^') value[pos] = 0; pos = -1; break; -- cgit v1.2.3