aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/misc
diff options
context:
space:
mode:
Diffstat (limited to 'widgets/misc')
-rw-r--r--widgets/misc/ChangeLog10
-rw-r--r--widgets/misc/e-scroll-frame.c8
2 files changed, 16 insertions, 2 deletions
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 <danw@helixcode.com>
+
+ * 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 <danw@helixcode.com>
* 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);