This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Patch: gtk peer - static methods


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

Attachment: signature.asc
Description: This is a digitally signed message part


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]