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 --- openbox/session.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'openbox/session.c') diff --git a/openbox/session.c b/openbox/session.c index e6883f32..c38a8204 100644 --- a/openbox/session.c +++ b/openbox/session.c @@ -41,6 +41,7 @@ GList* session_state_find(struct _ObClient *c) { return NULL; } #include "focus.h" #include "gettext.h" #include "obt/parse.h" +#include "obt/paths.h" #include #include @@ -90,15 +91,18 @@ static void session_state_free(ObSessionState *state); void session_startup(gint argc, gchar **argv) { gchar *dir; + ObtPaths *p; if (!ob_sm_use) return; sm_argc = argc; sm_argv = argv; - dir = g_build_filename(parse_xdg_data_home_path(), - "openbox", "sessions", NULL); - if (!parse_mkdir_path(dir, 0700)) { + p = obt_paths_new(); + dir = g_build_filename(obt_paths_data_home(p), "openbox", "sessions",NULL); + obt_paths_unref(p), p = NULL; + + if (!obt_paths_mkdir_path(dir, 0700)) { g_message(_("Unable to make directory '%s': %s"), dir, g_strerror(errno)); } -- cgit v1.2.3