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]

Re: Checkbox states


>>>>> "Kim" == Kim Ho <kho@redhat.com> writes:

Kim> +  gtk_text_view_set_wrap_mode ( GTK_TEXT_VIEW(text), (scroll == AWT_TEXTAREA_SCROLLBARS_BOTH

Actually, I mean the "(" on the other side, like:

    GTK_TEXT_VIEW (text)

I've appended the patch I'm checking in.

BTW, remember to update copyright notices in files you touch.  This is
sort of a pain, I use an emacs hook to do it.  But unfortunately the
emacs code has bugs and doesn't understand multi-line copyright
statements, so you still have to check the results :-(


The Classpath hacker's guide is a useful document:

    http://www.gnu.org/software/classpath/docs/hacking.html

It has a link to the GNU coding standards, which are particularly
relevant for C code, less so for C++ and Java (though our C++ and
Java standards are based on this):

    http://www.fsf.org/prep/standards_toc.html

Tom

Index: ChangeLog
from  Kim Ho <kho@redhat.com>

	* jni/gtk-peer/gnu_java_awt_peer_gtk_GtkTextAreaPeer.c (create):
	Disable wrapping if TextArea has horizontal scroll bars.

Index: jni/gtk-peer/gnu_java_awt_peer_gtk_GtkTextAreaPeer.c
===================================================================
RCS file: /cvs/gcc/gcc/libjava/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkTextAreaPeer.c,v
retrieving revision 1.8
diff -u -r1.8 gnu_java_awt_peer_gtk_GtkTextAreaPeer.c
--- jni/gtk-peer/gnu_java_awt_peer_gtk_GtkTextAreaPeer.c 30 Oct 2003 17:37:33 -0000 1.8
+++ jni/gtk-peer/gnu_java_awt_peer_gtk_GtkTextAreaPeer.c 2 Dec 2003 00:54:27 -0000
@@ -1,5 +1,5 @@
 /* gtktextareapeer.c -- Native implementation of GtkTextAreaPeer
-   Copyright (C) 1998, 1999 Free Software Foundation, Inc.
+   Copyright (C) 1998, 1999, 2003 Free Software Foundation, Inc.
 
 This file is part of GNU Classpath.
 
@@ -64,7 +64,10 @@
       || scroll == AWT_TEXTAREA_SCROLLBARS_VERTICAL_ONLY) ? 
        GTK_POLICY_ALWAYS : GTK_POLICY_NEVER);
 
-  gtk_text_view_set_wrap_mode (GTK_TEXT_VIEW(text), GTK_WRAP_WORD);
+  gtk_text_view_set_wrap_mode (GTK_TEXT_VIEW (text),
+			       (scroll == AWT_TEXTAREA_SCROLLBARS_BOTH
+				|| scroll == AWT_TEXTAREA_SCROLLBARS_HORIZONTAL_ONLY)
+			       ? GTK_WRAP_NONE : GTK_WRAP_WORD);
 
   gdk_threads_leave ();
 


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