Create a function to remove the registered preference

call backs setup in gnc-prefs-utils.c
This commit is contained in:
Robert Fewell 2019-07-27 17:48:42 +01:00
parent 02f7a807de
commit 1344ea67e7
2 changed files with 21 additions and 0 deletions

View File

@ -124,3 +124,19 @@ void gnc_prefs_init (void)
file_compression_changed_cb, NULL); file_compression_changed_cb, NULL);
} }
void
gnc_prefs_remove_registered (void)
{
// remove the registered pref call backs above
gnc_prefs_remove_cb_by_func (GNC_PREFS_GROUP_GENERAL, GNC_PREF_RETAIN_DAYS,
file_retain_changed_cb, NULL);
gnc_prefs_remove_cb_by_func (GNC_PREFS_GROUP_GENERAL, GNC_PREF_RETAIN_TYPE_NEVER,
file_retain_type_changed_cb, NULL);
gnc_prefs_remove_cb_by_func (GNC_PREFS_GROUP_GENERAL, GNC_PREF_RETAIN_TYPE_DAYS,
file_retain_type_changed_cb, NULL);
gnc_prefs_remove_cb_by_func (GNC_PREFS_GROUP_GENERAL, GNC_PREF_RETAIN_TYPE_FOREVER,
file_retain_type_changed_cb, NULL);
gnc_prefs_remove_cb_by_func (GNC_PREFS_GROUP_GENERAL, GNC_PREF_FILE_COMPRESSION,
file_compression_changed_cb, NULL);
}

View File

@ -47,6 +47,11 @@
*/ */
void gnc_prefs_init (void); void gnc_prefs_init (void);
/** This function is called to remove the registered preference
* call backs setup in this file
*/
void gnc_prefs_remove_registered (void);
#endif /* GNC_PREFS_UTILS_H_ */ #endif /* GNC_PREFS_UTILS_H_ */
/** @} */ /** @} */
/** @} */ /** @} */