AUDIT: r17127 - gnucash/trunk/src/gnome - Bug #467529: Fix Align_n by specifying pango widths and ellipse modes for check print texts.

Andreas Köhler andi5 at cvs.gnucash.org
Sat Apr 26 11:59:40 EDT 2008


Author: andi5
Date: 2008-04-26 11:59:40 -0400 (Sat, 26 Apr 2008)
New Revision: 17127
Trac: http://svn.gnucash.org/trac/changeset/17127

Modified:
   gnucash/trunk/src/gnome/dialog-print-check.c
Log:
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


Modified: gnucash/trunk/src/gnome/dialog-print-check.c
===================================================================
--- gnucash/trunk/src/gnome/dialog-print-check.c	2008-04-25 23:19:33 UTC (rev 17126)
+++ gnucash/trunk/src/gnome/dialog-print-check.c	2008-04-26 15:59:40 UTC (rev 17127)
@@ -1363,7 +1363,8 @@
     }
     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);



More information about the gnucash-changes mailing list