From 7f937768d48356b7917a4f8618cc8437bad30010 Mon Sep 17 00:00:00 2001 From: Joshua Sled Date: Sun, 14 Mar 2004 00:25:46 +0000 Subject: [PATCH] 2004-03-13 Joshua Sled * src/gnome/dialog-scheduledxaction.c (gnc_sxed_check_consistent): Bug#133709 fix: when we have a problem parsing a credit/debit cell, indicate to the user what occurred. git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@9860 57a11ea4-9604-0410-9ed3-97b8803252fd --- ChangeLog | 8 +++++++- src/gnome/dialog-scheduledxaction.c | 28 ++++++++++++++++++++++------ 2 files changed, 29 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index 2db52b76a8..06a8e331c2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2004-03-13 Joshua Sled + + * src/gnome/dialog-scheduledxaction.c (gnc_sxed_check_consistent): + Bug#133709 fix: when we have a problem parsing a credit/debit + cell, indicate to the user what occurred. + 2004-03-08 Christian Stimming * src/import-export/hbci/dialog-hbcitrans.c, dialog-hbcitrans.h, @@ -45,7 +51,7 @@ * src/gnome/dialog-sxsincelast.c (create_each_transaction_helper): Better handling of various error cases in - transaction-creation. Bug#120311; Bug#130330. + transaction-creation. Bug#102311; Bug#130330. 2004-03-03 Derek Atkins diff --git a/src/gnome/dialog-scheduledxaction.c b/src/gnome/dialog-scheduledxaction.c index 991f768bf9..400a846d43 100644 --- a/src/gnome/dialog-scheduledxaction.c +++ b/src/gnome/dialog-scheduledxaction.c @@ -743,9 +743,17 @@ gnc_sxed_check_consistent( SchedXactionEditorDialog *sxed ) && (str = kvp_value_get_string(v)) && strlen( str ) != 0 ) { if ( parse_vars_from_formula( str, vars, &tmp ) < 0 ) { - PERR( "Couldn't parse credit formula for " - "\"%s\" on second pass", - xaccSchedXactionGetName( sxed->sx ) ); + GString *errStr; + + errStr = g_string_sized_new( 32 ); + g_string_sprintf( errStr, + _( "Couldn't parse credit formula for " + "split \"%s\"." ), + xaccSplitGetMemo( s ) ); + gnc_error_dialog( GTK_WIDGET(sxed->dialog), + errStr->str ); + g_string_free( errStr, TRUE ); + return FALSE; } tcds->creditSum = @@ -761,9 +769,17 @@ gnc_sxed_check_consistent( SchedXactionEditorDialog *sxed ) && (str = kvp_value_get_string(v)) && strlen(str) != 0 ) { if ( parse_vars_from_formula( str, vars, &tmp ) < 0 ) { - PERR( "Couldn't parse debit formula for " - "\"%s\" on second pass", - xaccSchedXactionGetName( sxed->sx ) ); + GString *errStr; + + errStr = g_string_sized_new( 32 ); + g_string_sprintf( errStr, + _( "Couldn't parse debit formula for " + "split \"%s\"." ), + xaccSplitGetMemo( s ) ); + gnc_error_dialog( GTK_WIDGET(sxed->dialog), + (gchar*)errStr->str ); + g_string_free( errStr, TRUE ); + return FALSE; } tcds->debitSum = gnc_numeric_add( tcds->debitSum, tmp, 100,