[Gnucash-changes] r13292 - gnucash/trunk - display an error dialog
when we fail to parse a log file
Derek Atkins
warlord at cvs.gnucash.org
Sat Feb 18 11:45:51 EST 2006
Author: warlord
Date: 2006-02-18 11:45:50 -0500 (Sat, 18 Feb 2006)
New Revision: 13292
Trac: http://svn.gnucash.org/trac/changeset/13292
Modified:
gnucash/trunk/ChangeLog
gnucash/trunk/src/import-export/log-replay/gnc-log-replay.c
Log:
display an error dialog when we fail to parse a log file
due to EOF or a bad header parsing. Fixes #331620 based
on the test-case.
Modified: gnucash/trunk/ChangeLog
===================================================================
--- gnucash/trunk/ChangeLog 2006-02-18 14:39:21 UTC (rev 13291)
+++ gnucash/trunk/ChangeLog 2006-02-18 16:45:50 UTC (rev 13292)
@@ -3,6 +3,11 @@
* intl-scm/xgettext.scm: remove the absolute path from filenames
* intl-scm/Makefile.am: pass the absolute path to xgettext.scm
+ * src/import-export/log-replay/gnc-log-replay.c:
+ display an error dialog when we fail to parse a log file
+ due to EOF or a bad header parsing. Fixes #331620 based
+ on the test-case.
+
2006-02-17 David Hampton <hampton at employees.org>
* src/register/register-gnome/gnucash-sheet.c:
Modified: gnucash/trunk/src/import-export/log-replay/gnc-log-replay.c
===================================================================
--- gnucash/trunk/src/import-export/log-replay/gnc-log-replay.c 2006-02-18 14:39:21 UTC (rev 13291)
+++ gnucash/trunk/src/import-export/log-replay/gnc-log-replay.c 2006-02-18 16:45:50 UTC (rev 13292)
@@ -44,8 +44,8 @@
#include "gnc-book.h"
#include "gnc-ui-util.h"
#include "gnc-gconf-utils.h"
+#include "gnc-gui-query.h"
-
#define GCONF_SECTION "dialogs/log_replay"
/* NW: If you want a new log_module, just define
@@ -534,6 +534,8 @@
if((read_retval = fgets(read_buf,sizeof(read_buf),log_file)) == NULL)
{
DEBUG("Read error or EOF");
+ gnc_info_dialog(NULL, "%s",
+ _("The log file you selected was empty."));
}
else
{
@@ -541,6 +543,9 @@
{
PERR("File header not recognised:\n%s",read_buf);
PERR("Expected:\n%s",expected_header);
+ gnc_error_dialog(NULL, "%s",
+ _("The log file you selected cannot be read. "
+ "The file header was not recognized."));
}
else
{
More information about the gnucash-changes
mailing list