mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
QIF Import crashes when closing via the 'X' button on the last page
Using the 'Close' button works correctly. The difference is that the 'X' button triggers a cancel action while the 'Close' button triggers a close action. I have changed this such that when the import already happened (that is when the user is looking at the summary page), a close action will be triggered in both cases.
This commit is contained in:
parent
5f3f9a525a
commit
3a825c929f
@ -1309,8 +1309,17 @@ void
|
|||||||
gnc_ui_qif_import_cancel_cb(GtkAssistant *gtkassistant, gpointer user_data)
|
gnc_ui_qif_import_cancel_cb(GtkAssistant *gtkassistant, gpointer user_data)
|
||||||
{
|
{
|
||||||
QIFImportWindow *wind = user_data;
|
QIFImportWindow *wind = user_data;
|
||||||
|
gint currentpage = gtk_assistant_get_current_page(gtkassistant);
|
||||||
|
GtkWidget *mypage = gtk_assistant_get_nth_page (gtkassistant, currentpage);
|
||||||
|
const char *pagename = gtk_buildable_get_name(GTK_BUILDABLE(mypage));
|
||||||
|
|
||||||
if (wind->busy)
|
if (!g_strcmp0 (pagename, "summary_page"))
|
||||||
|
{
|
||||||
|
/* Hitting the window close button on the summary page should not
|
||||||
|
invoke a cancel action. The import has finised at that point. */
|
||||||
|
gnc_ui_qif_import_close_cb(gtkassistant, user_data);
|
||||||
|
}
|
||||||
|
else if (wind->busy)
|
||||||
{
|
{
|
||||||
/* Cancel any long-running Scheme operation. */
|
/* Cancel any long-running Scheme operation. */
|
||||||
scm_c_eval_string("(qif-import:cancel)");
|
scm_c_eval_string("(qif-import:cancel)");
|
||||||
|
Loading…
Reference in New Issue
Block a user