diff options
author | Christian Persch <chpe@cvs.gnome.org> | 2004-08-24 00:04:38 +0800 |
---|---|---|
committer | Christian Persch <chpe@src.gnome.org> | 2004-08-24 00:04:38 +0800 |
commit | 29b3f08fd3fce6d8c6a9ce0793410bd089374192 (patch) | |
tree | 5fd96604fc5993631d85324fd4f9986f9f7dbb26 /lib | |
parent | dbf51aed9ffb4a50152b2652428707b75fc74967 (diff) | |
download | gsoc2013-epiphany-29b3f08fd3fce6d8c6a9ce0793410bd089374192.tar gsoc2013-epiphany-29b3f08fd3fce6d8c6a9ce0793410bd089374192.tar.gz gsoc2013-epiphany-29b3f08fd3fce6d8c6a9ce0793410bd089374192.tar.bz2 gsoc2013-epiphany-29b3f08fd3fce6d8c6a9ce0793410bd089374192.tar.lz gsoc2013-epiphany-29b3f08fd3fce6d8c6a9ce0793410bd089374192.tar.xz gsoc2013-epiphany-29b3f08fd3fce6d8c6a9ce0793410bd089374192.tar.zst gsoc2013-epiphany-29b3f08fd3fce6d8c6a9ce0793410bd089374192.zip |
Sync.
2004-08-23 Christian Persch <chpe@cvs.gnome.org>
* lib/widgets/ephy-label.c: (ephy_label_ensure_layout),
(ephy_label_size_allocate):
Sync.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/widgets/ephy-label.c | 13 |
1 files changed, 8 insertions, 5 deletions
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) |