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] FYI: Replace deprecated method calls insetNativeBounds()


I'm committing the following patch to java-gui-branch.  It replaces
deprecated GTK method calls in Component peer's setNativeBounds()
function.  gtk_widget_set_usize() should be replaced with
gtk_widget_set_size_request(), which does the same thing but better. 
This will fix at least one problem where size requests of (0,0) were
being ignored.

-David Jee

2004-02-17  David Jee  <djee@redhat.com>

        * jni/gtk-peer/gnu_java_awt_peer_gtk_GtkComponentPeer.c
        (Java_gnu_java_awt_peer_gtk_GtkComponentPeer_setNativeBounds):
        Use gtk_widget_set_size_request() instead of the deprecated
        gtk_widget_set_usize().


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
diff -u -r1.15 gnu_java_awt_peer_gtk_GtkComponentPeer.c
--- jni/gtk-peer/gnu_java_awt_peer_gtk_GtkComponentPeer.c	27 Jan 2004 21:28:39 -0000	1.15
+++ jni/gtk-peer/gnu_java_awt_peer_gtk_GtkComponentPeer.c	17 Feb 2004 19:44:01 -0000
@@ -260,11 +260,11 @@
   widget = GTK_WIDGET (ptr);
   if (GTK_IS_VIEWPORT (widget->parent))
     {
-      gtk_widget_set_usize (widget, width, height);
+      gtk_widget_set_size_request (widget, width, height);
     }
   else
     {
-      gtk_widget_set_usize (widget, width, height);
+      gtk_widget_set_size_request (widget, width, height);
       gtk_layout_move (GTK_LAYOUT (widget->parent), widget, x, y);
     }
 

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