summaryrefslogtreecommitdiff
path: root/gtk/gtklabel.c
diff options
context:
space:
mode:
authorBenjamin Otte <otte@redhat.com>2011-03-30 13:14:47 +0200
committerBenjamin Otte <otte@redhat.com>2011-03-30 13:17:01 +0200
commit93b0cecd7e563a4f391652e7308700c15ccce7da (patch)
treeb971c7c233b4bf63a75e0804237c9a3dcd46d0fc /gtk/gtklabel.c
parent45d01b684adee67eca0ccd81225a791d773bcf8b (diff)
downloadgtk+-93b0cecd7e563a4f391652e7308700c15ccce7da.tar.gz
label: Remove dead code
This code has been useless for a while, and now it's breaking things. Moving the paned in tests/testheightforwidth's wrapping label shows that bug. Broken since 9992efdb0e7d0cf52e47817fe049b97967400731
Diffstat (limited to 'gtk/gtklabel.c')
-rw-r--r--gtk/gtklabel.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/gtk/gtklabel.c b/gtk/gtklabel.c
index 759459eb96..fe86ea8084 100644
--- a/gtk/gtklabel.c
+++ b/gtk/gtklabel.c
@@ -3313,8 +3313,7 @@ gtk_label_update_layout_width (GtkLabel *label)
pango_layout_set_width (priv->layout, aux_width * PANGO_SCALE);
else
{
- PangoRectangle rect;
- gint xpad, ypad, natural_width;
+ gint xpad, ypad;
gtk_misc_get_padding (GTK_MISC (label), &xpad, &ypad);
if (angle == 90 || angle == 270)
@@ -3322,12 +3321,6 @@ gtk_label_update_layout_width (GtkLabel *label)
else
width = allocation.width - xpad * 2;
- /* dont set a wrap width wider than the label's natural width
- * incase we're allocated more space than needed */
- pango_layout_get_extents (priv->layout, NULL, &rect);
- natural_width = PANGO_PIXELS (rect.width);
- width = MIN (natural_width, width);
-
pango_layout_set_wrap (priv->layout, priv->wrap_mode);
pango_layout_set_width (priv->layout, MAX (width, 1) * PANGO_SCALE);
}