Commit 234d3436 authored by Benjamin Otte's avatar Benjamin Otte

clipboard: Add the useful stuff from reverted commit

This is the parts of dc50e063 that
should have been committed but were reverted in
b5c62cf8 to unbreak the build.
parent 0d31eb86
......@@ -1306,6 +1306,9 @@ gdk_clipboard_read_texture_finish
gdk_clipboard_read_text_async
gdk_clipboard_read_text_finish
gdk_clipboard_set_content
gdk_clipboard_set
gdk_clipboard_set_valist
gdk_clipboard_set_value
gdk_clipboard_set_text
gdk_clipboard_set_texture
......
......@@ -1668,19 +1668,10 @@ copy_file_location_cb (GSimpleAction *action,
if (selected_files)
{
GdkClipboard *clipboard;
GdkContentProvider *provider;
GValue value = G_VALUE_INIT;
clipboard = gtk_widget_get_clipboard (GTK_WIDGET (impl));
g_value_init (&value, GDK_TYPE_FILE_LIST);
g_value_take_boxed (&value, selected_files);
provider = gdk_content_provider_new_for_value (&value);
g_value_unset (&value);
gdk_clipboard_set_content (clipboard, provider);
g_object_unref (provider);
gdk_clipboard_set (clipboard, GDK_TYPE_FILE_LIST, selected_files);
g_slist_free_full (selected_files, g_object_unref);
}
}
......
......@@ -3927,19 +3927,10 @@ cut_or_copy (GtkTextBuffer *buffer,
if (!gtk_text_iter_equal (&start, &end))
{
GtkTextBuffer *contents;
GdkContentProvider *provider;
GValue value = G_VALUE_INIT;
contents = create_clipboard_contents_buffer (buffer, &start, &end);
g_value_init (&value, GTK_TYPE_TEXT_BUFFER);
g_value_take_object (&value, contents);
provider = gdk_content_provider_new_for_value (&value);
g_value_unset (&value);
gdk_clipboard_set_content (clipboard, provider);
g_object_unref (provider);
gdk_clipboard_set (clipboard, GTK_TYPE_TEXT_BUFFER, contents);
g_object_unref (contents);
if (delete_region_after)
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment