Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCarlos Garcia Campos <carlosgc@gnome.org>2009-10-07 16:20:36 (GMT)
committer Carlos Garcia Campos <carlosgc@gnome.org>2009-10-07 16:39:31 (GMT)
commit0d6af91b5d9438f49f2e0aead21a0070d875f599 (patch)
tree32bf225276376b4a712ba5c5086b191f2b00b7a8
parent2e7269db15755aad71ea5df8abb82c778dca6500 (diff)
[utils] Remove escape_uri_for_display() in favor of g_uri_unescape_string()
-rw-r--r--shell/ev-utils.c41
-rw-r--r--shell/ev-utils.h1
2 files changed, 0 insertions, 42 deletions
diff --git a/shell/ev-utils.c b/shell/ev-utils.c
index 540836f..8cda889 100644
--- a/shell/ev-utils.c
+++ b/shell/ev-utils.c
@@ -399,44 +399,3 @@ get_gdk_pixbuf_format_by_extension (gchar *uri)
g_slist_free (pixbuf_formats);
return NULL;
}
-
-#define XDIGIT(c) ((c) <= '9' ? (c) - '0' : ((c) & 0x4F) - 'A' + 10)
-#define HEXCHAR(s) ((XDIGIT (s[1]) << 4) + XDIGIT (s[2]))
-
-static char *
-uri_decoded_copy (const char *part, int length)
-{
- unsigned char *s, *d;
- char *decoded = g_strndup (part, length);
-
- s = d = (unsigned char *)decoded;
- do {
- if (*s == '%') {
- if (!g_ascii_isxdigit (s[1]) ||
- !g_ascii_isxdigit (s[2])) {
- g_free (decoded);
- return NULL;
- }
- *d++ = HEXCHAR (s);
- s += 2;
- } else
- *d++ = *s;
- } while (*s++);
-
- return decoded;
-}
-
-char* escape_uri_for_display (const char *uri)
-{
- GFile *file;
- char *disp;
- char *filename;
-
- file = g_file_new_for_uri (uri);
- filename = g_file_get_parse_name (file);
- disp = uri_decoded_copy (filename, strlen (filename));
- g_free (filename);
- g_object_unref (file);
-
- return disp;
-}
diff --git a/shell/ev-utils.h b/shell/ev-utils.h
index ac89b1e..f7c58a7 100644
--- a/shell/ev-utils.h
+++ b/shell/ev-utils.h
@@ -44,7 +44,6 @@ gdouble get_screen_dpi (GtkWindow * window);
void file_chooser_dialog_add_writable_pixbuf_formats (GtkFileChooser *chooser);
GdkPixbufFormat* get_gdk_pixbuf_format_by_extension (gchar *uri);
-char* escape_uri_for_display (const char *uri);
G_END_DECLS
#endif /* __EV_VIEW_H__ */