Allow the find account dialog position to be saved when using 'X'

This commit is contained in:
Robert Fewell 2021-03-11 14:28:16 +00:00
parent 75cf25c9a8
commit 8f6675367e

View File

@ -69,6 +69,18 @@ static QofLogModule log_module = GNC_MOD_GUI;
static void close_handler (gpointer user_data);
static gboolean
gnc_find_account_dialog_window_delete_event_cb (GtkWidget *widget,
GdkEvent *event,
gpointer user_data)
{
FindAccountDialog *facc_dialog = user_data;
// this cb allows the window size to be saved on closing with the X
gnc_save_window_size (GNC_PREFS_GROUP,
GTK_WINDOW(facc_dialog->window));
return FALSE;
}
static void
gnc_find_account_dialog_window_destroy_cb (GtkWidget *object, gpointer user_data)
{
@ -438,6 +450,9 @@ gnc_find_account_dialog_create (GtkWidget *parent, FindAccountDialog *facc_dialo
g_signal_connect (facc_dialog->window, "destroy",
G_CALLBACK(gnc_find_account_dialog_window_destroy_cb), facc_dialog);
g_signal_connect (facc_dialog->window, "delete-event",
G_CALLBACK(gnc_find_account_dialog_window_delete_event_cb), facc_dialog);
g_signal_connect (facc_dialog->window, "key_press_event",
G_CALLBACK(gnc_find_account_dialog_window_key_press_cb), facc_dialog);