diff options
author | Nick Schermer <nick@xfce.org> | 2009-10-23 14:18:08 +0200 |
---|---|---|
committer | Nick Schermer <nick@xfce.org> | 2009-10-23 14:18:08 +0200 |
commit | d360e538a0be2c658a761b8fee868dbfa2d9e219 (patch) | |
tree | 71371986e5de5ad0e048cb1afa3ad3f2ae140b4f /exo-open | |
parent | afc76d7cbf690024d4cfd819c4a2900b274290b7 (diff) | |
download | exo-d360e538a0be2c658a761b8fee868dbfa2d9e219.tar.gz |
Use the new exo_str_looks_like_an_uri() function.
Diffstat (limited to 'exo-open')
-rw-r--r-- | exo-open/main.c | 22 |
1 files changed, 1 insertions, 21 deletions
diff --git a/exo-open/main.c b/exo-open/main.c index b556186..8690ab2 100644 --- a/exo-open/main.c +++ b/exo-open/main.c @@ -177,26 +177,6 @@ exo_open_launch_desktop_file (const gchar *arg) -static gboolean -exo_open_looks_like_an_uri (const gchar *string) -{ - const gchar *s = string; - - /* <scheme> starts with an alpha character */ - if (g_ascii_isalpha (*s)) - { - /* <scheme> continues with (alpha | digit | "+" | "-" | ".")* */ - for (++s; g_ascii_isalnum (*s) || *s == '+' || *s == '-' || *s == '.'; ++s); - - /* <scheme> must be followed by ":" */ - return (*s == ':'); - } - - return FALSE; -} - - - static gchar * exo_open_find_scheme (const gchar *string) { @@ -353,7 +333,7 @@ main (int argc, char **argv) /* successfully launched a desktop file */ continue; } - else if (exo_open_looks_like_an_uri (*argv)) + else if (exo_str_looks_like_an_uri (*argv)) { /* use the argument directly */ uri = g_strdup (*argv); |