[Xfce4-commits] <exo:nick/remove-exo-mount-point> Use the new exo_str_looks_like_an_uri() function.
Nick Schermer
noreply at xfce.org
Fri Oct 23 14:38:03 CEST 2009
Updating branch refs/heads/nick/remove-exo-mount-point
to d360e538a0be2c658a761b8fee868dbfa2d9e219 (commit)
from afc76d7cbf690024d4cfd819c4a2900b274290b7 (commit)
commit d360e538a0be2c658a761b8fee868dbfa2d9e219
Author: Nick Schermer <nick at xfce.org>
Date: Fri Oct 23 14:18:08 2009 +0200
Use the new exo_str_looks_like_an_uri() function.
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);
More information about the Xfce4-commits
mailing list