From 1b6c15836e81f0cc0a7934d5478cd5f407a57a60 Mon Sep 17 00:00:00 2001 From: Dan Winship Date: Sat, 8 Jul 2000 19:18:11 +0000 Subject: comment out true but confused warning about non-scrollable widgets until * e-scroll-frame.c (e_scroll_frame_add): comment out true but confused warning about non-scrollable widgets until Chris and/or Federico fix this correctly. (e_scroll_frame_size_allocate): If the available space for the child is less than the width/height of the frame, give the child an allocation of 0 rather than some small negative number cast to unsigned. svn path=/trunk/; revision=3977 --- widgets/misc/ChangeLog | 10 ++++++++++ widgets/misc/e-scroll-frame.c | 8 ++++++-- 2 files changed, 16 insertions(+), 2 deletions(-) (limited to 'widgets') diff --git a/widgets/misc/ChangeLog b/widgets/misc/ChangeLog index 7cad0cfc37..cb2fd56fe9 100644 --- a/widgets/misc/ChangeLog +++ b/widgets/misc/ChangeLog @@ -1,3 +1,13 @@ +2000-07-08 Dan Winship + + * e-scroll-frame.c (e_scroll_frame_add): comment out true but + confused warning about non-scrollable widgets until Chris and/or + Federico fix this correctly. + (e_scroll_frame_size_allocate): If the available space for the + child is less than the width/height of the frame, give the child + an allocation of 0 rather than some small negative number cast to + unsigned. + 2000-07-05 Dan Winship * Makefile.am (INCLUDES): Set G_LOG_DOMAIN=__FILE__ rather than diff --git a/widgets/misc/e-scroll-frame.c b/widgets/misc/e-scroll-frame.c index 254977457a..09443bc0e2 100644 --- a/widgets/misc/e-scroll-frame.c +++ b/widgets/misc/e-scroll-frame.c @@ -697,8 +697,8 @@ e_scroll_frame_size_allocate (GtkWidget *widget, GtkAllocation *allocation) child_allocation.x = priv->frame_x + xthickness; child_allocation.y = priv->frame_y + ythickness; - child_allocation.width = priv->frame_w - 2 * xthickness; - child_allocation.height = priv->frame_h - 2 * ythickness; + child_allocation.width = MAX ((gint)priv->frame_w - 2 * xthickness, 0); + child_allocation.height = MAX ((gint)priv->frame_h - 2 * ythickness, 0); previous_hvis = priv->hsb_visible; previous_vvis = priv->vsb_visible; @@ -850,8 +850,12 @@ e_scroll_frame_add (GtkContainer *container, GtkWidget *child) if (!gtk_widget_set_scroll_adjustments (child, gtk_range_get_adjustment (GTK_RANGE (priv->hsb)), gtk_range_get_adjustment (GTK_RANGE (priv->vsb)))) +#if 0 g_warning ("e_scroll_frame_add(): cannot add non scrollable widget " "use e_scroll_frame_add_with_viewport() instead"); +#else + ; +#endif if (GTK_WIDGET_REALIZED (child->parent)) gtk_widget_realize (child); -- cgit