summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorBenjamin Otte <otte@redhat.com>2017-12-02 14:38:57 +0100
committerBenjamin Otte <otte@redhat.com>2017-12-03 05:46:49 +0100
commit18bf0eb61a00e05e7db0975811650786b595dff2 (patch)
tree9499b892368288bb636fc9fe3db03d90c0279638 /tests
parenta34836f35bc619aea82ccc50ee019a0ec55dc1dc (diff)
downloadgtk+-18bf0eb61a00e05e7db0975811650786b595dff2.tar.gz
clipboard: Change image convenience APIs
Don't use pixbufs anymore, use textures.
Diffstat (limited to 'tests')
-rw-r--r--tests/testclipboard2.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/tests/testclipboard2.c b/tests/testclipboard2.c
index cd72696f20..5bbe112183 100644
--- a/tests/testclipboard2.c
+++ b/tests/testclipboard2.c
@@ -33,23 +33,23 @@ clipboard_changed_cb (GdkClipboard *clipboard,
}
static void
-pixbuf_loaded_cb (GObject *clipboard,
+texture_loaded_cb (GObject *clipboard,
GAsyncResult *res,
gpointer data)
{
GError *error = NULL;
- GdkPixbuf *pixbuf;
+ GdkTexture *texture;
- pixbuf = gdk_clipboard_read_pixbuf_finish (GDK_CLIPBOARD (clipboard), res, &error);
- if (pixbuf == NULL)
+ texture = gdk_clipboard_read_texture_finish (GDK_CLIPBOARD (clipboard), res, &error);
+ if (texture == NULL)
{
g_print ("%s\n", error->message);
g_error_free (error);
return;
}
- gtk_image_set_from_pixbuf (data, pixbuf);
- g_object_unref (pixbuf);
+ gtk_image_set_from_texture (data, texture);
+ g_object_unref (texture);
}
static void
@@ -87,10 +87,10 @@ visible_child_changed_cb (GtkWidget *stack,
{
GtkWidget *image = gtk_stack_get_child_by_name (GTK_STACK (stack), "image");
- gdk_clipboard_read_pixbuf_async (clipboard,
- NULL,
- pixbuf_loaded_cb,
- image);
+ gdk_clipboard_read_texture_async (clipboard,
+ NULL,
+ texture_loaded_cb,
+ image);
}
else if (g_str_equal (visible_child, "text"))
{