mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Bug 797670 - scheduled transaction editor can remain open when switching file, which causes seg fault when later closed
This commit is contained in:
parent
8f5094f990
commit
4cca84bb32
@ -62,6 +62,7 @@
|
|||||||
#include "gnc-ui.h"
|
#include "gnc-ui.h"
|
||||||
#include "gnc-ui-util.h"
|
#include "gnc-ui-util.h"
|
||||||
#include "gnucash-sheet.h"
|
#include "gnucash-sheet.h"
|
||||||
|
#include "gnc-session.h"
|
||||||
|
|
||||||
#include "gnc-split-reg.h"
|
#include "gnc-split-reg.h"
|
||||||
|
|
||||||
@ -1123,6 +1124,7 @@ gnc_ui_scheduled_xaction_editor_dialog_create (GtkWindow *parent,
|
|||||||
GtkBuilder *builder;
|
GtkBuilder *builder;
|
||||||
GtkWidget *button;
|
GtkWidget *button;
|
||||||
int i;
|
int i;
|
||||||
|
gint id;
|
||||||
GList *dlgExists = NULL;
|
GList *dlgExists = NULL;
|
||||||
|
|
||||||
static struct widgetSignalCallback
|
static struct widgetSignalCallback
|
||||||
@ -1208,10 +1210,12 @@ gnc_ui_scheduled_xaction_editor_dialog_create (GtkWindow *parent,
|
|||||||
TRUE, TRUE, 0 );
|
TRUE, TRUE, 0 );
|
||||||
}
|
}
|
||||||
|
|
||||||
gnc_register_gui_component( DIALOG_SCHEDXACTION_EDITOR_CM_CLASS,
|
id = gnc_register_gui_component( DIALOG_SCHEDXACTION_EDITOR_CM_CLASS,
|
||||||
NULL, /* no refresh handler */
|
NULL, /* no refresh handler */
|
||||||
sxed_close_handler,
|
sxed_close_handler,
|
||||||
sxed );
|
sxed );
|
||||||
|
// This ensure this dialog is closed when the session is closed.
|
||||||
|
gnc_gui_component_set_session (id,gnc_get_current_session());
|
||||||
|
|
||||||
g_signal_connect( sxed->dialog, "delete_event",
|
g_signal_connect( sxed->dialog, "delete_event",
|
||||||
G_CALLBACK(sxed_delete_event), sxed );
|
G_CALLBACK(sxed_delete_event), sxed );
|
||||||
|
Loading…
Reference in New Issue
Block a user