/[classpath]/classpath/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkLabelPeer.c
ViewVC logotype

Diff of /classpath/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkLabelPeer.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.11.2.1 by gnu_andrew, Fri Jan 14 10:24:17 2005 UTC revision 1.11.2.2 by gnu_andrew, Sat Jan 15 17:02:22 2005 UTC
# Line 144  Java_gnu_java_awt_peer_gtk_GtkLabelPeer_ Line 144  Java_gnu_java_awt_peer_gtk_GtkLabelPeer_
144    
145    gdk_threads_leave ();    gdk_threads_leave ();
146  }  }
147    
148    JNIEXPORT void JNICALL
149    Java_gnu_java_awt_peer_gtk_GtkLabelPeer_setNativeBounds
150      (JNIEnv *env, jobject obj, jint x, jint y, jint width, jint height)
151    {
152      GtkWidget *widget;
153      void *ptr;
154    
155      ptr = NSA_GET_PTR (env, obj);
156    
157      gdk_threads_enter ();
158    
159      widget = GTK_WIDGET (ptr);
160    
161      /* We assume that -1 is a width or height and not a request for the
162         widget's natural size. */
163      width = width < 0 ? 0 : width;
164      height = height < 0 ? 0 : height;
165    
166      if (!(width == 0 && height == 0))
167        {
168          /* Set the event box's size request... */
169          gtk_widget_set_size_request (widget, width, height);
170          /* ...and the label's size request. */
171          gtk_widget_set_size_request (gtk_bin_get_child (GTK_BIN (widget)),
172                                       width, height);
173    
174          if (widget->parent != NULL)
175            gtk_fixed_move (GTK_FIXED (widget->parent), widget, x, y);
176        }
177    
178      gdk_threads_leave ();
179    }

Legend:
Removed from v.1.11.2.1  
changed lines
  Added in v.1.11.2.2

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26