Updating branch refs/heads/master to ec8cb7a97b514da6393f0498482ec99815627f2a (commit) from f4bec8435820113274fde0b6c69b1a364ea5b1d8 (commit)
commit ec8cb7a97b514da6393f0498482ec99815627f2a Author: Vincent Untz <vu...@gnome.org> Date: Tue Sep 20 11:37:35 2011 +0200 Do not use API removed from poppler >= 0.17 Signed-off-by: Jannis Pohlmann <jan...@xfce.org> plugins/poppler-thumbnailer/poppler-thumbnailer.c | 13 +++++++++++-- 1 files changed, 11 insertions(+), 2 deletions(-) diff --git a/plugins/poppler-thumbnailer/poppler-thumbnailer.c b/plugins/poppler-thumbnailer/poppler-thumbnailer.c index 7769273..3cb70cb 100644 --- a/plugins/poppler-thumbnailer/poppler-thumbnailer.c +++ b/plugins/poppler-thumbnailer/poppler-thumbnailer.c @@ -241,6 +241,7 @@ poppler_thumbnailer_create (TumblerAbstractThumbnailer *thumbnailer, PopplerDocument *document; PopplerPage *page; const gchar *uri; + cairo_surface_t *surface; GdkPixbuf *source_pixbuf; GdkPixbuf *pixbuf; GError *error = NULL; @@ -326,9 +327,17 @@ poppler_thumbnailer_create (TumblerAbstractThumbnailer *thumbnailer, flavor = tumbler_thumbnail_get_flavor (thumbnail); /* try to extract the embedded thumbnail */ - source_pixbuf = poppler_page_get_thumbnail_pixbuf (page); + surface = poppler_page_get_thumbnail (page); - if (source_pixbuf == NULL) + if (surface != NULL) + { + source_pixbuf = gdk_pixbuf_new (GDK_COLORSPACE_RGB, TRUE, 8, + cairo_image_surface_get_width (surface), + cairo_image_surface_get_height (surface)); + copy_surface_to_pixbuf (surface, source_pixbuf); + cairo_surface_destroy (surface); + } + else { /* fall back to rendering the page ourselves */ poppler_page_get_size (page, &page_width, &page_height); _______________________________________________ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits