aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/misc/e-clipped-label.c
diff options
context:
space:
mode:
authorChris Toshok <toshok@ximian.com>2004-07-16 16:11:59 +0800
committerChris Toshok <toshok@src.gnome.org>2004-07-16 16:11:59 +0800
commit6b532af3e9071e69423c1455658ff7b81b432ecb (patch)
tree3943051cc4ed8bb8c952e9df8a63cd3c49c763fd /widgets/misc/e-clipped-label.c
parentf47e957ba93d105fb4651657d675282376830914 (diff)
downloadgsoc2013-evolution-6b532af3e9071e69423c1455658ff7b81b432ecb.tar
gsoc2013-evolution-6b532af3e9071e69423c1455658ff7b81b432ecb.tar.gz
gsoc2013-evolution-6b532af3e9071e69423c1455658ff7b81b432ecb.tar.bz2
gsoc2013-evolution-6b532af3e9071e69423c1455658ff7b81b432ecb.tar.lz
gsoc2013-evolution-6b532af3e9071e69423c1455658ff7b81b432ecb.tar.xz
gsoc2013-evolution-6b532af3e9071e69423c1455658ff7b81b432ecb.tar.zst
gsoc2013-evolution-6b532af3e9071e69423c1455658ff7b81b432ecb.zip
remove debug spew and fix the display when pango_layout_line_x_to_index
2004-07-16 Chris Toshok <toshok@ximian.com> * 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
Diffstat (limited to 'widgets/misc/e-clipped-label.c')
-rw-r--r--widgets/misc/e-clipped-label.c14
1 files changed, 4 insertions, 10 deletions
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);