r17140 - gnucash/branches/2.2/src/gnome - [r17127] 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 13:17:07 EDT 2008


Author: andi5
Date: 2008-04-26 13:17:06 -0400 (Sat, 26 Apr 2008)
New Revision: 17140
Trac: http://svn.gnucash.org/trac/changeset/17140

Modified:
   gnucash/branches/2.2/src/gnome/dialog-print-check.c
Log:
[r17127] 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.


Modified: gnucash/branches/2.2/src/gnome/dialog-print-check.c
===================================================================
--- gnucash/branches/2.2/src/gnome/dialog-print-check.c	2008-04-26 16:50:34 UTC (rev 17139)
+++ gnucash/branches/2.2/src/gnome/dialog-print-check.c	2008-04-26 17:17:06 UTC (rev 17140)
@@ -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