From 53ef271f84dcf405c5e58ea7b1ef2211f073d3c1 Mon Sep 17 00:00:00 2001 From: Michael Koch Date: Thu, 3 Jun 2004 10:23:12 +0000 Subject: [PATCH] 2004-06-03 Michael Koch * gnu/java/awt/peer/gtk/GtkComponentPeer.java (requestFocus): Revert last changes. (gtkRequestFocus): Removed. * jni/gtk-peer/gnu_java_awt_peer_gtk_GtkComponentPeer.c (Java_gnu_java_awt_peer_gtk_GtkComponentPeer_gtkRequestFocus): Renamed to ... (Java_gnu_java_awt_peer_gtk_GtkComponentPeer_gtkWidgetRequestFocus): Reverted last patch. * jni/gtk-peer/gnu_java_awt_peer_gtk_GtkPopupMenuPeer.c (Java_gnu_java_awt_peer_gtk_GtkPopupMenuPeer_setupAccelGroup): Reverted comment change. From-SVN: r82596 --- libjava/ChangeLog | 14 ++++++++++++++ .../gnu/java/awt/peer/gtk/GtkComponentPeer.java | 8 ++------ .../gnu_java_awt_peer_gtk_GtkComponentPeer.c | 2 +- .../gnu_java_awt_peer_gtk_GtkPopupMenuPeer.c | 3 +-- 4 files changed, 18 insertions(+), 9 deletions(-) diff --git a/libjava/ChangeLog b/libjava/ChangeLog index fb02347eb0b..eeab79e01b2 100644 --- a/libjava/ChangeLog +++ b/libjava/ChangeLog @@ -1,3 +1,17 @@ +2004-06-03 Michael Koch + + * gnu/java/awt/peer/gtk/GtkComponentPeer.java + (requestFocus): Revert last changes. + (gtkRequestFocus): Removed. + * jni/gtk-peer/gnu_java_awt_peer_gtk_GtkComponentPeer.c + (Java_gnu_java_awt_peer_gtk_GtkComponentPeer_gtkRequestFocus): + Renamed to ... + (Java_gnu_java_awt_peer_gtk_GtkComponentPeer_gtkWidgetRequestFocus): + Reverted last patch. + * jni/gtk-peer/gnu_java_awt_peer_gtk_GtkPopupMenuPeer.c + (Java_gnu_java_awt_peer_gtk_GtkPopupMenuPeer_setupAccelGroup): + Reverted comment change. + 2004-06-02 Olga Rodimina * javax/swing/JCheckBoxMenuItem.java: diff --git a/libjava/gnu/java/awt/peer/gtk/GtkComponentPeer.java b/libjava/gnu/java/awt/peer/gtk/GtkComponentPeer.java index 15d3d5c4b02..7d80e3626c9 100644 --- a/libjava/gnu/java/awt/peer/gtk/GtkComponentPeer.java +++ b/libjava/gnu/java/awt/peer/gtk/GtkComponentPeer.java @@ -353,14 +353,10 @@ public class GtkComponentPeer extends GtkGenericPeer public void requestFocus () { - gtkRequestFocus(); + gtkWidgetRequestFocus(); + postFocusEvent(FocusEvent.FOCUS_GAINED, false); } - // Called from requestFocus, we don't want to make requestFocus itself - // native since several JNI header generators have difficulties with - // overridden and/or miranda methods. (Bug in gcjh < 3.5.) - native private void gtkRequestFocus (); - public void reshape (int x, int y, int width, int height) { setBounds (x, y, width, height); diff --git a/libjava/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkComponentPeer.c b/libjava/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkComponentPeer.c index 565484c824f..09711726cd6 100644 --- a/libjava/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkComponentPeer.c +++ b/libjava/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkComponentPeer.c @@ -472,7 +472,7 @@ Java_gnu_java_awt_peer_gtk_GtkComponentPeer_gtkWidgetSetCursor } JNIEXPORT void JNICALL -Java_gnu_java_awt_peer_gtk_GtkComponentPeer_gtkRequestFocus +Java_gnu_java_awt_peer_gtk_GtkComponentPeer_gtkWidgetRequestFocus (JNIEnv *env, jobject obj) { void *ptr; diff --git a/libjava/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkPopupMenuPeer.c b/libjava/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkPopupMenuPeer.c index 41718017c0a..c5fffdc343f 100644 --- a/libjava/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkPopupMenuPeer.c +++ b/libjava/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkPopupMenuPeer.c @@ -91,8 +91,7 @@ Java_gnu_java_awt_peer_gtk_GtkPopupMenuPeer_setupAccelGroup gdk_threads_enter (); menu = GTK_MENU (GTK_MENU_ITEM (ptr1)->submenu); gtk_menu_set_accel_group (menu, gtk_accel_group_new ()); - /* FIXME: _gtk_accel_group_attach is a GTK-private function, so - we'll need a different approach here: */ + /* FIXME: update this to use GTK-2.4 GtkActions. */ #if 0 _gtk_accel_group_attach (gtk_menu_get_accel_group (menu), G_OBJECT (gtk_widget_get_toplevel (ptr2))); -- 2.30.2