[nautilus/gnome-3-30] Revert "files-view: Re-add _NETSCAPE_URL drop support"
- From: Carlos Soriano <csoriano src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus/gnome-3-30] Revert "files-view: Re-add _NETSCAPE_URL drop support"
- Date: Wed, 21 Nov 2018 15:08:06 +0000 (UTC)
commit 3449df1e701a44f2a564a56e8192ee04475d6360
Author: Carlos Soriano <csoriano1618 gmail com>
Date: Wed Nov 21 15:07:50 2018 +0000
Revert "files-view: Re-add _NETSCAPE_URL drop support"
This reverts commit 493b6e471ec42813305c585c8149b52da5e8d4a9
src/nautilus-canvas-view.c | 14 ---------
src/nautilus-files-view-dnd.c | 68 -------------------------------------------
src/nautilus-files-view-dnd.h | 4 ---
3 files changed, 86 deletions(-)
---
diff --git a/src/nautilus-canvas-view.c b/src/nautilus-canvas-view.c
index 4ee8d6ea3..7552e2b34 100644
--- a/src/nautilus-canvas-view.c
+++ b/src/nautilus-canvas-view.c
@@ -1434,18 +1434,6 @@ canvas_view_handle_uri_list (NautilusCanvasContainer *container,
item_uris, target_uri, action);
}
-/* Handles an URL received from Mozilla */
-static void
-canvas_view_handle_netscape_url (NautilusCanvasContainer *container,
- const char *encoded_url,
- const char *target_uri,
- GdkDragAction action,
- NautilusCanvasView *view)
-{
- nautilus_files_view_handle_netscape_url_drop (NAUTILUS_FILES_VIEW (view),
- encoded_url, target_uri, action);
-}
-
static void
canvas_view_handle_text (NautilusCanvasContainer *container,
const char *text,
@@ -1626,8 +1614,6 @@ nautilus_canvas_view_init (NautilusCanvasView *canvas_view)
g_signal_connect_object (canvas_container, "handle-uri-list",
G_CALLBACK (canvas_view_handle_uri_list), canvas_view, 0);
- g_signal_connect_object (canvas_container, "handle-netscape-url",
- G_CALLBACK (canvas_view_handle_netscape_url), canvas_view, 0);
g_signal_connect_object (canvas_container, "handle-text",
G_CALLBACK (canvas_view_handle_text), canvas_view, 0);
g_signal_connect_object (canvas_container, "handle-raw",
diff --git a/src/nautilus-files-view-dnd.c b/src/nautilus-files-view-dnd.c
index d5b4c21c8..9a3a76b35 100644
--- a/src/nautilus-files-view-dnd.c
+++ b/src/nautilus-files-view-dnd.c
@@ -43,74 +43,6 @@
#define GET_ANCESTOR(obj) \
GTK_WINDOW (gtk_widget_get_ancestor (GTK_WIDGET (obj), GTK_TYPE_WINDOW))
-void
-nautilus_files_view_handle_netscape_url_drop (NautilusFilesView *view,
- const char *encoded_url,
- const char *target_uri,
- GdkDragAction action)
-{
- char *url;
- char **bits;
- GList *uri_list = NULL;
- GFile *f;
-
- f = g_file_new_for_uri (target_uri);
-
- if (!g_file_is_native (f))
- {
- show_dialog (_("Drag and drop is not supported."),
- _("Drag and drop is only supported on local file systems."),
- GET_ANCESTOR (view),
- GTK_MESSAGE_WARNING);
- g_object_unref (f);
- return;
- }
-
- g_object_unref (f);
-
- /* _NETSCAPE_URL_ works like this: $URL\n$TITLE */
- bits = g_strsplit (encoded_url, "\n", 0);
- switch (g_strv_length (bits))
- {
- case 0:
- {
- g_strfreev (bits);
- return;
- }
-
- default:
- {
- url = bits[0];
- }
- }
-
- f = g_file_new_for_uri (url);
-
- /* We don't support GDK_ACTION_ASK or GDK_ACTION_PRIVATE
- * and we don't support combinations either. */
- if ((action != GDK_ACTION_DEFAULT) &&
- (action != GDK_ACTION_COPY) &&
- (action != GDK_ACTION_MOVE))
- {
- show_dialog (_("Drag and drop is not supported."),
- _("An invalid drag type was used."),
- GET_ANCESTOR (view),
- GTK_MESSAGE_WARNING);
- return;
- }
-
- uri_list = g_list_append (uri_list, url);
-
- nautilus_files_view_move_copy_items (view, uri_list,
- target_uri,
- action);
-
- g_list_free (uri_list);
-
- g_object_unref (f);
- g_strfreev (bits);
-}
-
void
nautilus_files_view_handle_uri_list_drop (NautilusFilesView *view,
const char *item_uris,
diff --git a/src/nautilus-files-view-dnd.h b/src/nautilus-files-view-dnd.h
index 73b9263a7..9cde15485 100644
--- a/src/nautilus-files-view-dnd.h
+++ b/src/nautilus-files-view-dnd.h
@@ -44,10 +44,6 @@ void nautilus_files_view_handle_raw_drop (NautilusFilesView *view,
GdkDragAction action);
void nautilus_files_view_handle_hover (NautilusFilesView *view,
const char *target_uri);
-void nautilus_files_view_handle_netscape_url_drop (NautilusFilesView *view,
- const char *encoded_url,
- const char *target_uri,
- GdkDragAction action);
void nautilus_files_view_drop_proxy_received_uris (NautilusFilesView *view,
const GList *uris,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]