aboutsummaryrefslogtreecommitdiffstats
path: root/lib/widgets/ephy-node-view.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/widgets/ephy-node-view.c')
-rw-r--r--lib/widgets/ephy-node-view.c57
1 files changed, 2 insertions, 55 deletions
diff --git a/lib/widgets/ephy-node-view.c b/lib/widgets/ephy-node-view.c
index 3681fe169..9b0f4a5d4 100644
--- a/lib/widgets/ephy-node-view.c
+++ b/lib/widgets/ephy-node-view.c
@@ -30,7 +30,6 @@
#include <gtk/gtktreemodelfilter.h>
#include <gtk/gtkwindow.h>
#include <gdk/gdkkeysyms.h>
-#include <libgnomevfs/gnome-vfs-uri.h>
#include "ephy-node-view.h"
#include "ephy-tree-model-sort.h"
@@ -38,6 +37,7 @@
#include "ephy-dnd.h"
#include "ephy-gui.h"
#include "ephy-marshal.h"
+#include "ephy-string.h"
#include "string.h"
static void ephy_node_view_class_init (EphyNodeViewClass *klass);
@@ -360,58 +360,6 @@ drag_leave_cb (GtkWidget *widget,
remove_scroll_timeout (view);
}
-/* taken from libgnomevfs/gnome-vfs-uri.c */
-static GList*
-uri_list_parse (const gchar* uri_list)
-{
- /* Note that this is mostly very stolen from old libgnome/gnome-mime.c */
-
- const gchar *p, *q;
- gchar *retval;
- GList *result = NULL;
-
- g_return_val_if_fail (uri_list != NULL, NULL);
-
- p = uri_list;
-
- /* We don't actually try to validate the URI according to RFC
- * 2396, or even check for allowed characters - we just ignore
- * comments and trim whitespace off the ends. We also
- * allow LF delimination as well as the specified CRLF.
- */
- while (p != NULL) {
- if (*p != '#') {
- while (g_ascii_isspace (*p))
- p++;
-
- q = p;
- while ((*q != '\0')
- && (*q != '\n')
- && (*q != '\r'))
- q++;
-
- if (q > p) {
- q--;
- while (q > p
- && g_ascii_isspace (*q))
- q--;
-
- retval = g_malloc (q - p + 2);
- strncpy (retval, p, q - p + 1);
- retval[q - p + 1] = '\0';
-
- if (retval[0] != '\0')
- result = g_list_prepend (result, retval);
- }
- }
- p = strchr (p, '\n');
- if (p != NULL)
- p++;
- }
-
- return g_list_reverse (result);
-}
-
static void
drag_data_received_cb (GtkWidget *widget,
GdkDragContext *context,
@@ -452,7 +400,7 @@ drag_data_received_cb (GtkWidget *widget,
node = get_node_from_path (view, path);
- uris = uri_list_parse (selection_data->data);
+ uris = ephy_string_parse_uri_list (selection_data->data);
if (uris != NULL)
{
@@ -1716,4 +1664,3 @@ ephy_node_view_class_init (EphyNodeViewClass *klass)
g_type_class_add_private (object_class, sizeof (EphyNodeViewPrivate));
}
-