From b543af60b3b625f978bec0eacc7da31cd9d347f6 Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Mon, 1 Sep 2003 00:53:55 +0000 Subject: 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. --- openbox/openbox.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'openbox/openbox.c') diff --git a/openbox/openbox.c b/openbox/openbox.c index 52146960..21f3a606 100644 --- a/openbox/openbox.c +++ b/openbox/openbox.c @@ -414,3 +414,13 @@ ObState ob_state() { return state; } + +gchar *ob_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); +} -- cgit v1.2.3