summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2005-09-17 09:42:45 +0200
committerKlaus Schmidinger <vdr@tvdr.de>2005-09-17 09:42:45 +0200
commit547310a9490174f630f219152214b2e33da2679b (patch)
tree0318cb9a2fd055c834c443f83b4f74ed9b833012
parent5147d8abbc146ac2c5cc0bfeb7577542221d605a (diff)
downloadvdr-547310a9490174f630f219152214b2e33da2679b.tar.gz
vdr-547310a9490174f630f219152214b2e33da2679b.tar.bz2
Fixed handling color buttons in cMenuEditStrItem
-rw-r--r--CONTRIBUTORS1
-rw-r--r--HISTORY1
-rw-r--r--menuitems.c23
3 files changed, 21 insertions, 4 deletions
diff --git a/CONTRIBUTORS b/CONTRIBUTORS
index e066556e..4a5d1e35 100644
--- a/CONTRIBUTORS
+++ b/CONTRIBUTORS
@@ -1483,3 +1483,4 @@ Patrick Rother <krd-vdr@gulu.net>
Alexander Rieger <Alexander.Rieger@inka.de>
for fixing two errors in 'newplugin'
+ for fixing handling color buttons in cMenuEditStrItem
diff --git a/HISTORY b/HISTORY
index ba8deb8c..f5565775 100644
--- a/HISTORY
+++ b/HISTORY
@@ -3811,3 +3811,4 @@ Video Disk Recorder Revision History
- Fixed two errors in 'newplugin' (thanks to Alexander Rieger).
- Fixed converting arbitrarily formatted summary.vdr files (thanks to Thomas Günther).
+- Fixed handling color buttons in cMenuEditStrItem (thanks to Alexander Rieger).
diff --git a/menuitems.c b/menuitems.c
index 18b001ee..1f2cc14a 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.22 2005/03/19 15:33:34 kls Exp $
+ * $Id: menuitems.c 1.23 2005/09/17 09:36:31 kls Exp $
*/
#include "menuitems.h"
@@ -322,10 +322,14 @@ eOSState cMenuEditStrItem::ProcessKey(eKeys Key)
{
switch (Key) {
case kRed: // Switch between upper- and lowercase characters
- if (pos >= 0 && (!insert || !newchar)) {
- uppercase = !uppercase;
- value[pos] = uppercase ? toupper(value[pos]) : tolower(value[pos]);
+ if (pos >= 0) {
+ if (!insert || !newchar) {
+ uppercase = !uppercase;
+ value[pos] = uppercase ? toupper(value[pos]) : tolower(value[pos]);
+ }
}
+ else
+ return osUnknown;
break;
case kGreen: // Toggle insert/overwrite modes
if (pos >= 0) {
@@ -333,6 +337,8 @@ eOSState cMenuEditStrItem::ProcessKey(eKeys Key)
newchar = true;
SetHelpKeys();
}
+ else
+ return osUnknown;
break;
case kYellow|k_Repeat:
case kYellow: // Remove the character at current position; in insert mode it is the character to the right of cursor
@@ -350,6 +356,15 @@ eOSState cMenuEditStrItem::ProcessKey(eKeys Key)
uppercase = isupper(value[pos]);
newchar = true;
}
+ else
+ return osUnknown;
+ break;
+ case kBlue|k_Repeat:
+ case kBlue: // consume the key only if in edit-mode
+ if (pos >= 0)
+ ;
+ else
+ return osUnknown;
break;
case kLeft|k_Repeat:
case kLeft: if (pos > 0) {