]> Dogcows Code - chaz/openbox/commitdiff
Allow an xml tag to be unregistered from the xml parser.
authorDana Jansens <danakj@orodu.net>
Fri, 5 Aug 2011 15:00:53 +0000 (11:00 -0400)
committerDana Jansens <danakj@orodu.net>
Sun, 30 Sep 2012 18:57:41 +0000 (14:57 -0400)
obt/xml.c
obt/xml.h

index c872912926405959ecd85063b9feb317e225af4d..fde3b76d7c366c9ff176776a5e25e6913e087121 100644 (file)
--- 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,
index ac2dc57f3eab64a828e2ed2ef820f74980bed7ff..3884f36bb46f7e21f6c0bf33786b409b852281cb 100644 (file)
--- 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);
 
This page took 0.023428 seconds and 4 git commands to generate.