diff options
author | Tristan Van Berkom <tristan.van.berkom@gmail.com> | 2010-09-08 00:25:47 +0200 |
---|---|---|
committer | Javier Jardón <jjardon@gnome.org> | 2010-09-08 18:50:24 +0200 |
commit | 993400742041418637e1b09b462e311665ce00fb (patch) | |
tree | 1dbafa241869741844e5d98a1e3be563430521fe /gtk/gtkmisc.c | |
parent | 4e6a665e613fc7c65874bc5a121c7b87fe65b3e2 (diff) | |
download | gtk+-993400742041418637e1b09b462e311665ce00fb.tar.gz |
Completely removed requisition cache from GtkWidget instance structure.
Since we have a new mechanism for requesting sizes: GtkSizeRequestIface;
it makes no sense to maintain this cache on the GtkWidget structure...
removing the requisition cache however does not break the old "size-request"
signal which is there for backwards compatability reasons.
In any case widget->requisition should not have been accessed,
gtk_widget_get_child_requisition() would have been the correct way
to consult the cache.
This commit also deprecates the newly added gtk_widget_get_requisition()
API and makes it fallback on gtk_size_request_get_size().
Diffstat (limited to 'gtk/gtkmisc.c')
-rw-r--r-- | gtk/gtkmisc.c | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/gtk/gtkmisc.c b/gtk/gtkmisc.c index 94d3052b61..1f5a9557bc 100644 --- a/gtk/gtkmisc.c +++ b/gtk/gtkmisc.c @@ -268,7 +268,6 @@ gtk_misc_set_padding (GtkMisc *misc, gint ypad) { GtkMiscPrivate *priv; - GtkRequisition *requisition; g_return_if_fail (GTK_IS_MISC (misc)); @@ -288,16 +287,9 @@ gtk_misc_set_padding (GtkMisc *misc, if (ypad != priv->ypad) g_object_notify (G_OBJECT (misc), "ypad"); - requisition = &(GTK_WIDGET (misc)->requisition); - requisition->width -= priv->xpad * 2; - requisition->height -= priv->ypad * 2; - priv->xpad = xpad; priv->ypad = ypad; - requisition->width += priv->xpad * 2; - requisition->height += priv->ypad * 2; - if (gtk_widget_is_drawable (GTK_WIDGET (misc))) gtk_widget_queue_resize (GTK_WIDGET (misc)); |