diff options
author | Marco Pesenti Gritti <marco@gnome.org> | 2005-02-01 17:21:15 (GMT) |
---|---|---|
committer | Marco Pesenti Gritti <marco@src.gnome.org> | 2005-02-01 17:21:15 (GMT) |
commit | e6bb7c7e25b848008409db982bbac260fa97f73c (patch) | |
tree | 7242c32dea97f6840c52a81fb2ec3d6be817f272 /shell | |
parent | 1cf7013b89fc6908a15f82e6425de4142f86f1ee (diff) |
Support eps and check document supports find before drawing highlightings
2005-02-01 Marco Pesenti Gritti <marco@gnome.org>
* shell/ev-application.c: (ev_application_open):
* shell/ev-view.c: (expose_bin_window):
* shell/ev-window.c: (ev_window_open):
Support eps and check document supports find
before drawing highlightings in expose.
Diffstat (limited to 'shell')
-rw-r--r-- | shell/ev-application.c | 2 | ||||
-rw-r--r-- | shell/ev-view.c | 4 | ||||
-rw-r--r-- | shell/ev-window.c | 3 |
3 files changed, 7 insertions, 2 deletions
diff --git a/shell/ev-application.c b/shell/ev-application.c index 6664c6a..eabcea7 100644 --- a/shell/ev-application.c +++ b/shell/ev-application.c @@ -129,12 +129,14 @@ ev_application_open (EvApplication *application, GError *err) gtk_file_filter_set_name (both_filter, _("PostScript and PDF Documents")); gtk_file_filter_add_mime_type (both_filter, "application/postscript"); + gtk_file_filter_add_mime_type (both_filter, "image/x-eps"); gtk_file_filter_add_mime_type (both_filter, "application/pdf"); gtk_file_chooser_add_filter (GTK_FILE_CHOOSER (chooser), both_filter); ps_filter = gtk_file_filter_new (); gtk_file_filter_set_name (ps_filter, _("PostScript Documents")); gtk_file_filter_add_mime_type (ps_filter, "application/postscript"); + gtk_file_filter_add_mime_type (ps_filter, "image/x-eps"); gtk_file_chooser_add_filter (GTK_FILE_CHOOSER (chooser), ps_filter); pdf_filter = gtk_file_filter_new (); diff --git a/shell/ev-view.c b/shell/ev-view.c index 947feef..291b3c5 100644 --- a/shell/ev-view.c +++ b/shell/ev-view.c @@ -411,7 +411,9 @@ expose_bin_window (GtkWidget *widget, event->area.x, event->area.y, event->area.width, event->area.height); - highlight_find_results (view); + if (EV_IS_DOCUMENT_FIND (view->document)) { + highlight_find_results (view); + } if (view->has_selection) { draw_rubberband (widget, view->bin_window, diff --git a/shell/ev-window.c b/shell/ev-window.c index 9364c99..9eadc55 100644 --- a/shell/ev-window.c +++ b/shell/ev-window.c @@ -482,7 +482,8 @@ ev_window_open (EvWindow *ev_window, const char *uri) document = NULL; else if (!strcmp (mime_type, "application/pdf")) document = g_object_new (PDF_TYPE_DOCUMENT, NULL); - else if (!strcmp (mime_type, "application/postscript")) + else if (!strcmp (mime_type, "application/postscript") || + !strcmp (mime_type, "image/x-eps")) document = g_object_new (PS_TYPE_DOCUMENT, NULL); else if (mime_type_supported_by_gdk_pixbuf (mime_type)) document = g_object_new (PIXBUF_TYPE_DOCUMENT, NULL); |