Add the removal of preference call backs to

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.
This commit is contained in:
Robert Fewell 2019-07-27 17:49:29 +01:00
parent 1344ea67e7
commit e9bab3bf98

View File

@ -748,6 +748,31 @@ gnc_gui_destroy (void)
if (!gnome_is_initialized) if (!gnome_is_initialized)
return; 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 (); gnc_extensions_shutdown ();
} }