changeset 2977:54081d5cbd76 trunk

Remove xmms_urldecode_path().
author William Pitcock <nenolod@atheme-project.org>
date Tue, 03 Jul 2007 19:45:35 -0500
parents 6131bf51ee63
children f4971c7d6384
files src/audacious/util.c src/audacious/util.h
diffstat 2 files changed, 0 insertions(+), 46 deletions(-) [+]
line wrap: on
line diff
--- a/src/audacious/util.c	Tue Jul 03 19:44:41 2007 -0500
+++ b/src/audacious/util.c	Tue Jul 03 19:45:35 2007 -0500
@@ -941,50 +941,6 @@
     return dblimg;
 }
 
-/* URL-decode a file: URL path, return NULL if it's not what we expect */
-gchar *
-xmms_urldecode_path(const gchar * encoded_path)
-{
-    const gchar *cur, *ext;
-    gchar *path, *tmp;
-    gint realchar;
-
-    if (!encoded_path)
-        return NULL;
-
-    if (!str_has_prefix_nocase(encoded_path, "file:"))
-        return NULL;
-
-    cur = encoded_path + 5;
-
-    if (str_has_prefix_nocase(cur, "//localhost"))
-        cur += 11;
-
-    if (*cur == '/')
-        while (cur[1] == '/')
-            cur++;
-
-    tmp = g_malloc0(strlen(cur) + 1);
-
-    while ((ext = strchr(cur, '%')) != NULL) {
-        strncat(tmp, cur, ext - cur);
-        ext++;
-        cur = ext + 2;
-        if (!sscanf(ext, "%2x", &realchar)) {
-            /* Assume it is a literal '%'.  Several file
-             * managers send unencoded file: urls on drag
-             * and drop. */
-            realchar = '%';
-            cur -= 2;
-        }
-        tmp[strlen(tmp)] = realchar;
-    }
-
-    path = g_strconcat(tmp, cur, NULL);
-    g_free(tmp);
-    return path;
-}
-
 /**
  * xmms_show_message:
  * @title: The title of the message to show.
--- a/src/audacious/util.h	Tue Jul 03 19:44:41 2007 -0500
+++ b/src/audacious/util.h	Tue Jul 03 19:45:35 2007 -0500
@@ -108,8 +108,6 @@
 
 GdkImage *create_dblsize_image(GdkImage * img);
 
-gchar *xmms_urldecode_path(const gchar * encoded_path);
-
 GdkPixbuf *audacious_create_colorized_pixbuf(GdkPixbuf *src, gint red, gint green, gint blue);
 
 gchar *audacious_get_localdir(void);