Patch: gtk peer - static methods

Mark Wielaard mark@klomp.org
Wed Jun 2 18:21:00 GMT 2004


Hi,

On Tue, 2004-06-01 at 01:05, Michael Koch wrote:
> 2004-06-01  Mark Wielaard  <mark@klomp.org>
> 
> 	* gnu/java/awt/peer/gtk/GtkComponentPeer.java (requestFocus):
> 	Implement by calling gtkRequestFocus.
> 	(gtkRequestFocus): New native method.
> 	* native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkComponentPeer.c
> 	(Java_gnu_java_awt_peer_gtk_GtkComponentPeer_requestFocus__):
> 	Renamed to ...
> 	(Java_gnu_java_awt_peer_gtk_GtkComponentPeer_gtkRequestFocus):
> 	New function name.
> 	(filter_expose_event_handler):
> 	Mark static.
> 	* native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkPopupMenuPeer.c
> 	(menu_pos): Mark static.

This was part of the following big patch:
http://lists.gnu.org/archive/html/commit-classpath/2004-05/msg00130.html

But there are two small in this patch that aren't mine:

--- gnu/java/awt/peer/gtk/GtkComponentPeer.java 27 May 2004 06:17:34
-0000      1.18
+++ gnu/java/awt/peer/gtk/GtkComponentPeer.java 31 May 2004 23:02:36
-0000
@@ -353,10 +353,14 @@
 
   public void requestFocus ()
   {
-    gtkWidgetRequestFocus ();
-    postFocusEvent (FocusEvent.FOCUS_GAINED, false);
+    gtkRequestFocus();
   }

Seems like when I made the native gtkRequestFocus() method, libgcj made
a gtkWidgetRequestFocus() method. In that case this part of my patch
(and the renaming of the native gtkWidgetRequestFocus() method) isn't
necessary. And it looks like the postFocusEvent is useful, so needs to
be kept?

-  /* FIXME: update this to use GTK-2.4 GtkActions. */
+  /* FIXME: _gtk_accel_group_attach is a GTK-private function, so
+     we'll need a different approach here: */

This comment update isn't mine since I don't even know what it means, or
which is more helpful/correct.

Cheers,

Mark

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://gcc.gnu.org/pipermail/java-patches/attachments/20040602/b418bf07/attachment.sig>


More information about the Java-patches mailing list