From c2c45d68c644684e002a92ceee83af7550aaa1e4 Mon Sep 17 00:00:00 2001 From: Klaus Schmidinger Date: Sun, 6 Jun 2010 14:49:00 +0200 Subject: =?UTF-8?q?Version=201.7.15=20-=20Added=20Macedonian=20language=20?= =?UTF-8?q?texts=20(thanks=20to=20Dimitar=20Petrovski).=20-=20Updated=20th?= =?UTF-8?q?e=20Estonian=20OSD=20texts=20(thanks=20to=20Arthur=20Konovalov)?= =?UTF-8?q?.=20-=20Updated=20the=20Finnish=20OSD=20texts=20(thanks=20to=20?= =?UTF-8?q?Rolf=20Ahrenberg).=20-=20Added=20handling=20of=20EnhancedAC3Des?= =?UTF-8?q?criptorTag=20(thanks=20to=20Eric=20Valette).=20-=20The=20defaul?= =?UTF-8?q?t=20SVDRP=20port=20is=20now=206419=20(registered=20with=20ICANN?= =?UTF-8?q?/IANA=20by=20Christian=20Tramnitz).=20=20=20Use=20'-p=202001'?= =?UTF-8?q?=20to=20switch=20back=20to=20the=20old=20port=20if=20necessary.?= =?UTF-8?q?=20-=20Updated=20the=20Italian=20OSD=20texts=20(thanks=20to=20D?= =?UTF-8?q?iego=20Pierotto).=20-=20cDvbDevice::ProvidesTransponder()=20now?= =?UTF-8?q?=20checks=20the=20modulation=20capabilities=20of=20the=20=20=20?= =?UTF-8?q?device=20(as=20far=20as=20the=20driver=20allows=20this).=20-=20?= =?UTF-8?q?Fixed=20cFrameDetector::Analyze()=20in=20case=20part=20of=20the?= =?UTF-8?q?=20data=20has=20been=20processed=20and=20=20=20there=20is=20les?= =?UTF-8?q?s=20than=20MIN=5FTS=5FPACKETS=5FFOR=5FFRAME=5FDETECTOR=20left?= =?UTF-8?q?=20(reported=20by=20Derek=20Kelly).=20-=20Added=20a=20note=20ab?= =?UTF-8?q?out=20not=20deleting=20cDeviceHook=20objects=20to=20device.h.?= =?UTF-8?q?=20-=20Added=20user=20defined=20key=20kUser0=20(suggested=20by?= =?UTF-8?q?=20Ulf=20Kiener).=20-=20Include=20paths=20are=20now=20added=20i?= =?UTF-8?q?nstead=20of=20overwriting=20INCLUDES=20in=20the=20Makefile=20(t?= =?UTF-8?q?hanks=20=20=20to=20Paul=20Menzel).=20-=20The=20various=20modula?= =?UTF-8?q?tion=20types=20are=20now=20taken=20into=20account=20when=20sele?= =?UTF-8?q?cting=20a=20device=20for=20=20=20a=20recording=20or=20live=20vi?= =?UTF-8?q?ewing,=20so=20that=20devices=20that=20provide=20more=20capabili?= =?UTF-8?q?ties=20are=20=20=20spared.=20-=20Fixed=20generating=20PMT=20lan?= =?UTF-8?q?guage=20descriptors=20for=20multi=20language=20PIDs=20(thanks?= =?UTF-8?q?=20to=20Rolf=20=20=20Ahrenberg).=20-=20Transponders=20that=20us?= =?UTF-8?q?e=20"8psk=20turbo=20fec"=20(a=20non-standard=20mode=20used=20by?= =?UTF-8?q?=20North=20American=20=20=20providers)=20are=20now=20identified?= =?UTF-8?q?=20by=20assuming=20that=20all=208psk=20transponders=20on=20DVB-?= =?UTF-8?q?S=20use=20=20=20"turbo=20fec".=20In=20order=20to=20determine=20?= =?UTF-8?q?whether=20a=20certain=20device=20can=20handle=20"turbo=20fec",?= =?UTF-8?q?=20=20=20the=20new=20driver=20flag=20FE=5FCAN=5FTURBO=5FFEC=20i?= =?UTF-8?q?s=20checked.=20If=20your=20device=20can=20handle=20"turbo=20=20?= =?UTF-8?q?=20fec",=20and=20your=20driver=20doesn't=20have=20that=20flag,?= =?UTF-8?q?=20yet,=20you=20can=20apply=20the=20patch=20from=20=20=20ftp://?= =?UTF-8?q?ftp.tvdr.de/vdr/Developer/v4l-dvb-add-FE=5FCAN=5FTURBO=5FFEC.di?= =?UTF-8?q?ff.=20A=20temporary=20=20=20macro=20in=20dvbdevice.c=20defines?= =?UTF-8?q?=20the=20flag=20for=20all=20those=20who=20don't=20need=20this?= =?UTF-8?q?=20in=20the=20=20=20driver,=20so=20that=20they=20can=20continue?= =?UTF-8?q?=20using=20an=20unmodified=20driver.=20=20=20Thanks=20to=20Dere?= =?UTF-8?q?k=20Kelly=20for=20testing=20this.=20-=20Updated=20the=20Ukraini?= =?UTF-8?q?an=20OSD=20texts=20(thanks=20to=20Yarema=20Aka=20Knedlyk).=20-?= =?UTF-8?q?=20Fixed=20handling=20"none"=20color=20entries=20in=20XPM=20fil?= =?UTF-8?q?es=20(thanks=20to=20Thomas=20G=C3=BCnther).=20-=20Fixed=20a=20c?= =?UTF-8?q?rash=20when=20creating=20a=20new=20channel=20if=20the=20channel?= =?UTF-8?q?=20list=20is=20empty=20(reported=20=20=20by=20Halim=20Sahin).?= =?UTF-8?q?=20-=20Updated=20the=20Czech=20OSD=20texts=20(thanks=20to=20Rad?= =?UTF-8?q?ek=20Stastny).=20-=20Fixed=20a=20possible=20out=20of=20buffer?= =?UTF-8?q?=20memory=20access=20in=20case=20of=20bad=20TS=20data=20(report?= =?UTF-8?q?ed=20=20=20by=20Rolf=20Ahrenberg).=20-=20Implemented=20handling?= =?UTF-8?q?=20of=20HD=20resolution=20subtitles=20according=20to=20v1.3.1?= =?UTF-8?q?=20of=20=20=20ETSI=20EN=20300=20743,=20chapter=207.2.1=20(thank?= =?UTF-8?q?s=20to=20Rolf=20Ahrenberg).=20-=20The=20EPG=20data=20now=20hand?= =?UTF-8?q?les=20stream=20components=205=20(H.264-video)=20and=206=20(HEAA?= =?UTF-8?q?C-audio).=20-=20Fixed=20a=20problem=20with=20external=20Dolby?= =?UTF-8?q?=20Digital=20processing=20via=20the=20'-a'=20option=20in=20live?= =?UTF-8?q?=20=20=20mode=20and=20with=20TS=20recordings=20(reported=20by?= =?UTF-8?q?=20Christopher=20Reimer).=20-=20Added=20handling=20MPEG=20audio?= =?UTF-8?q?=20types=20"ISO/IEC=2014496-3=20Audio=20with=20LATM=20transport?= =?UTF-8?q?=20syntax"=20=20=20and=20"ISO/IEC=2013818-7=20Audio=20with=20AD?= =?UTF-8?q?TS=20transport=20syntax"=20(suggested=20by=20Luis=20Fernandes).?= =?UTF-8?q?=20=20=20See=20man=20vdr(5)=20on=20how=20the=20APID=20section?= =?UTF-8?q?=20of=20channels=20has=20been=20extended=20to=20store=20=20=20t?= =?UTF-8?q?his=20information.=20-=20Added=20detecting=20channels=20that=20?= =?UTF-8?q?use=20service=20type=200x16.=20-=20Added=20full=20handling=20of?= =?UTF-8?q?=20the=20stream=20types=20of=20Dolby=20Digital=20pids=20=20=20(?= =?UTF-8?q?thanks=20to=20Jose=20Alberto=20Reguero).=20-=20The=20new=20setu?= =?UTF-8?q?p=20option=20"OSD/Number=20keys=20for=20characters"=20can=20be?= =?UTF-8?q?=20used=20to=20control=20whether=20=20=20the=20number=20keys=20?= =?UTF-8?q?can=20be=20used=20to=20enter=20characters=20in=20a=20text=20inp?= =?UTF-8?q?ut=20field=20(suggested=20=20=20by=20Stefan=20Huskamp).?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- menuitems.c | 93 +++++++++++++++++++++++++++++++++---------------------------- 1 file changed, 50 insertions(+), 43 deletions(-) (limited to 'menuitems.c') diff --git a/menuitems.c b/menuitems.c index 7faf2b7..c5eba6e 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 2.6 2010/02/16 14:44:35 kls Exp $ + * $Id: menuitems.c 2.7 2010/06/06 10:37:08 kls Exp $ */ #include "menuitems.h" @@ -488,6 +488,20 @@ uint cMenuEditStrItem::Inc(uint c, bool Up) return *p; } +void cMenuEditStrItem::Type(uint c) +{ + if (insert && lengthUtf8 < length - 1) + Insert(); + valueUtf8[pos] = c; + if (pos < length - 2) + pos++; + if (pos >= lengthUtf8) { + valueUtf8[pos] = ' '; + valueUtf8[pos + 1] = 0; + lengthUtf8 = pos + 1; + } +} + void cMenuEditStrItem::Insert(void) { memmove(valueUtf8 + pos + 1, valueUtf8 + pos, (lengthUtf8 - pos + 1) * sizeof(*valueUtf8)); @@ -597,39 +611,43 @@ eOSState cMenuEditStrItem::ProcessKey(eKeys Key) case k0|k_Repeat ... k9|k_Repeat: case k0 ... k9: { if (InEditMode()) { - if (!SameKey) { - if (!newchar) - AdvancePos(); - currentCharUtf8 = NULL; - } - if (!currentCharUtf8 || !*currentCharUtf8 || *currentCharUtf8 == '\t') { - // find the beginning of the character map entry for Key - int n = NORMALKEY(Key) - k0; - currentCharUtf8 = charMapUtf8; - while (n > 0 && *currentCharUtf8) { - if (*currentCharUtf8++ == '\t') - n--; + if (Setup.NumberKeysForChars) { + if (!SameKey) { + if (!newchar) + AdvancePos(); + currentCharUtf8 = NULL; + } + if (!currentCharUtf8 || !*currentCharUtf8 || *currentCharUtf8 == '\t') { + // find the beginning of the character map entry for Key + int n = NORMALKEY(Key) - k0; + currentCharUtf8 = charMapUtf8; + while (n > 0 && *currentCharUtf8) { + if (*currentCharUtf8++ == '\t') + n--; + } + // find first allowed character + while (*currentCharUtf8 && *currentCharUtf8 != '\t' && !IsAllowed(*currentCharUtf8)) + currentCharUtf8++; + } + if (*currentCharUtf8 && *currentCharUtf8 != '\t') { + if (insert && newchar) { + // create a new character in insert mode + if (lengthUtf8 < length - 1) + Insert(); } - // find first allowed character - while (*currentCharUtf8 && *currentCharUtf8 != '\t' && !IsAllowed(*currentCharUtf8)) + valueUtf8[pos] = *currentCharUtf8; + if (uppercase) + valueUtf8[pos] = Utf8to(upper, valueUtf8[pos]); + // find next allowed character + do { currentCharUtf8++; - } - if (*currentCharUtf8 && *currentCharUtf8 != '\t') { - if (insert && newchar) { - // create a new character in insert mode - if (lengthUtf8 < length - 1) - Insert(); + } while (*currentCharUtf8 && *currentCharUtf8 != '\t' && !IsAllowed(*currentCharUtf8)); + newchar = false; + autoAdvanceTimeout.Set(AUTO_ADVANCE_TIMEOUT); } - valueUtf8[pos] = *currentCharUtf8; - if (uppercase) - valueUtf8[pos] = Utf8to(upper, valueUtf8[pos]); - // find next allowed character - do { - currentCharUtf8++; - } while (*currentCharUtf8 && *currentCharUtf8 != '\t' && !IsAllowed(*currentCharUtf8)); - newchar = false; - autoAdvanceTimeout.Set(AUTO_ADVANCE_TIMEOUT); } + else + Type('0' + NORMALKEY(Key) - k0); } else return cMenuEditItem::ProcessKey(Key); @@ -645,19 +663,8 @@ eOSState cMenuEditStrItem::ProcessKey(eKeys Key) default: if (InEditMode() && BASICKEY(Key) == kKbd) { int c = KEYKBD(Key); if (c <= 0xFF) { // FIXME what about other UTF-8 characters? - uint *p = IsAllowed(Utf8to(lower, c)); - if (p) { - if (insert && lengthUtf8 < length - 1) - Insert(); - valueUtf8[pos] = c; - if (pos < length - 2) - pos++; - if (pos >= lengthUtf8) { - valueUtf8[pos] = ' '; - valueUtf8[pos + 1] = 0; - lengthUtf8 = pos + 1; - } - } + if (IsAllowed(Utf8to(lower, c))) + Type(c); else { switch (c) { case 0x7F: // backspace -- cgit v1.2.3