Remove plugin callbacks in plugin_destroy functions

This commit is contained in:
James Booth
2016-07-04 22:54:55 +01:00
parent 0d7b4cb4a7
commit c8d09083a8
4 changed files with 12 additions and 1 deletions

View File

@@ -138,7 +138,14 @@ callbacks_init(void)
p_window_callbacks = g_hash_table_new_full(g_str_hash, g_str_equal, free, (GDestroyNotify)_free_window_callbacks);
}
// TODO move to plugin destroy functions
void
callbacks_remove(const char *const plugin_name)
{
g_hash_table_remove(p_commands, plugin_name);
g_hash_table_remove(p_timed_functions, plugin_name);
g_hash_table_remove(p_window_callbacks, plugin_name);
}
void
callbacks_close(void)
{