diff options
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | lib/widgets/ephy-label.c | 13 |
2 files changed, 15 insertions, 5 deletions
@@ -1,5 +1,12 @@ 2004-08-23 Christian Persch <chpe@cvs.gnome.org> + * lib/widgets/ephy-label.c: (ephy_label_ensure_layout), + (ephy_label_size_allocate): + + Sync. + +2004-08-23 Christian Persch <chpe@cvs.gnome.org> + * NEWS: Update for 1.3.6. diff --git a/lib/widgets/ephy-label.c b/lib/widgets/ephy-label.c index 8c38db095..f11816729 100644 --- a/lib/widgets/ephy-label.c +++ b/lib/widgets/ephy-label.c @@ -23,7 +23,7 @@ * GTK+ at ftp://ftp.gtk.org/pub/gtk/. */ -/* Synch'd with gtklabel.c 1.152 */ +/* Synch'd with gtklabel.c 1.154 */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -1552,7 +1552,10 @@ ephy_label_ensure_layout (EphyLabel *label) pango_layout_set_alignment (label->layout, align); pango_layout_set_ellipsize (label->layout, label->ellipsize); - if (label->wrap) + if (label->ellipsize) + pango_layout_set_width (label->layout, + widget->allocation.width * PANGO_SCALE); + else if (label->wrap) { GtkWidgetAuxInfo *aux_info; gint longest_paragraph; @@ -1619,7 +1622,7 @@ ephy_label_ensure_layout (EphyLabel *label) pango_layout_set_width (label->layout, width); } } - else /* !label->wrap */ + else /* !label->wrap */ pango_layout_set_width (label->layout, -1); } } @@ -1703,8 +1706,8 @@ ephy_label_size_allocate (GtkWidget *widget, if (label->ellipsize) { - ephy_label_ensure_layout (label); - pango_layout_set_width (label->layout, allocation->width * PANGO_SCALE); + if (label->layout) + pango_layout_set_width (label->layout, allocation->width * PANGO_SCALE); } if (label->select_info && label->select_info->window) |