]> Dogcows Code - chaz/openbox/blobdiff - openbox/config.c
move expand_tilde to ob_expand_tilde in openbox.c to make it global.
[chaz/openbox] / openbox / config.c
index 24da306013c39975151be6b13f4ac6f656d08492..21f03d3e27dea11e6cc692469b2c9781e6534156 100644 (file)
@@ -4,6 +4,7 @@
 #include "prop.h"
 #include "translate.h"
 #include "parser/parse.h"
+#include "openbox.h"
 
 gboolean config_focus_new;
 gboolean config_focus_follow;
@@ -39,16 +40,6 @@ GSList *config_menu_files;
 gint config_resist_win;
 gint config_resist_edge;
 
-gchar *expand_tilde(const gchar *f)
-{
-    if (!f)
-        return NULL;
-    else if (f[0] != '~')
-        return g_strdup(f);
-    else
-        return g_strconcat(g_get_home_dir(), f+1, NULL);
-}
-
 /*
 
 <keybind key="C-x">
@@ -228,7 +219,7 @@ static void parse_theme(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node,
 
         g_free(config_theme);
         c = parse_string(doc, n);
-        config_theme = expand_tilde(c);
+        config_theme = ob_expand_tilde(c);
         g_free(c);
     }
     if ((n = parse_find_node("titleLayout", node))) {
@@ -343,7 +334,7 @@ static void parse_menu(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node, void *d)
 
             c = parse_string(doc, node);
             config_menu_files = g_slist_append(config_menu_files,
-                                               expand_tilde(c));
+                                               ob_expand_tilde(c));
             g_free(c);
         }
     }
This page took 0.021945 seconds and 4 git commands to generate.