From 3eb070ab80bb8a6ed472df27d2e966586ae32618 Mon Sep 17 00:00:00 2001 From: David Hampton Date: Sat, 5 May 2007 19:25:04 +0000 Subject: [PATCH] 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) git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@16046 57a11ea4-9604-0410-9ed3-97b8803252fd --- src/gnome/dialog-print-check.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/gnome/dialog-print-check.c b/src/gnome/dialog-print-check.c index 59f45dfa94..f837b7adee 100644 --- a/src/gnome/dialog-print-check.c +++ b/src/gnome/dialog-print-check.c @@ -510,8 +510,8 @@ pcd_save_custom_data(PrintCheckDialog *pcd, gchar *filename) 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_page_custom(GncPrintContext * context, gint page_nr, gpointer user_data) 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);