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
This commit is contained in:
David Hampton 2006-06-14 04:16:16 +00:00
parent 85b1b6febd
commit cd7747e925
2 changed files with 13 additions and 3 deletions

View File

@ -1,5 +1,9 @@
2006-06-13 David Hampton <hampton@employees.org>
* 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:

View File

@ -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);