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]

[gui][PATCH] Handle GtkOptionMenu specially when setting theforeground colour


Hi,

I committed this patch to java-gui-branch.  It fixes handling of
GtkOptionMenus when deciding which widget's foreground colour should be
set.  Previously we were seeing GTK assertion failure messages when
trying to set a Choice's foreground colour.

Tom

2004-05-26  Thomas Fitzsimmons  <fitzsim@redhat.com>

	* jni/gtk-peer/gnu_java_awt_peer_gtk_GtkComponentPeer.c
	(find_fg_color_widget): Handle GtkOptionMenu specially.


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.15.2.9
diff -u -r1.15.2.9 gnu_java_awt_peer_gtk_GtkComponentPeer.c
--- jni/gtk-peer/gnu_java_awt_peer_gtk_GtkComponentPeer.c	18 May 2004 20:25:27 -0000	1.15.2.9
+++ jni/gtk-peer/gnu_java_awt_peer_gtk_GtkComponentPeer.c	27 May 2004 02:22:54 -0000
@@ -1256,7 +1256,9 @@
 {
   GtkWidget *fg_color_widget;
 
-  if (GTK_IS_EVENT_BOX (widget) || GTK_IS_BUTTON (widget))
+  if (GTK_IS_EVENT_BOX (widget)
+      || (GTK_IS_BUTTON (widget)
+          && !GTK_IS_OPTION_MENU (widget)))
     fg_color_widget = gtk_bin_get_child (GTK_BIN(widget));
   else
     fg_color_widget = widget;



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