From 6b532af3e9071e69423c1455658ff7b81b432ecb Mon Sep 17 00:00:00 2001 From: Chris Toshok Date: Fri, 16 Jul 2004 08:11:59 +0000 Subject: remove debug spew and fix the display when pango_layout_line_x_to_index 2004-07-16 Chris Toshok * e-clipped-label.c (e_clipped_label_recalc_chars_displayed): remove debug spew and fix the display when pango_layout_line_x_to_index returns FALSE (before we were drawing both the ellipses and the text). svn path=/trunk/; revision=26660 --- widgets/misc/ChangeLog | 7 +++++++ widgets/misc/e-clipped-label.c | 14 ++++---------- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/widgets/misc/ChangeLog b/widgets/misc/ChangeLog index 31ad2b2761..207f500fdd 100644 --- a/widgets/misc/ChangeLog +++ b/widgets/misc/ChangeLog @@ -1,3 +1,10 @@ +2004-07-16 Chris Toshok + + * e-clipped-label.c (e_clipped_label_recalc_chars_displayed): + remove debug spew and fix the display when + pango_layout_line_x_to_index returns FALSE (before we were drawing + both the ellipses and the text). + 2004-07-12 Jeffrey Stedfast * e-charset-picker.c: s/GB-2312/GB2312/ - fixes bug #61385. diff --git a/widgets/misc/e-clipped-label.c b/widgets/misc/e-clipped-label.c index 820398e891..b02561c0b7 100644 --- a/widgets/misc/e-clipped-label.c +++ b/widgets/misc/e-clipped-label.c @@ -390,11 +390,11 @@ e_clipped_label_recalc_chars_displayed (EClippedLabel *label) return; } - if (max_width <= 0) { - label->chars_displayed = 0; - label->ellipsis_x = 0; + label->chars_displayed = 0; + label->ellipsis_x = 0; + + if (max_width <= 0) return; - } max_width -= label->ellipsis_width; @@ -405,15 +405,9 @@ e_clipped_label_recalc_chars_displayed (EClippedLabel *label) max_width * PANGO_SCALE, &index, NULL)) { - g_warning ("pango_layout_line_x_to_index returned false"); return; } -#if 0 - g_slist_foreach (lines, (GFunc)pango_layout_line_unref, NULL); - g_slist_free (lines); -#endif - label->chars_displayed = index; pango_layout_set_text (label->layout, label->label, label->chars_displayed); -- cgit v1.2.3