[PATCH] Fix for Choice

Fernando Nasser fnasser@redhat.com
Mon Dec 22 22:21:00 GMT 2003


The appearance is still not quite right.  Tom Fitzsimmons and I even believe it 
should not be implemented using the Gtk widgets it is currently using but at 
least this patch makes it _behave_ like the one in the Sun SDK.


2003-12-22  Fernando Nasser  <fnasser@redhat.com>

         * gnu/java/awt/peer/gtk/GtkChoicePeer.java (postItemEvent): Rename to...
         (choicePostItemEvent): Change signature to more specific String object.
         * java/awt/Choice.java (insert): Generate ItemEvent if insertion caused
         selection to change.
         (remove): Generate ItemEvent if removal cause selection to change.
         (removeAll): Change algorithm to prevent generation of  multiple events.
          * jni/gtk-peer/gnu_java_awt_peer_gtk_GtkChoicePeer.c
         (connect_choice_item_selectable_hook): Change argument type.
         Fix argument value.
         Make sure resources are feed by registering callback.
         (Java_gnu_java_awt_peer_gtk_GtkChoicePeer_append): Adjust call to the
         above function.
         (Java_gnu_java_awt_peer_gtk_GtkChoicePeer_add): Ditto.
         (item_activate): Ditto.
         (Java_gnu_java_awt_peer_gtk_GtkChoicePeer_remove): Destroy removed
         menuitem.
         (item_removed): New function.  Free resources.
         * jni/gtk-peer/gtkpeer.h (item_event_hook_info): Change member type and
         name.
         * jni/gtk-peer/gnu_java_awt_peer_gtk_GtkMainThread.c
         (Java_gnu_java_awt_peer_gtk_GtkMainThread_gtkInit): Obtain MethodID for
         choicePostItemEvent.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: CHOICE.PATCH
URL: <http://gcc.gnu.org/pipermail/java-patches/attachments/20031222/55fd6362/attachment.ksh>


More information about the Java-patches mailing list