From a0501f163cf5d325d80a0b764d9f0794f27a8277 Mon Sep 17 00:00:00 2001 From: Joshua Sled Date: Thu, 27 Apr 2006 01:33:17 +0000 Subject: [PATCH] Attempt to affect #334627: re-order destroying SX vs. window. git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@13862 57a11ea4-9604-0410-9ed3-97b8803252fd --- ChangeLog | 6 ++++++ src/gnome/dialog-scheduledxaction.c | 19 +++++++++++++------ 2 files changed, 19 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index ff49ca66ec..abb92ae960 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2006-04-26 Joshua Sled + + * src/gnome/dialog-scheduledxaction.c + (scheduledxaction_editor_dialog_destroy): re-order SX disolution + vs. ui teardown. Add comment info-request response. + 2006-04-26 Christian Stimming * doc/gnucash.1.in: Properly quote marks. Bug #339731. diff --git a/src/gnome/dialog-scheduledxaction.c b/src/gnome/dialog-scheduledxaction.c index 77c93b0d0a..0cac6793eb 100644 --- a/src/gnome/dialog-scheduledxaction.c +++ b/src/gnome/dialog-scheduledxaction.c @@ -1163,12 +1163,6 @@ scheduledxaction_editor_dialog_destroy(GtkObject *object, gpointer data) gnc_unregister_gui_component_by_data (DIALOG_SCHEDXACTION_EDITOR_CM_CLASS, sxed); - if ( sxed->newsxP ) { - /* FIXME: WTF??? */ - xaccSchedXactionFree( sxed->sx ); - } - sxed->sx = NULL; - gnc_embedded_window_close_page(sxed->embed_window, sxed->plugin_page); gtk_widget_destroy(GTK_WIDGET(sxed->embed_window)); sxed->embed_window = NULL; @@ -1183,6 +1177,19 @@ scheduledxaction_editor_dialog_destroy(GtkObject *object, gpointer data) } g_free( sxed->cal_marks ); + if ( sxed->newsxP ) { + /* FIXME: WTF??? + * + * "WTF" explaination: in the "new" click from the caller, we + * set this flag. When "ok" is pressed on the dialog, we set + * this flag to false, and thus leave the SX live. If + * "Cancel" is clicked, the flag will still be true, and this + * SX will be cleaned, here. -- jsled + */ + xaccSchedXactionFree( sxed->sx ); + } + sxed->sx = NULL; + g_free (sxed); }