This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
[gui][PATCH] Remove keyval translation warning
- From: Thomas Fitzsimmons <fitzsim at redhat dot com>
- To: java-patches at gcc dot gnu dot org
- Date: Mon, 14 Jun 2004 23:49:15 -0400
- Subject: [gui][PATCH] Remove keyval translation warning
Hi,
I committed this patch to java-gui-branch. Having multiple keycodes
translate to the same keyval is not a serious enough situation to
warrant a warning message on stderr.
Tom
2004-06-14 Thomas Fitzsimmons <fitzsim@redhat.com>
* jni/gtk-peer/gnu_java_awt_peer_gtk_GtkComponentPeer.c
(gtkWidgetDispatchKeyEvent): Change warning message to comment.
Index: jni/gtk-peer/gnu_java_awt_peer_gtk_GtkComponentPeer.c
===================================================================
RCS file: /cvs/gcc/gcc/libjava/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkComponentPeer.c,v
retrieving revision 1.15.2.13
diff -u -r1.15.2.13 gnu_java_awt_peer_gtk_GtkComponentPeer.c
--- jni/gtk-peer/gnu_java_awt_peer_gtk_GtkComponentPeer.c 9 Jun 2004 21:02:36 -0000 1.15.2.13
+++ jni/gtk-peer/gnu_java_awt_peer_gtk_GtkComponentPeer.c 15 Jun 2004 03:42:34 -0000
@@ -583,8 +583,10 @@
return;
}
- if (n_keys > 1)
- g_printerr ("warning: using hardware keycode from first keymap entry, though multiple entries were found\n");
+ /* Note: if n_keys > 1 then there are multiple hardware keycodes
+ that translate to lookup_keyval. We arbitrarily choose the first
+ hardware keycode from the list returned by
+ gdk_keymap_get_entries_for_keyval. */
event->key.hardware_keycode = keymap_keys[0].keycode;
event->key.group = keymap_keys[0].group;