[gui] [PATCH] Fixes for PopupMenu

David Jee djee@redhat.com
Fri Apr 2 15:58:00 GMT 2004


Hello,

I committed the following patch to the java-gui-branch.  It fixes the
PopupMenu.  PopupMenu now shows up and receives mouse and action events.

-David Jee

2004-04-02  David Jee  <djee@redhat.com>

        * gnu/java/awt/peer/gtk/GtkMenuItemPeer.java
        (GtkMenuItemPeer): Only connect signals if this isn't a Menu peer.
        * java/awt/Component.java
        (add): Set the parent of the popup as this component.
        * java/awt/PopupMenu.java
        (addNotify): Create popup menu when peer is null.
        (show): Call addNotify() if peer is null.
        * jni/gtk-peer/gnu_java_awt_peer_gtk_GtkPopupMenuPeer.c
        (Java_gnu_java_awt_peer_gtk_GtkPopupMenuPeer_show): Set the button
        argument for gtk_menu_popup() as zero. This causes the popup menu to
        respond to any mouse button.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: PopupMenu.patch
Type: text/x-patch
Size: 2628 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/java-patches/attachments/20040402/fb03f319/attachment.bin>


More information about the Java-patches mailing list