entry widget bug?



I'm not sure if gtk entry was supposed to be this way
or not, but I had been trying to implement a history
feature that replaces text in the widget when GDK_Up
or GDK_Down is pressed, etc...

Finally ended up taking a look at the entry code and
saw that it never did anything (that I can tell) with
those values. Does anyone know whether this is a bug
or not?

Thanks,
  Patrick

here's a little diff file of the changes i made to get
it working properly (imo) if anyone cares (i'm not
really sure how to use the diff to gen patches but
this should be enough information)

--- gtkentry.c~ Wed Feb 24 05:15:08 1999
+++ gtkentry.c  Fri Apr  9 06:55:26 1999
@@ -1122,6 +1122,10 @@
     case GDK_Escape:
       break;
     default:
+      if(event->keyval == GDK_Up || event->keyval ==
GDK_Down) {
+        return_val = TRUE;
+        break;
+      }
       if ((event->keyval >= 0x20) && (event->keyval
<= 0xFF))
        {
          key = event->keyval;

_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]