aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/table/e-cell-text.c
diff options
context:
space:
mode:
Diffstat (limited to 'widgets/table/e-cell-text.c')
-rw-r--r--widgets/table/e-cell-text.c17
1 files changed, 2 insertions, 15 deletions
diff --git a/widgets/table/e-cell-text.c b/widgets/table/e-cell-text.c
index fc20818625..a539e031eb 100644
--- a/widgets/table/e-cell-text.c
+++ b/widgets/table/e-cell-text.c
@@ -612,21 +612,8 @@ build_layout (ECellTextView *text_view, int row, const char *text, gint width)
pango_layout_set_width (layout, width * PANGO_SCALE);
pango_layout_set_wrap (layout, PANGO_WRAP_CHAR);
- if (pango_layout_get_line_count (layout) > 1) {
- PangoLayoutLine *line = pango_layout_get_line (layout, 0);
- gchar *line_text = g_strdup (pango_layout_get_text (layout));
- gchar *last_char = g_utf8_find_prev_char (line_text, line_text + line->length - 1);
- while (last_char && pango_layout_get_line_count (layout) > 1) {
- gchar *new_text;
- last_char = g_utf8_find_prev_char (line_text, last_char);
- if (last_char)
- *last_char = '\0';
- new_text = g_strconcat (line_text, "...", NULL);
- pango_layout_set_text (layout, new_text, -1);
- g_free (new_text);
- }
- g_free (line_text);
- }
+ pango_layout_set_ellipsize (layout, PANGO_ELLIPSIZE_END);
+ pango_layout_set_height (layout, 0);
switch (ect->justify) {
case GTK_JUSTIFY_RIGHT: