[1.3.40] String edit insert mode broken

Message ID 43DD5DE8.1060609@gmx.de
State New
Headers

Commit Message

Udo Richter Jan. 30, 2006, 12:29 a.m. UTC
  Hi list,

In 1.3.40 and 1.3.41, the arrow key insert mode of edit fields is 
broken. It inserts a new char after each up/down press.

Steps:
- Go to some edit field (timer name etc) and start editing
- Press 'green' for insert mode
- Press 'up' several times
Result: aaaaa inserted

The attached patch fixes this for now, though its a bit ugly.
Simply setting newchar = false like in 1.3.39 now activates the 
auto-advance timer without setting it, so it advances soon. (I guess 
this is not expected, though I could get used to it.)

The patch sets the timer to some unrealistic high value to avoid 
advancing for a looong time.

Cheers,

Udo
  

Patch

--- vdr-1.3.40/menuitems.c	2006-01-21 13:27:14.000000000 +0100
+++ vdr-1.3.41/menuitems.c	2006-01-30 01:15:47.000000000 +0100
@@ -427,7 +427,8 @@ 
                        value[pos] = toupper(Inc(tolower(value[pos]), NORMALKEY(Key) == kUp));
                     else
                        value[pos] =         Inc(        value[pos],  NORMALKEY(Key) == kUp);
-                    newchar = true;
+                    newchar = false;
+                    autoAdvanceTimeout.Set(AUTO_ADVANCE_TIMEOUT*100);
                     }
                  else
                     return cMenuEditItem::ProcessKey(Key);