From db91a80c93c19a3b18c66d09acb58c461cbd1083 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20K=C3=B6hler?= Date: Sat, 26 Apr 2008 15:59:40 +0000 Subject: [PATCH] Bug #467529: Fix Align_n by specifying pango widths and ellipse modes for check print texts. This patch from David Reiser reverts r16475, but by using pango_layout_set_ellipsize() center or right aligned texts are printed correctly and the first line is stilled showed instead of the last one. BP git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@17127 57a11ea4-9604-0410-9ed3-97b8803252fd --- src/gnome/dialog-print-check.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gnome/dialog-print-check.c b/src/gnome/dialog-print-check.c index 9974abae40..3d1e6a3d7d 100644 --- a/src/gnome/dialog-print-check.c +++ b/src/gnome/dialog-print-check.c @@ -1363,7 +1363,8 @@ draw_text(GncPrintContext * context, const gchar * text, check_item_t * data, } pango_layout_set_alignment(layout, data->w ? data->align : PANGO_ALIGN_LEFT); - pango_layout_set_width(layout, -1); + pango_layout_set_width(layout, data->w ? data->w * PANGO_SCALE : -1); + pango_layout_set_ellipsize(layout, PANGO_ELLIPSIZE_END); if (gnc_gconf_get_bool(GCONF_SECTION, KEY_BLOCKING_CHARS, NULL)) { new_text = g_strdup_printf("***%s***", text); pango_layout_set_text(layout, new_text, -1);