diff options
| author | Dana Jansens <danakj@orodu.net> | 2003-09-01 00:53:55 +0000 |
|---|---|---|
| committer | Dana Jansens <danakj@orodu.net> | 2003-09-01 00:53:55 +0000 |
| commit | b543af60b3b625f978bec0eacc7da31cd9d347f6 (patch) | |
| tree | 330a8fb4be06ae366becc72834689877c927dff1 /openbox/config.c | |
| parent | 43c5c01d33e0f4b849fe93ba468827180727eadc (diff) | |
move expand_tilde to ob_expand_tilde in openbox.c to make it global.
use it on the command read in the menu parsing for pipe menus.
use it on the command read for execute/restart actions.
Diffstat (limited to 'openbox/config.c')
| -rw-r--r-- | openbox/config.c | 15 |
1 files changed, 3 insertions, 12 deletions
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); -} - /* <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); } } |
