[nautilus] dnd: remove commented out code
- From: Cosimo Cecchi <cosimoc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus] dnd: remove commented out code
- Date: Wed, 9 May 2012 13:53:55 +0000 (UTC)
commit cfb7befb905e0b36100f7d18cdad22861eaf6b69
Author: Cosimo Cecchi <cosimoc gnome org>
Date: Wed May 9 09:53:10 2012 -0400
dnd: remove commented out code
This code has been commented out for a long time.
libnautilus-private/nautilus-dnd.c | 74 ------------------------------------
1 files changed, 0 insertions(+), 74 deletions(-)
---
diff --git a/libnautilus-private/nautilus-dnd.c b/libnautilus-private/nautilus-dnd.c
index 804ede3..d9fd727 100644
--- a/libnautilus-private/nautilus-dnd.c
+++ b/libnautilus-private/nautilus-dnd.c
@@ -574,80 +574,6 @@ add_one_gnome_icon (const char *uri, int x, int y, int w, int h,
uri, x, y, w, h);
}
-/*
- * Cf. #48423
- */
-#ifdef THIS_WAS_REALLY_BROKEN
-static gboolean
-is_path_that_gnome_uri_list_extract_filenames_can_parse (const char *path)
-{
- if (path == NULL || path [0] == '\0') {
- return FALSE;
- }
-
- /* It strips leading and trailing spaces. So it can't handle
- * file names with leading and trailing spaces.
- */
- if (g_ascii_isspace (path [0])) {
- return FALSE;
- }
- if (g_ascii_isspace (path [strlen (path) - 1])) {
- return FALSE;
- }
-
- /* # works as a comment delimiter, and \r and \n are used to
- * separate the lines, so it can't handle file names with any
- * of these.
- */
- if (strchr (path, '#') != NULL
- || strchr (path, '\r') != NULL
- || strchr (path, '\n') != NULL) {
- return FALSE;
- }
-
- return TRUE;
-}
-
-/* Encode a "text/plain" selection; this is a broken URL -- just
- * "file:" with a path after it (no escaping or anything). We are
- * trying to make the old gnome_uri_list_extract_filenames function
- * happy, so this is coded to its idiosyncrasises.
- */
-static void
-add_one_compatible_uri (const char *uri, int x, int y, int w, int h, gpointer data)
-{
- GString *result;
- char *local_path;
-
- result = (GString *) data;
-
- /* For URLs that do not have a file: scheme, there's no harm
- * in passing the real URL. But for URLs that do have a file:
- * scheme, we have to send a URL that will work with the old
- * gnome-libs function or nothing will be able to understand
- * it.
- */
- if (!g_str_has_prefix (uri, "file:")) {
- g_string_append (result, uri);
- g_string_append (result, "\r\n");
- } else {
- local_path = g_filename_from_uri (uri, NULL, NULL);
-
- /* Check for characters that confuse the old
- * gnome_uri_list_extract_filenames implementation, and just leave
- * out any paths with those in them.
- */
- if (is_path_that_gnome_uri_list_extract_filenames_can_parse (local_path)) {
- g_string_append (result, "file:");
- g_string_append (result, local_path);
- g_string_append (result, "\r\n");
- }
-
- g_free (local_path);
- }
-}
-#endif
-
static void
add_one_uri (const char *uri, int x, int y, int w, int h, gpointer data)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]