diff options
author | Benjamin Otte <otte@redhat.com> | 2017-11-28 02:09:21 +0100 |
---|---|---|
committer | Benjamin Otte <otte@redhat.com> | 2017-12-03 05:46:48 +0100 |
commit | f53848c3606a9c46bcb3a0e568f36e573bdf84da (patch) | |
tree | b1dd4a727486e33abcf40401208c94c6b2f547fa /examples/plugman.c | |
parent | 4e06aaeaa8de2f01e28f68f41c442b6dd66482db (diff) | |
download | gtk+-f53848c3606a9c46bcb3a0e568f36e573bdf84da.tar.gz |
textview: Redo clipboard handling
Instead of using GtkClipboard and handling everything ourselves, we now
put GtkTextBuffer into the GdkClipboard and register (de)serializers for
text/plain.
Diffstat (limited to 'examples/plugman.c')
-rw-r--r-- | examples/plugman.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/examples/plugman.c b/examples/plugman.c index 8605587779..67d7960c5d 100644 --- a/examples/plugman.c +++ b/examples/plugman.c @@ -38,12 +38,6 @@ change_fullscreen_state (GSimpleAction *action, g_simple_action_set_state (action, state); } -static GtkClipboard * -get_clipboard (GtkWidget *widget) -{ - return gtk_widget_get_old_clipboard (widget, gdk_atom_intern_static_string ("CLIPBOARD")); -} - static void window_copy (GSimpleAction *action, GVariant *parameter, @@ -53,7 +47,7 @@ window_copy (GSimpleAction *action, GtkTextView *text = g_object_get_data ((GObject*)window, "plugman-text"); gtk_text_buffer_copy_clipboard (gtk_text_view_get_buffer (text), - get_clipboard ((GtkWidget*) text)); + gtk_widget_get_clipboard (GTK_WIDGET (text))); } static void @@ -65,7 +59,7 @@ window_paste (GSimpleAction *action, GtkTextView *text = g_object_get_data ((GObject*)window, "plugman-text"); gtk_text_buffer_paste_clipboard (gtk_text_view_get_buffer (text), - get_clipboard ((GtkWidget*) text), + gtk_widget_get_clipboard (GTK_WIDGET (text)), NULL, TRUE); |