r16046 - gnucash/trunk/src/gnome - Fix two bugs in custom check printing. One swaps the placement of the

David Hampton hampton at cvs.gnucash.org
Sat May 5 15:25:04 EDT 2007


Author: hampton
Date: 2007-05-05 15:25:04 -0400 (Sat, 05 May 2007)
New Revision: 16046
Trac: http://svn.gnucash.org/trac/changeset/16046

Modified:
   gnucash/trunk/src/gnome/dialog-print-check.c
Log:
Fix two bugs in custom check printing.  One swaps the placement of the
amount(number) and amount(words) when printing directly from the
custom check page of the print dialog.  (No bugzilla.)  The other bug
is that GnuCash fails to write the guid in newly saved check
files. (Bug #434407)


Modified: gnucash/trunk/src/gnome/dialog-print-check.c
===================================================================
--- gnucash/trunk/src/gnome/dialog-print-check.c	2007-05-05 19:20:35 UTC (rev 16045)
+++ gnucash/trunk/src/gnome/dialog-print-check.c	2007-05-05 19:25:04 UTC (rev 16046)
@@ -510,8 +510,8 @@
 
     key_file = g_key_file_new();
     guid_new(&guid);
-    g_key_file_set_string(key_file, KF_GROUP_TOP, KF_KEY_GUID,
-                          guid_to_string_buff(&guid, buf));
+    guid_to_string_buff(&guid, buf);
+    g_key_file_set_string(key_file, KF_GROUP_TOP, KF_KEY_GUID, buf);
     g_key_file_set_string(key_file, KF_GROUP_TOP, KF_KEY_TITLE,
                           _("Custom Check"));
     g_key_file_set_boolean(key_file, KF_GROUP_TOP, KF_KEY_SHOW_GRID, FALSE);
@@ -1887,14 +1887,14 @@
     draw_text(context, buf, &item, desc);
     g_date_free(date);
 
-    item.x = multip * gtk_spin_button_get_value(pcd->words_x);
-    item.y = multip * gtk_spin_button_get_value(pcd->words_y);
+    item.x = multip * gtk_spin_button_get_value(pcd->number_x);
+    item.y = multip * gtk_spin_button_get_value(pcd->number_y);
     info = gnc_default_print_info(FALSE);
     amount = gnc_numeric_abs(xaccSplitGetAmount(pcd->split));
     draw_text(context, xaccPrintAmount(amount, info), &item, desc);
 
-    item.x = multip * gtk_spin_button_get_value(pcd->number_x);
-    item.y = multip * gtk_spin_button_get_value(pcd->number_y);
+    item.x = multip * gtk_spin_button_get_value(pcd->words_x);
+    item.y = multip * gtk_spin_button_get_value(pcd->words_y);
     text = numeric_to_words(amount);
     draw_text(context, text, &item, desc);
     g_free(text);



More information about the gnucash-changes mailing list