summaryrefslogtreecommitdiff
path: root/gtk/gtkclist.c
diff options
context:
space:
mode:
authorOwen Taylor <otaylor@redhat.com>1999-02-10 02:35:09 +0000
committerOwen Taylor <otaylor@src.gnome.org>1999-02-10 02:35:09 +0000
commitd1bda8d56232ff0431796add4029e129f877fd6a (patch)
tree63c722c3ed4b8a886242bc78ae78dae1811c6b3a /gtk/gtkclist.c
parent84d9f5f9a13d52cd91bffc6230445d1e0ac73431 (diff)
downloadgtk+-d1bda8d56232ff0431796add4029e129f877fd6a.tar.gz
Fixed some bugs with set_default_size.
Sun Feb 7 19:49:21 1999 Owen Taylor <otaylor@redhat.com> * gtk/gtkwindow.c (gtk_window_move_resize): Fixed some bugs with set_default_size. Sat Feb 6 13:23:51 1999 Owen Taylor <otaylor@redhat.com> * docs/Changes-1.2.txt: Added information about the change to gtk_widget_size_request(). * gtk/gtkentry.c: Call gtk_widget_get_child_requisition explicitely since we differentiate between the usize set by the user and what we got. (Ugh) * gtk/gtkwidget.[ch] (gtk_widget_get_child_requisition): New function to return the effective size of a widget as it looks to its parent. * gtk/gtkwidget.c (gtk_widget_size_request): Leave widget->requisition set to exactly what the widget asked for, and then make a copy of that into the requisition argument. Allow a NULL requisition argument, and, if G_ENABLE_DEBUG, warn if requisition == &widget->requisition. * gtkalignment.c gtkaspectframe.c gtkbutton.c gtkclist.c gtkcontainer.c gtkentry.c gtkeventbox.c gtkfixed.c gtkframe.c gtkhandlebox.c gtkhbox.c gtkhpaned.c gtklayout.c gtklist.c gtklistitem.c gtkmenu.c gtkmenubar.c gtkmenuitem.c gtknotebook.c gtkoptionmenu.c gtkpacker.c gtkscrolledwindow.c gtktable.c gtktoolbar.c gtktree.c gtktreeitem.c gtkvbox.c gtkviewport.c gtkvpaned.c gtkwindow.c Avoid calling gtk_widget_size_request with requisition == widget->requisition; use gtk_widget_get_child_requisition to get the size of children.
Diffstat (limited to 'gtk/gtkclist.c')
-rw-r--r--gtk/gtkclist.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/gtk/gtkclist.c b/gtk/gtkclist.c
index ecaaf51088..f13449d33c 100644
--- a/gtk/gtkclist.c
+++ b/gtk/gtkclist.c
@@ -5393,11 +5393,13 @@ gtk_clist_size_request (GtkWidget *widget,
for (i = 0; i < clist->columns; i++)
if (clist->column[i].button)
{
+ GtkRequisition child_requisition;
+
gtk_widget_size_request (clist->column[i].button,
- &clist->column[i].button->requisition);
+ &child_requisition);
clist->column_title_area.height =
MAX (clist->column_title_area.height,
- clist->column[i].button->requisition.height);
+ child_requisition.height);
}
requisition->width += (widget->style->klass->xthickness +
@@ -6088,14 +6090,15 @@ adjust_adjustments (GtkCList *clist,
if (!block_resize && (!clist->vadjustment || !clist->hadjustment))
{
GtkWidget *widget;
+ GtkRequisition requisition;
widget = GTK_WIDGET (clist);
- gtk_widget_size_request (widget, &widget->requisition);
+ gtk_widget_size_request (widget, &requisition);
if ((!clist->hadjustment &&
- widget->requisition.width != widget->allocation.width) ||
+ requisition.width != widget->allocation.width) ||
(!clist->vadjustment &&
- widget->requisition.height != widget->allocation.height))
+ requisition.height != widget->allocation.height))
gtk_widget_queue_resize (widget);
}
}