Checkbox states
Kim Ho
kho@redhat.com
Mon Dec 1 21:21:00 GMT 2003
On Mon, 2003-12-01 at 14:50, Tom Tromey wrote:
> >>>>> "Kim" == Kim Ho <kho@redhat.com> writes:
>
> Kim> This patch implements a getState function for Checkboxes.
>
> A short digression about the peers...
>
> The peers aren't documented, so we are free to change them as we
> like. And we've already done this in the past.
>
> However, it's best if we don't extend the interfaces too much. One
> problem with doing so is that we have to update all the peers, not
> just the Gtk ones. And as kaffe integrates more with classpath, this
> means the cost goes up.
>
>
> About this particular patch, I know that the Sun CheckboxPeer doesn't
> have a getState method. Is there another way we could implement this?
> If not, that's fine, let's go for it.
>
> Tom
Fixed.
-------------- next part --------------
? ChangeLog.local
? deps.mk
Index: jni/gtk-peer/gnu_java_awt_peer_gtk_GtkTextAreaPeer.c
===================================================================
RCS file: /cvsroot/gcc/gcc/libjava/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkTextAreaPeer.c,v
retrieving revision 1.8
diff -u -p -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 1 Dec 2003 21:14:17 -0000
@@ -64,7 +64,8 @@ Java_gnu_java_awt_peer_gtk_GtkTextAreaPe
|| 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 ();
@@ -172,7 +173,7 @@ Java_gnu_java_awt_peer_gtk_GtkTextAreaPe
text = GTK_WIDGET (TEXT_FROM_SW (ptr));
font_name = (*env)->GetStringUTFChars (env, name, NULL);
-
+
gdk_threads_enter();
font_desc = pango_font_description_from_string (font_name);
More information about the Java-patches
mailing list