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: TextArea wrapping fix


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

Kim> This patch disables wrapping on a TextArea if it has horizontal
Kim> scroll bars.

Kim> 2003-11-28  Kim Ho <kho@redhat.com>
Kim>         * jni/gtk-peer/gnu_java_awt_peer_gtk_GtkTextAreaPeer.c (create):
Kim>         Disable wrapping if TextArea has horizontal scroll bars.

The code looks fine.

Generally we prefer unidiffs, they are easier to read in many cases.

Kim> !   gtk_text_view_set_wrap_mode (GTK_TEXT_VIEW(text), (scroll == AWT_TEXTAREA_SCROLLBARS_BOTH
Kim> ! 		  || scroll == AWT_TEXTAREA_SCROLLBARS_HORIZONTAL_ONLY ) ? GTK_WRAP_NONE:GTK_WRAP_WORD);

This should be changed to conform to GNU coding standards, if possible
(I'm not sure it can fit in 79 columns, but it's ok if it doesn't).
The nits:

* The "||" should line up with the "G" in "GTK_TEXT_VIEW".
* Space between GTK_TEXT_VIEW and "("
* Spaces around ":"
* No space before ")"

Tom


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