diff --git a/CONTRIBUTORS b/CONTRIBUTORS index 46aedbd1..6ccec874 100644 --- a/CONTRIBUTORS +++ b/CONTRIBUTORS @@ -1797,6 +1797,8 @@ Thomas G de_DE.po file for adding more special characters to the list of allowed characters when entering strings + for suggesting to make the 'Allowed' parameter in cMenuEditStrItem() NULL by default, + which results in using tr(FileNameChars) David Woodhouse for his help in replacing the get/put_unaligned() macros from asm/unaligned.h with diff --git a/HISTORY b/HISTORY index c785fc88..ee0cbffe 100644 --- a/HISTORY +++ b/HISTORY @@ -5507,3 +5507,5 @@ Video Disk Recorder Revision History - Fixed displaying subtitles in live mode. - Fixed handling CONFDIR (thanks to Rolf Ahrenberg). - Added some missing 'const' keywords (thanks to Sascha Volkenandt). +- The 'Allowed' parameter in cMenuEditStrItem() is now NULL by default, which results + in using tr(FileNameChars) (suggested by Thomas Günther). diff --git a/menu.c b/menu.c index d01bc4cb..7b8ce9a2 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.464 2007/10/19 14:20:15 kls Exp $ + * $Id: menu.c 1.465 2007/11/03 15:02:00 kls Exp $ */ #include "menu.h" @@ -251,7 +251,7 @@ void cMenuEditChannel::Setup(void) // Parameters for all types of sources: strn0cpy(name, data.name, sizeof(name)); - Add(new cMenuEditStrItem( tr("Name"), name, sizeof(name), tr(FileNameChars))); + Add(new cMenuEditStrItem( tr("Name"), name, sizeof(name))); Add(new cMenuEditSrcItem( tr("Source"), &data.source)); Add(new cMenuEditIntItem( tr("Frequency"), &data.frequency)); Add(new cMenuEditIntItem( tr("Vpid"), &data.vpid, 0, 0x1FFF)); @@ -671,7 +671,7 @@ cMenuEditTimer::cMenuEditTimer(cTimer *Timer, bool New) Add(new cMenuEditBitItem( tr("VPS"), &data.flags, tfVps)); Add(new cMenuEditIntItem( tr("Priority"), &data.priority, 0, MAXPRIORITY)); Add(new cMenuEditIntItem( tr("Lifetime"), &data.lifetime, 0, MAXLIFETIME)); - Add(new cMenuEditStrItem( tr("File"), data.file, sizeof(data.file), tr(FileNameChars))); + Add(new cMenuEditStrItem( tr("File"), data.file, sizeof(data.file))); SetFirstDayItem(); } Timers.IncBeingEdited(); @@ -2713,7 +2713,7 @@ cMenuSetupRecord::cMenuSetupRecord(void) Add(new cMenuEditBoolItem(tr("Setup.Recording$Use VPS"), &data.UseVps)); Add(new cMenuEditIntItem( tr("Setup.Recording$VPS margin (s)"), &data.VpsMargin, 0)); Add(new cMenuEditBoolItem(tr("Setup.Recording$Mark instant recording"), &data.MarkInstantRecord)); - Add(new cMenuEditStrItem( tr("Setup.Recording$Name instant recording"), data.NameInstantRecord, sizeof(data.NameInstantRecord), tr(FileNameChars))); + Add(new cMenuEditStrItem( tr("Setup.Recording$Name instant recording"), data.NameInstantRecord, sizeof(data.NameInstantRecord))); Add(new cMenuEditIntItem( tr("Setup.Recording$Instant rec. time (min)"), &data.InstantRecordTime, 1, MAXINSTANTRECTIME)); Add(new cMenuEditIntItem( tr("Setup.Recording$Max. video file size (MB)"), &data.MaxVideoFileSize, MINVIDEOFILESIZE, MAXVIDEOFILESIZE)); Add(new cMenuEditBoolItem(tr("Setup.Recording$Split edited files"), &data.SplitEditedFiles)); diff --git a/menuitems.c b/menuitems.c index e90cb077..a7ceef29 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.54 2007/10/21 12:21:51 kls Exp $ + * $Id: menuitems.c 1.55 2007/11/03 15:01:01 kls Exp $ */ #include "menuitems.h" @@ -256,7 +256,7 @@ cMenuEditStrItem::cMenuEditStrItem(const char *Name, char *Value, int Length, co { value = Value; length = Length; - allowed = Allowed; + allowed = Allowed ? Allowed : tr(FileNameChars); pos = -1; offset = 0; insert = uppercase = false; diff --git a/menuitems.h b/menuitems.h index 50778b16..21890a3d 100644 --- a/menuitems.h +++ b/menuitems.h @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: menuitems.h 1.21 2007/06/08 11:53:37 kls Exp $ + * $Id: menuitems.h 1.22 2007/11/03 14:59:47 kls Exp $ */ #ifndef __MENUITEMS_H @@ -101,7 +101,7 @@ protected: void LeaveEditMode(bool SaveValue = false); bool InEditMode(void) { return valueUtf8 != NULL; } public: - cMenuEditStrItem(const char *Name, char *Value, int Length, const char *Allowed); + cMenuEditStrItem(const char *Name, char *Value, int Length, const char *Allowed = NULL); ~cMenuEditStrItem(); virtual eOSState ProcessKey(eKeys Key); };