- for (it = xdg_config_dir_paths; !r && it; it = g_slist_next(it)) {
- path = g_build_filename(it->data, "openbox", "rc.xml", NULL);
- r = parse_load(path, "openbox_config", doc, root);
- g_free(path);
+ /* backward compatibility.. */
+ path = g_build_filename(g_get_home_dir(), ".themes", name,
+ "openbox-3", "themerc.xml", NULL);
+ if ((r = parse_load(path, "openbox_theme", doc, root)))
+ *retpath = g_path_get_dirname(path);
+ g_free(path);
+
+ if (!r) {
+ for (it = xdg_data_dir_paths; !r && it; it = g_slist_next(it)) {
+ path = g_build_filename(it->data, "themes", name, "openbox-3",
+ "themerc.xml", NULL);
+ if ((r = parse_load(path, "openbox_theme", doc, root)))
+ *retpath = g_path_get_dirname(path);
+ g_free(path);
+ }