X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=openbox%2Fconfig.c;h=21f03d3e27dea11e6cc692469b2c9781e6534156;hb=b543af60b3b625f978bec0eacc7da31cd9d347f6;hp=24da306013c39975151be6b13f4ac6f656d08492;hpb=43c5c01d33e0f4b849fe93ba468827180727eadc;p=chaz%2Fopenbox diff --git a/openbox/config.c b/openbox/config.c index 24da3060..21f03d3e 100644 --- a/openbox/config.c +++ b/openbox/config.c @@ -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); -} - /* @@ -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); } }