Re: Size requisition changes



Owen Taylor <otaylor@redhat.com> writes:

>  If your code is affected by these changes (there are
>  about 4 places in GNOME that will print out warnings),
>  you should probably not change it immediately, but
>  wait for the next release of GTK+, and then call
>  AM_PATH_GTK () with a version of 1.1.16, since the
>  necesarry changes will not be compatible with older 
>  versions of GTK+.
> 
> I apologize for any inconvience this causes (it shouldn't
> really be much - I'll do the GNOME changes myself),
> but I think this change is necesary and the
> right thing to do.

Just a short question (GTop is one of the places):

After applying the following patch to GTop:

------------------------------------------------------------------------
--- gtop-procview.c     1999/02/15 04:44:15     1.12
+++ gtop-procview.c     1999/02/22 22:26:39
@@ -332,10 +332,11 @@
        requisition->height = GTK_CONTAINER (widget)->border_width * 2;
 
        if (bin->child && GTK_WIDGET_VISIBLE (bin->child)) {
-               gtk_widget_size_request (bin->child, &bin->child->requisition);
+               GtkRequisition child_requisition;
+               gtk_widget_size_request (bin->child, &child_requisition);
 
-               requisition->width += bin->child->requisition.width;
-               requisition->height += bin->child->requisition.height;
+               requisition->width += child_requisition.width;
+               requisition->height += child_requisition.height;
        }
 }
 
------------------------------------------------------------------------

the warnings went away - does this gtk_widget_size_request () return
the correct requisition in &child_requsition or do I need to call
gtk_widget_get_child_requisition again or something else ?

-- 
Martin Baulig - martin@home-of-linux.org - http://www.home-of-linux.org



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]