[kaffe] CVS kaffe (robilad): Resynced with GNU Classpath: awt fixes
Kaffe CVS
cvs-commits at kaffe.org
Mon Feb 14 11:05:49 PST 2005
PatchSet 5537
Date: 2005/02/14 19:00:23
Author: robilad
Branch: HEAD
Tag: (none)
Log:
Resynced with GNU Classpath: awt fixes
2005-02-14 Dalibor Topic <robilad at kaffe.org>
Resynced with GNU Classpath.
2005-02-11 Craig Black <craig.black at aonix.com>
* gnu/java/awt/peer/gtk/GtkCheckboxMenuItem.java
(postMenuActionEvent): Implement to notify ItemListeners.
* java/awt/CheckboxMenuItem.java
(dispatchEventImpl): Update state on ItemEvent.
* java/awt/MenuItem.java
(processActionEvent): Retarget event source.
Members:
ChangeLog:1.3581->1.3582
libraries/javalib/gnu/java/awt/peer/gtk/GtkCheckboxMenuItemPeer.java:1.1->1.2
libraries/javalib/java/awt/CheckboxMenuItem.java:1.15->1.16
libraries/javalib/java/awt/MenuItem.java:1.18->1.19
Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.3581 kaffe/ChangeLog:1.3582
--- kaffe/ChangeLog:1.3581 Mon Feb 14 18:39:57 2005
+++ kaffe/ChangeLog Mon Feb 14 19:00:23 2005
@@ -2,6 +2,19 @@
Resynced with GNU Classpath.
+ 2005-02-11 Craig Black <craig.black at aonix.com>
+
+ * gnu/java/awt/peer/gtk/GtkCheckboxMenuItem.java
+ (postMenuActionEvent): Implement to notify ItemListeners.
+ * java/awt/CheckboxMenuItem.java
+ (dispatchEventImpl): Update state on ItemEvent.
+ * java/awt/MenuItem.java
+ (processActionEvent): Retarget event source.
+
+2005-02-14 Dalibor Topic <robilad at kaffe.org>
+
+ Resynced with GNU Classpath.
+
2005-02-11 Thomas Fitzsimmons <fitzsim at redhat.com>
* jni/gtk-peer/gnu_java_awt_peer_gtk_GtkFileDialogPeer.c (create):
Index: kaffe/libraries/javalib/gnu/java/awt/peer/gtk/GtkCheckboxMenuItemPeer.java
diff -u kaffe/libraries/javalib/gnu/java/awt/peer/gtk/GtkCheckboxMenuItemPeer.java:1.1 kaffe/libraries/javalib/gnu/java/awt/peer/gtk/GtkCheckboxMenuItemPeer.java:1.2
--- kaffe/libraries/javalib/gnu/java/awt/peer/gtk/GtkCheckboxMenuItemPeer.java:1.1 Thu Jul 22 19:20:16 2004
+++ kaffe/libraries/javalib/gnu/java/awt/peer/gtk/GtkCheckboxMenuItemPeer.java Mon Feb 14 19:00:25 2005
@@ -38,6 +38,8 @@
package gnu.java.awt.peer.gtk;
+import java.awt.ItemSelectable;
+import java.awt.event.ItemEvent;
import java.awt.CheckboxMenuItem;
import java.awt.peer.CheckboxMenuItemPeer;
import java.awt.peer.MenuItemPeer;
@@ -54,4 +56,15 @@
}
native public void setState (boolean t);
+
+ protected void postMenuActionEvent ()
+ {
+ CheckboxMenuItem item = (CheckboxMenuItem)awtWidget;
+ q().postEvent (new ItemEvent ((ItemSelectable)awtWidget,
+ ItemEvent.ITEM_STATE_CHANGED,
+ item.getActionCommand(),
+ item.getState() ? ItemEvent.DESELECTED : ItemEvent.SELECTED));
+
+ super.postMenuActionEvent();
+ }
}
Index: kaffe/libraries/javalib/java/awt/CheckboxMenuItem.java
diff -u kaffe/libraries/javalib/java/awt/CheckboxMenuItem.java:1.15 kaffe/libraries/javalib/java/awt/CheckboxMenuItem.java:1.16
--- kaffe/libraries/javalib/java/awt/CheckboxMenuItem.java:1.15 Thu Jan 6 00:22:46 2005
+++ kaffe/libraries/javalib/java/awt/CheckboxMenuItem.java Mon Feb 14 19:00:26 2005
@@ -274,6 +274,14 @@
void
dispatchEventImpl(AWTEvent e)
{
+ if (e instanceof ItemEvent)
+ {
+ synchronized (this)
+ {
+ state = (((ItemEvent) e).getStateChange() == ItemEvent.SELECTED);
+ }
+ }
+
if (e.id <= ItemEvent.ITEM_LAST
&& e.id >= ItemEvent.ITEM_FIRST
&& (item_listeners != null
Index: kaffe/libraries/javalib/java/awt/MenuItem.java
diff -u kaffe/libraries/javalib/java/awt/MenuItem.java:1.18 kaffe/libraries/javalib/java/awt/MenuItem.java:1.19
--- kaffe/libraries/javalib/java/awt/MenuItem.java:1.18 Thu Jan 6 00:22:46 2005
+++ kaffe/libraries/javalib/java/awt/MenuItem.java Mon Feb 14 19:00:26 2005
@@ -563,7 +563,10 @@
processActionEvent(ActionEvent event)
{
if (action_listeners != null)
- action_listeners.actionPerformed(event);
+ {
+ event.setSource(this);
+ action_listeners.actionPerformed(event);
+ }
}
/*************************************************************************/
More information about the kaffe
mailing list