X-Git-Url: https://www.fi.muni.cz/~kas/git//home/kas/public_html/git/?a=blobdiff_plain;f=thumbnailer%2Fevince-thumbnailer.c;h=c4a02cb6b7193c31374a6c03fae05e520265a9d8;hb=27a43b9586896427e70a7423c7527337d9f56240;hp=37242a1fb1e472b95b14b3b62efc7f98b60a03f5;hpb=f8e8cdb811022b5eab8845ca5e670a2aa3c4c123;p=evince.git diff --git a/thumbnailer/evince-thumbnailer.c b/thumbnailer/evince-thumbnailer.c index 37242a1f..c4a02cb6 100644 --- a/thumbnailer/evince-thumbnailer.c +++ b/thumbnailer/evince-thumbnailer.c @@ -33,17 +33,13 @@ static gboolean evince_thumbnail_pngenc_get (const char *uri, const char *thumbnail, int size) { EvDocument *document = NULL; - char *mime_type; GError *error = NULL; GdkPixbuf *pixbuf; GType document_type; + char *mime_type = NULL; - mime_type = gnome_vfs_get_mime_type (uri); - if (mime_type == NULL) - return FALSE; - - document_type = ev_document_type_lookup (mime_type); - if (document_type==G_TYPE_INVALID) + document_type = ev_document_type_lookup (uri, &mime_type, &error); + if (document_type == G_TYPE_INVALID || error != NULL) return FALSE; document = g_object_new (document_type, NULL); @@ -67,7 +63,7 @@ evince_thumbnail_pngenc_get (const char *uri, const char *thumbnail, int size) if (pixbuf != NULL) { const char *overlaid_icon_name = NULL; - if (strcmp(mime_type,"application/pdf")==0) { + if (strcmp (mime_type, "application/pdf") == 0) { overlaid_icon_name = "pdf-icon.png"; }