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]

Patch: GtkComponentPeer cleanup


Hello,

This patch removes the native method implementation
Java_gnu_java_awt_peer_gtk_GtkComponentPeer_create which has no
corresponding declaration in GtkComponentPeer.  This method
implementation was causing problems because it used deprecated GTK
functions.

The patch also removes some debug messages.

Please review.

Thanks,
Tom

2003-07-14  Thomas Fitzsimmons  <fitzsim@redhat.com>

	* jni/gtk-peer/gnu_java_awt_peer_gtk_GtkComponentPeer.c
	(create): Remove unused method implementation.
	(connectHooks): Remove debug messages.

Index: jni/gtk-peer/gnu_java_awt_peer_gtk_GtkComponentPeer.c
===================================================================
RCS file: /cvs/gcc/gcc/libjava/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkComponentPeer.c,v
retrieving revision 1.2
diff -u -b -B -r1.2 gnu_java_awt_peer_gtk_GtkComponentPeer.c
--- jni/gtk-peer/gnu_java_awt_peer_gtk_GtkComponentPeer.c	30 Jun 2003 23:53:29 -0000	1.2
+++ jni/gtk-peer/gnu_java_awt_peer_gtk_GtkComponentPeer.c	14 Jul 2003 22:19:18 -0000
@@ -609,25 +609,6 @@
   (*env)->ReleaseStringUTFChars (env, jname, name);
 }
 
-JNIEXPORT void JNICALL Java_gnu_java_awt_peer_gtk_GtkComponentPeer_create
-  (JNIEnv *env, jobject obj, jstring jtypename)
-{
-  const char *typename;
-  gpointer widget;
-
-  typename = (*env)->GetStringUTFChars (env, jtypename, NULL);
-
-  gdk_threads_enter ();
-  gtk_button_get_type ();
-  widget = gtk_object_newv (gtk_type_from_name (typename),
-			    0, NULL);
-/*    widget = gtk_type_new (gtk_type_from_name (typename)); */
-  gdk_threads_leave ();
-
-  (*env)->ReleaseStringUTFChars (env, jtypename, typename);
-  NSA_SET_PTR (env, obj, widget);
-}
-
 JNIEXPORT void JNICALL Java_gnu_java_awt_peer_gtk_GtkComponentPeer_connectHooks
   (JNIEnv *env, jobject obj)
 {
@@ -638,14 +619,8 @@
   gdk_threads_enter ();
   gtk_widget_realize (GTK_WIDGET (ptr));
   if(GTK_IS_BUTTON(ptr))
-    {
-      g_print("-- connecting a button --\n");
       connect_awt_hook (env, obj, 1, GTK_BUTTON(ptr)->event_window);
-    }
   else
-    {
   connect_awt_hook (env, obj, 1, GTK_WIDGET (ptr)->window);
-      g_print("Connection object %p with window %p (but ptr is %p)\n", obj, GTK_WIDGET(ptr)->window, ptr);
-    }
   gdk_threads_leave ();
 }

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