2004-06-03 Michael Koch <konqueror@gmx.de>
authorMichael Koch <konqueror@gmx.de>
Thu, 3 Jun 2004 10:23:12 +0000 (10:23 +0000)
committerMichael Koch <mkoch@gcc.gnu.org>
Thu, 3 Jun 2004 10:23:12 +0000 (10:23 +0000)
* 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
libjava/gnu/java/awt/peer/gtk/GtkComponentPeer.java
libjava/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkComponentPeer.c
libjava/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkPopupMenuPeer.c

index fb02347eb0b4043aef2f4e2c861246dda14f1a7f..eeab79e01b26a56d45aacc77a0089dd6d857a87b 100644 (file)
@@ -1,3 +1,17 @@
+2004-06-03  Michael Koch  <konqueror@gmx.de>
+
+       * 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  <rodimina@redhat.com>
 
        * javax/swing/JCheckBoxMenuItem.java:
index 15d3d5c4b02fc77226147b7bb8981d1164baa142..7d80e3626c98ec44e3252165eae1b93f0584f5cd 100644 (file)
@@ -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);
index 565484c824febfdfe73b3a121b0dbc5d679e22a5..09711726cd68e820e0d6e87672dd56e4c43b71b3 100644 (file)
@@ -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;
index 41718017c0ab67371ce87075393cc2525dec8e2a..c5fffdc343fdb226648db9d1f70accbbd107847c 100644 (file)
@@ -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)));