summaryrefslogtreecommitdiff
path: root/libjava/jni
diff options
context:
space:
mode:
authortromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4>2003-12-09 03:47:32 +0000
committertromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4>2003-12-09 03:47:32 +0000
commit50ac87ad0b091f9a71e88f3b29e94e9b79c2e673 (patch)
tree0b6ff0be1eea2dcd15ec02ed2ae18a8760b5138f /libjava/jni
parent9718e467d782cb53a33ee249a02d1a89f11ef3fa (diff)
downloadgcc-50ac87ad0b091f9a71e88f3b29e94e9b79c2e673.tar.gz
2003-12-08 Kim Ho <kho@redhat.com>
Fix for Checkbox states. * gnu/java/awt/peer/gtk/GtkCheckboxPeer.java: (currentState): New field. (nativeCreate): Add initial state parameter. (create): Changed to reflect new parameter. (setState): Fire only on changed states. (postItemEvent): Fire only on changed states. Also change the Java Checkbox to reflect new state. * jni/gtk-peer/gnu_java_awt_peer_gtk_GtkCheckboxPeer.c: (nativeCreate): Add parameter and set active state. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@74459 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava/jni')
-rw-r--r--libjava/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkCheckboxPeer.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libjava/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkCheckboxPeer.c b/libjava/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkCheckboxPeer.c
index 09fa7ef21b5..d0d95f9fab7 100644
--- a/libjava/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkCheckboxPeer.c
+++ b/libjava/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkCheckboxPeer.c
@@ -1,5 +1,5 @@
/* gtkcheckboxpeer.c -- Native implementation of GtkCheckboxPeer
- Copyright (C) 1998, 1999, 2002 Free Software Foundation, Inc.
+ Copyright (C) 1998, 1999, 2002, 2003 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -78,7 +78,7 @@ JNIEXPORT void JNICALL Java_gnu_java_awt_peer_gtk_GtkCheckboxGroupPeer_remove
JNIEXPORT void JNICALL
Java_gnu_java_awt_peer_gtk_GtkCheckboxPeer_nativeCreate
- (JNIEnv *env, jobject obj, jobject group)
+ (JNIEnv *env, jobject obj, jobject group, jboolean state)
{
GtkWidget *button;
@@ -97,7 +97,7 @@ Java_gnu_java_awt_peer_gtk_GtkCheckboxPeer_nativeCreate
NSA_SET_PTR (env, group, button);
}
}
-
+ gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button), state);
gdk_threads_leave ();
NSA_SET_PTR (env, obj, button);