aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/misc/e-clipped-label.c
diff options
context:
space:
mode:
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);