mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2025-01-15 23:00:08 +00:00
clipboard: Add the useful stuff from reverted commit
This is the parts ofdc50e0637f
that should have been committed but were reverted inb5c62cf86f
to unbreak the build.
This commit is contained in:
parent
0d31eb8670
commit
234d34366a
@ -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)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user