]> www.fi.muni.cz Git - evince.git/blobdiff - thumbnailer/evince-thumbnailer.c
Add EvPage so that we can hold a reference to the backend page. Form
[evince.git] / thumbnailer / evince-thumbnailer.c
index 8960f18065ff9bad665ebaed9a6bcfd8e2c3b1dc..b3c8285ee3d83debba1e41578b18f0f4a7a21124 100644 (file)
@@ -65,13 +65,17 @@ evince_thumbnail_pngenc_get (EvDocument *document, const char *thumbnail, int si
        EvRenderContext *rc;
        double width, height;
        GdkPixbuf *pixbuf;
+       EvPage *page;
 
-       ev_document_get_page_size (document, 0, &width, &height);
+       page = ev_document_get_page (document, 0);
+       
+       ev_document_get_page_size (document, page, &width, &height);
 
-       rc = ev_render_context_new (0, 0, size / width);
+       rc = ev_render_context_new (page, 0, size / width);
        pixbuf = ev_document_thumbnails_get_thumbnail (EV_DOCUMENT_THUMBNAILS (document),
                                                       rc, FALSE);
        g_object_unref (rc);
+       g_object_unref (page);
        
        if (pixbuf != NULL) {
                const char *overlaid_icon_name = NULL;