Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/shell/ev-window.c
diff options
context:
space:
mode:
authorJonathan Blandford <jrb@redhat.com>2004-12-24 05:50:50 (GMT)
committer Jonathan Blandford <jrb@src.gnome.org>2004-12-24 05:50:50 (GMT)
commit51a7800b9832073f1b1c640d7991e6495b2614e0 (patch)
treeddacc73cc5ab659e1e35e8f43168ba809a3bf281 /shell/ev-window.c
parent176d4c0222a6fbe93f91246065becace89c624d4 (diff)
* backend/ev-document-bookmarks.h: * pdf/xpdf/Makefile.am: *
Fri Dec 24 00:48:44 2004 Jonathan Blandford <jrb@redhat.com> * backend/ev-document-bookmarks.c: (ev_document_bookmarks_get_child): * backend/ev-document-bookmarks.h: * pdf/xpdf/Makefile.am: * pdf/xpdf/pdf-document.cc: * pdf/xpdf/pdf-document.h: * shell/Makefile.am: * shell/ev-sidebar-bookmarks.c: (ev_sidebar_bookmarks_destroy), (ev_sidebar_bookmarks_class_init), (ev_sidebar_bookmarks_construct), (stack_data_free), (do_one_iteration), (populate_bookmarks_idle), (ev_sidebar_bookmarks_clear_document), (ev_sidebar_bookmarks_set_document): * shell/ev-sidebar-bookmarks.h: * shell/ev-sidebar.c: (ev_sidebar_add_page), (ev_sidebar_set_document): * shell/ev-window.c: (ev_window_open): Initial stab at a bookmarks sidebar. It doesn't navigate yet, but it displays both the topics and the page numbers.
Diffstat (limited to 'shell/ev-window.c')
-rw-r--r--shell/ev-window.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/shell/ev-window.c b/shell/ev-window.c
index 2c7676f..0fa9592 100644
--- a/shell/ev-window.c
+++ b/shell/ev-window.c
@@ -257,7 +257,9 @@ ev_window_open (EvWindow *ev_window, const char *uri)
mime_type = gnome_vfs_get_mime_type (uri);
- if (!strcmp (mime_type, "application/pdf"))
+ if (mime_type == NULL)
+ document = NULL;
+ else if (!strcmp (mime_type, "application/pdf"))
document = g_object_new (PDF_TYPE_DOCUMENT, NULL);
else if (!strcmp (mime_type, "application/postscript"))
document = g_object_new (GTK_GS_TYPE, NULL);
@@ -289,7 +291,7 @@ ev_window_open (EvWindow *ev_window, const char *uri)
char *error_message;
error_message = g_strdup_printf (_("Unhandled MIME type: '%s'"),
- mime_type);
+ mime_type?mime_type:"<Unknown MIME Type>");
unable_to_load (ev_window, error_message);
g_free (error_message);
}