Skip to content

Commit

Permalink
Add the removal of preference call backs to
Browse files Browse the repository at this point in the history
 gnc_gui_destroy

Add the removal of preferences setup in gnc-gnome-utils and also call
the other two functions to remove further preference call backs.
  • Loading branch information
Bob-IT committed Aug 18, 2019
1 parent 1344ea6 commit e9bab3b
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions gnucash/gnome-utils/gnc-gnome-utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -748,6 +748,31 @@ gnc_gui_destroy (void)
if (!gnome_is_initialized)
return;

if (gnc_prefs_is_set_up())
{
gnc_prefs_remove_cb_by_func (GNC_PREFS_GROUP_GENERAL,
GNC_PREF_DATE_FORMAT,
gnc_configure_date_format,
NULL);
gnc_prefs_remove_cb_by_func (GNC_PREFS_GROUP_GENERAL,
GNC_PREF_DATE_COMPL_THISYEAR,
gnc_configure_date_completion,
NULL);
gnc_prefs_remove_cb_by_func (GNC_PREFS_GROUP_GENERAL,
GNC_PREF_DATE_COMPL_SLIDING,
gnc_configure_date_completion,
NULL);
gnc_prefs_remove_cb_by_func (GNC_PREFS_GROUP_GENERAL,
GNC_PREF_DATE_BACKMONTHS,
gnc_configure_date_completion,
NULL);
gnc_prefs_remove_group_cb_by_func (GNC_PREFS_GROUP_GENERAL,
gnc_gui_refresh_all,
NULL);

gnc_ui_util_remove_registered_prefs ();
gnc_prefs_remove_registered ();
}
gnc_extensions_shutdown ();
}

Expand Down

0 comments on commit e9bab3b

Please sign in to comment.