Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/thumbnailer
diff options
context:
space:
mode:
authorMarco Pesenti Gritti <mpg@redhat.com>2005-05-08 18:26:01 (GMT)
committer Marco Pesenti Gritti <marco@src.gnome.org>2005-05-08 18:26:01 (GMT)
commita5e3f1314e7e27fb0e765b3b9b8e1deb92c7c536 (patch)
tree877ee4110e50389f75507166a092d0a9c0049d51 /thumbnailer
parentb9898930ba07edc66523a753de8dd5a4f69703dd (diff)
Change api to lookup from uri. Do fast lookup first, if the type is
2005-05-08 Marco Pesenti Gritti <mpg@redhat.com> * shell/ev-document-types.c: (get_slow_mime_type), (get_document_type_from_mime), (ev_document_type_lookup): * shell/ev-document-types.h: Change api to lookup from uri. Do fast lookup first, if the type is unknown try with data sniffing. * shell/ev-window.c: (ev_window_open), (ev_window_open_uri_list): * thumbnailer/evince-thumbnailer.c: (evince_thumbnail_pngenc_get): Adapt to api change
Diffstat (limited to 'thumbnailer')
-rw-r--r--thumbnailer/evince-thumbnailer.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/thumbnailer/evince-thumbnailer.c b/thumbnailer/evince-thumbnailer.c
index 37242a1..dfa521b 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);
+ if (document_type == G_TYPE_INVALID)
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";
}