summaryrefslogtreecommitdiff
path: root/tests/print-editor.c
diff options
context:
space:
mode:
authorEmmanuele Bassi <ebassi@gnome.org>2016-06-07 17:06:47 +0100
committerEmmanuele Bassi <ebassi@gnome.org>2016-06-09 17:45:40 +0100
commitad78daaf8081d8ea72006832ee3dd5df2e1ed3f9 (patch)
tree6f398f79f75953c2a06f1df20478c90cf04adaf3 /tests/print-editor.c
parent2d38c40f789ecc5df4de0720c13496eee0429cd7 (diff)
downloadgtk+-ad78daaf8081d8ea72006832ee3dd5df2e1ed3f9.tar.gz
gdk: Deprecate gdk_cairo_create()
We have GdkDrawingContext, now, which is in charge of creating Cairo contexts for drawing on a GdkWindow. https://bugzilla.gnome.org/show_bug.cgi?id=766675
Diffstat (limited to 'tests/print-editor.c')
-rw-r--r--tests/print-editor.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/print-editor.c b/tests/print-editor.c
index a0ea80ce1f..fe67e51c87 100644
--- a/tests/print-editor.c
+++ b/tests/print-editor.c
@@ -423,7 +423,9 @@ preview_got_page_size (GtkPrintOperationPreview *preview,
w = gtk_paper_size_get_width (paper_size, GTK_UNIT_INCH);
h = gtk_paper_size_get_height (paper_size, GTK_UNIT_INCH);
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
cr = gdk_cairo_create (gtk_widget_get_window (pop->area));
+G_GNUC_END_IGNORE_DEPRECATIONS
gtk_widget_get_allocation (pop->area, &allocation);
dpi_x = allocation.width/w;
@@ -500,7 +502,10 @@ preview_cb (GtkPrintOperation *op,
gtk_widget_realize (da);
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
cr = gdk_cairo_create (gtk_widget_get_window (da));
+G_GNUC_END_IGNORE_DEPRECATIONS
+
/* TODO: What dpi to use here? This will be used for pagination.. */
gtk_print_context_set_cairo_context (context, cr, 72, 72);
cairo_destroy (cr);