[Gnucash-changes] r13862 - gnucash/trunk - Attempt to affect #334627: re-order destroying SX vs. window.

Joshua Sled jsled at cvs.gnucash.org
Wed Apr 26 21:33:18 EDT 2006


Author: jsled
Date: 2006-04-26 21:33:17 -0400 (Wed, 26 Apr 2006)
New Revision: 13862
Trac: http://svn.gnucash.org/trac/changeset/13862

Modified:
   gnucash/trunk/ChangeLog
   gnucash/trunk/src/gnome/dialog-scheduledxaction.c
Log:
Attempt to affect #334627: re-order destroying SX vs. window.


Modified: gnucash/trunk/ChangeLog
===================================================================
--- gnucash/trunk/ChangeLog	2006-04-26 09:11:38 UTC (rev 13861)
+++ gnucash/trunk/ChangeLog	2006-04-27 01:33:17 UTC (rev 13862)
@@ -1,3 +1,9 @@
+2006-04-26  Joshua Sled  <jsled at asynchronous.org>
+
+	* 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 <stimming at tuhh.de>
 
 	* doc/gnucash.1.in: Properly quote marks. Bug #339731.

Modified: gnucash/trunk/src/gnome/dialog-scheduledxaction.c
===================================================================
--- gnucash/trunk/src/gnome/dialog-scheduledxaction.c	2006-04-26 09:11:38 UTC (rev 13861)
+++ gnucash/trunk/src/gnome/dialog-scheduledxaction.c	2006-04-27 01:33:17 UTC (rev 13862)
@@ -1163,12 +1163,6 @@
         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 @@
         }
         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);
 }
 



More information about the gnucash-changes mailing list