diff options
author | António Fernandes <antoniof@gnome.org> | 2020-07-18 22:01:20 +0100 |
---|---|---|
committer | António Fernandes <antoniojpfernandes@gmail.com> | 2021-03-07 11:12:20 +0000 |
commit | 2045f662f26891f5bb8c7ab0a7763227fe5fdf78 (patch) | |
tree | 8e1660cc592e7911159af8eb6d4a30d08294f790 /src/nautilus-canvas-view.c | |
parent | 7834de2671356f7074940644c149b81bd655a3b1 (diff) | |
download | nautilus-2045f662f26891f5bb8c7ab0a7763227fe5fdf78.tar.gz |
Revert "clipboard: Use text based clipboard only"
After removing the non-default "icons on desktop" functionality from
nautilus, a gnome-shell extension was created as a substitute. This
extension needed to interoperate with nautilus for file operations,
but its access to clipboard was limited to plain text, so, in order to
ensure interoperation, nautilus had to use plain text clipboard only.
However, this temporary regression resulted in implementation details
leaking into the text clipboard, instead of a plain file path.
But now St.Clipboard can handle any type of clipboard content[1], the
extension will be able to handle any clipboard type, so we can finally
fix this regression on our side.
This reverts commit 1f77023b5769c773dd9261e5294c0738bf6a3115
and its fixup commit be53569b339b4494647758a9afa0fdd30184455b
Fixes https://gitlab.gnome.org/GNOME/nautilus/-/issues/634
[1] GNOME/gnome-shell@ec367623
Diffstat (limited to 'src/nautilus-canvas-view.c')
-rw-r--r-- | src/nautilus-canvas-view.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/nautilus-canvas-view.c b/src/nautilus-canvas-view.c index 144deb06b..c4e747e3c 100644 --- a/src/nautilus-canvas-view.c +++ b/src/nautilus-canvas-view.c @@ -540,9 +540,9 @@ nautilus_canvas_view_begin_loading (NautilusFilesView *view) } static void -on_clipboard_contents_received (GtkClipboard *clipboard, - const gchar *selection_data, - gpointer user_data) +on_clipboard_contents_received (GtkClipboard *clipboard, + GtkSelectionData *selection_data, + gpointer user_data) { NautilusCanvasView *canvas_view; @@ -581,9 +581,10 @@ static void update_clipboard_status (NautilusCanvasView *view) { g_object_ref (view); /* Need to keep the object alive until we get the reply */ - gtk_clipboard_request_text (nautilus_clipboard_get (GTK_WIDGET (view)), - on_clipboard_contents_received, - view); + gtk_clipboard_request_contents (nautilus_clipboard_get (GTK_WIDGET (view)), + nautilus_clipboard_get_atom (), + on_clipboard_contents_received, + view); } static void |