summaryrefslogtreecommitdiff
path: root/openbox/openbox.c
diff options
context:
space:
mode:
authorDana Jansens <danakj@orodu.net>2007-07-27 01:37:28 -0400
committerDana Jansens <danakj@orodu.net>2008-01-20 01:36:55 -0500
commitfdabb69f4f25596df972caa76c85c2aeba26226e (patch)
tree2566f1a229a65e54cdffd88a255301d0bf7fa3a7 /openbox/openbox.c
parent0667bbc3e2fbd3fa39206e843560735524840d35 (diff)
update openbox to use the current parser interface in libobt
there is also some random bug fixes for other libobt stuff in here.
Diffstat (limited to 'openbox/openbox.c')
-rw-r--r--openbox/openbox.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/openbox/openbox.c b/openbox/openbox.c
index aefe6851..2cab7e27 100644
--- a/openbox/openbox.c
+++ b/openbox/openbox.c
@@ -42,11 +42,12 @@
#include "ping.h"
#include "mainloop.h"
#include "gettext.h"
-#include "parser/parse.h"
#include "render/render.h"
#include "render/theme.h"
#include "obt/display.h"
#include "obt/prop.h"
+#include "obt/keyboard.h"
+#include "obt/parse.h"
#ifdef HAVE_FCNTL_H
# include <fcntl.h>
@@ -214,13 +215,11 @@ gint main(gint argc, gchar **argv)
keys[OB_KEY_DOWN] = obt_keyboard_keysym_to_keycode(XK_Down);
{
- ObParseInst *i;
- xmlDocPtr doc;
- xmlNodePtr node;
+ ObtParseInst *i;
/* startup the parsing so everything can register sections
of the rc */
- i = parse_startup();
+ i = obt_parse_instance_new();
/* register all the available actions */
actions_startup(reconfigure);
@@ -228,9 +227,11 @@ gint main(gint argc, gchar **argv)
config_startup(i);
/* parse/load user options */
- if (parse_load_rc(NULL, &doc, &node)) {
- parse_tree(i, doc, node->xmlChildrenNode);
- parse_close(doc);
+ if (obt_parse_load_config_file(i, "openbox", "rc.xml",
+ "openbox_config"))
+ {
+ obt_parse_tree(i, obt_parse_instance_root(i)->children);
+ obt_parse_close(i);
} else
g_message(_("Unable to find a valid config file, using some simple defaults"));
@@ -241,7 +242,7 @@ gint main(gint argc, gchar **argv)
*/
/* we're done with parsing now, kill it */
- parse_shutdown(i);
+ obt_parse_instance_unref(i);
}
/* load the theme specified in the rc file */