From 07d5674d3984d008de1ecc768a296afbed731e4e Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Sat, 28 Jul 2007 11:38:53 -0400 Subject: move the xdg path stuff into obt/paths.[ch], and make render and openbox use it --- render/theme.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'render/theme.c') diff --git a/render/theme.c b/render/theme.c index 6118cdf9..87f264d1 100644 --- a/render/theme.c +++ b/render/theme.c @@ -23,7 +23,7 @@ #include "mask.h" #include "theme.h" #include "icon.h" -#include "obt/parse.h" +#include "obt/paths.h" #include #include @@ -1559,6 +1559,10 @@ static XrmDatabase loaddb(const gchar *name, gchar **path) *path = g_path_get_dirname(s); g_free(s); } else { + ObtPaths *p; + + p = obt_paths_new(); + /* XXX backwards compatibility, remove me sometime later */ s = g_build_filename(g_get_home_dir(), ".themes", name, "openbox-3", "themerc", NULL); @@ -1566,8 +1570,7 @@ static XrmDatabase loaddb(const gchar *name, gchar **path) *path = g_path_get_dirname(s); g_free(s); - for (it = parse_xdg_data_dir_paths(); !db && it; - it = g_slist_next(it)) + for (it = obt_paths_data_dirs(p); !db && it; it = g_slist_next(it)) { s = g_build_filename(it->data, "themes", name, "openbox-3", "themerc", NULL); @@ -1575,6 +1578,8 @@ static XrmDatabase loaddb(const gchar *name, gchar **path) *path = g_path_get_dirname(s); g_free(s); } + + obt_paths_unref(p); } if (db == NULL) { -- cgit v1.2.3