From: Dana Jansens Date: Fri, 5 Aug 2011 15:00:53 +0000 (-0400) Subject: Allow an xml tag to be unregistered from the xml parser. X-Git-Url: https://git.dogcows.com/gitweb?a=commitdiff_plain;h=d58ed5c413e052e7ff58aa1ea15b475e9c335e07;p=chaz%2Fopenbox Allow an xml tag to be unregistered from the xml parser. --- diff --git a/obt/xml.c b/obt/xml.c index c8729129..fde3b76d 100644 --- a/obt/xml.c +++ b/obt/xml.c @@ -112,6 +112,11 @@ void obt_xml_register(ObtXmlInst *i, const gchar *tag, g_hash_table_insert(i->callbacks, c->tag, c); } +void obt_xml_unregister(ObtXmlInst *i, const gchar *tag) +{ + g_hash_table_remove(i->callbacks, tag); +} + static gboolean load_file(ObtXmlInst *i, const gchar *domain, const gchar *filename, diff --git a/obt/xml.h b/obt/xml.h index ac2dc57f..3884f36b 100644 --- a/obt/xml.h +++ b/obt/xml.h @@ -62,6 +62,7 @@ void obt_xml_close(ObtXmlInst *inst); void obt_xml_register(ObtXmlInst *inst, const gchar *tag, ObtXmlCallback func, gpointer data); +void obt_xml_unregister(ObtXmlInst *inst, const gchar *tag); void obt_xml_tree(ObtXmlInst *i, xmlNodePtr node); void obt_xml_tree_from_root(ObtXmlInst *i);