[nautilus/wip/corey/dnd_features] files-view-dnd: Remove code for NETSCAPE_URL
- From: Corey Berla <coreyberla src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus/wip/corey/dnd_features] files-view-dnd: Remove code for NETSCAPE_URL
- Date: Thu, 18 Aug 2022 20:36:26 +0000 (UTC)
commit e43a5e64f36fc59d958fd0a0f5f2b26c3b31c153
Author: Corey Berla <corey berla me>
Date: Thu Aug 18 13:34:02 2022 -0700
files-view-dnd: Remove code for NETSCAPE_URL
This logic is handled within GtkDropTarget in gtk4.
src/nautilus-files-view-dnd.c | 64 -------------------------------------------
src/nautilus-files-view-dnd.h | 4 ---
2 files changed, 68 deletions(-)
---
diff --git a/src/nautilus-files-view-dnd.c b/src/nautilus-files-view-dnd.c
index c75ccb133..5d3220d37 100644
--- a/src/nautilus-files-view-dnd.c
+++ b/src/nautilus-files-view-dnd.c
@@ -43,70 +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);
-
- if ((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]