Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/thumbnailer
diff options
context:
space:
mode:
authorNickolay V. Shmyrev <nshmyrev@src.gnome.org>2006-04-02 23:24:26 (GMT)
committer Nickolay V. Shmyrev <nshmyrev@src.gnome.org>2006-04-02 23:24:26 (GMT)
commita4a3a2301361cb6a71e1b127e8e43589f2749105 (patch)
treef70db318215d8b3517999c0ad58407ff366536ef /thumbnailer
parentf0d4f37e3b6a3433c15e1e35236c1ccffeca4bee (diff)
Cleanup mime type detection on document load. Fix for the bug #336448.
* backend/ev-document-factory.c: (get_document_from_uri), (ev_document_factory_get_document): * backend/ev-document-factory.h: * properties/ev-properties-main.c: (ev_properties_get_pages): * shell/Makefile.am: * shell/ev-job-queue.c: (handle_job), (search_for_jobs_unlocked), (no_jobs_available_unlocked), (ev_job_queue_init), (find_queue), (ev_job_queue_remove_job): * shell/ev-job-queue.h: * shell/ev-job-xfer.c: * shell/ev-job-xfer.h: * shell/ev-jobs.c: (ev_job_fonts_init), (ev_job_fonts_class_init), (ev_job_fonts_new), (ev_job_fonts_run), (ev_job_xfer_init), (ev_job_xfer_dispose), (ev_job_xfer_class_init), (ev_job_xfer_new), (ev_job_xfer_run): * shell/ev-jobs.h: * shell/ev-window.c: (ev_window_is_empty), (password_dialog_response), (ev_window_clear_xfer_job), (ev_window_xfer_job_cb), (ev_window_open_uri), (ev_window_cmd_focus_page_selector), (ev_window_cmd_scroll_forward), (ev_window_cmd_scroll_backward), (ev_window_cmd_continuous), (ev_window_cmd_dual), (ev_window_cmd_view_best_fit), (ev_window_cmd_view_page_width), (ev_window_dispose): * thumbnailer/evince-thumbnailer.c: (evince_thumbnail_pngenc_get): * Cleanup mime type detection on document load. Fix for the bug #336448.
Diffstat (limited to 'thumbnailer')
-rw-r--r--thumbnailer/evince-thumbnailer.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/thumbnailer/evince-thumbnailer.c b/thumbnailer/evince-thumbnailer.c
index 8c79ae9..1c0ba0b 100644
--- a/thumbnailer/evince-thumbnailer.c
+++ b/thumbnailer/evince-thumbnailer.c
@@ -36,22 +36,23 @@ evince_thumbnail_pngenc_get (const char *uri, const char *thumbnail, int size)
EvDocument *document = NULL;
GError *error = NULL;
GdkPixbuf *pixbuf;
- char *mime_type = NULL;
- document = ev_document_factory_get_document (uri, &mime_type, &error);
+ document = ev_document_factory_get_document (uri, &error);
- if (document == NULL || error) {
- return FALSE;
- }
-
- if (!ev_document_load (document, uri, &error)) {
+ if (error) {
if (error->domain == EV_DOCUMENT_ERROR &&
- error->code == EV_DOCUMENT_ERROR_ENCRYPTED) {
+ error->code == EV_DOCUMENT_ERROR_ENCRYPTED) {
/* FIXME: Create a thumb for cryp docs */
+ g_error_free (error);
+ return FALSE;
}
g_error_free (error);
return FALSE;
}
+
+ if (document == NULL) {
+ return FALSE;
+ }
if (!EV_IS_DOCUMENT_THUMBNAILS (document)) {
return FALSE;