From cd7747e9251e9e4190412b68389bdab68a60bdcc Mon Sep 17 00:00:00 2001 From: David Hampton Date: Wed, 14 Jun 2006 04:16:16 +0000 Subject: [PATCH] Do a better job of turning the busy cursor on/off. Now works correctly if there's a failure in the input file. git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@14362 57a11ea4-9604-0410-9ed3-97b8803252fd --- ChangeLog | 4 ++++ src/import-export/qif-import/druid-qif-import.c | 12 +++++++++--- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index a4d630f81d..5faf7b38a9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2006-06-13 David Hampton + * src/import-export/qif-import/druid-qif-import.c: Do a better job + of turning the busy cursor on/off. Now works correctly if there's + a failure in the input file. + * src/core-utils/gnc-glib-utils.[ch]: * src/core-utils/gw-core-utils-spec.scm: * src/import-export/qif-import/qif-file.scm: diff --git a/src/import-export/qif-import/druid-qif-import.c b/src/import-export/qif-import/druid-qif-import.c index b9cd496deb..ffd0df79d5 100644 --- a/src/import-export/qif-import/druid-qif-import.c +++ b/src/import-export/qif-import/druid-qif-import.c @@ -492,6 +492,9 @@ gnc_ui_qif_import_load_file_next_cb(GnomeDruidPage * page, load_return = scm_call_4(qif_file_load, SCM_CAR(imported_files), scm_filename, wind->ticker_map, window); + /* turn back the cursor */ + gnc_unset_busy_cursor(NULL); + /* a list returned is (#f error-message) for an error, * (#t error-message) for a warning, or just #f for an * exception. */ @@ -527,6 +530,9 @@ gnc_ui_qif_import_load_file_next_cb(GnomeDruidPage * page, return TRUE; } else { + /* turn on the busy cursor */ + gnc_set_busy_cursor(NULL, TRUE); + /* call the field parser */ parse_return = scm_call_1(qif_file_parse, SCM_CAR(imported_files)); @@ -569,6 +575,9 @@ gnc_ui_qif_import_load_file_next_cb(GnomeDruidPage * page, } } + /* turn back the cursor */ + gnc_unset_busy_cursor(NULL); + /* Can this ever happen??? */ if(parse_return == SCM_BOOL_F) { gnc_error_dialog(wind->window, @@ -596,9 +605,6 @@ gnc_ui_qif_import_load_file_next_cb(GnomeDruidPage * page, wind->imported_files = imported_files; scm_gc_protect_object(wind->imported_files); - /* turn back the cursor */ - gnc_unset_busy_cursor(NULL); - if(ask_date_format) { /* we need to get a date format, so go to the next page */ return gnc_ui_qif_import_generic_next_cb(page, arg1, wind);