This is the mail archive of the 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: Fix for GtkLabelPeer's implementation


This patch eliminates Glib runtime warnings that were being produced by
GtkLabelPeer's implementation.  The warnings were being emitted because
an attempt was being made to set GtkLabel properties on the GtkEvent box
that contained the label.  This patch solves the problem by removing the
event box.  The event box is not needed to properly implement

Please review and comment.


2003-07-24  Thomas Fitzsimmons  <>

	* jni/gtk-peer/gnu_java_awt_peer_gtk_GtkLabelPeer.c (create):
	Don't pack label in an event box.

Index: jni/gtk-peer/gnu_java_awt_peer_gtk_GtkLabelPeer.c
RCS file: /cvs/gcc/gcc/libjava/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkLabelPeer.c,v
retrieving revision 1.1
diff -u -b -B -r1.1 gnu_java_awt_peer_gtk_GtkLabelPeer.c
--- jni/gtk-peer/gnu_java_awt_peer_gtk_GtkLabelPeer.c	31 Jan 2003 17:54:14 -0000	1.1
+++ jni/gtk-peer/gnu_java_awt_peer_gtk_GtkLabelPeer.c	24 Jul 2003 17:59:04 -0000
@@ -44,14 +44,12 @@
   (JNIEnv *env, jobject obj)
   GtkWidget *label;
-  GtkContainer *ebox;
   gdk_threads_enter ();
-  ebox = GTK_CONTAINER (gtk_type_new (gtk_event_box_get_type ()));
-  label = GTK_WIDGET (gtk_type_new (gtk_label_get_type ()));
-  gtk_container_add (ebox, label);
-  gtk_widget_show (label);
+  label = gtk_label_new (NULL);
   gdk_threads_leave ();
-  NSA_SET_PTR (env, obj, ebox);
+  NSA_SET_PTR (env, obj, label);

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