]> www.fi.muni.cz Git - evince.git/commitdiff
Support eps and check document supports find before drawing highlightings
authorMarco Pesenti Gritti <marco@gnome.org>
Tue, 1 Feb 2005 17:21:15 +0000 (17:21 +0000)
committerMarco Pesenti Gritti <marco@src.gnome.org>
Tue, 1 Feb 2005 17:21:15 +0000 (17:21 +0000)
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.

ChangeLog
shell/ev-application.c
shell/ev-view.c
shell/ev-window.c

index 60494d185964866db5993e4c108aed67f43fdb24..52bdc766bcd7b0afdfdd06467d32a6bfde23f993 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+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.
+
 2005-01-13  Jeff Muizelaar  <jeff@nit.ca>
 
        * pixbuf/pixbuf-document.c:
index 6664c6a8a79bf2c0332fdc42245a3376e1dbf778..eabcea7f53eb45b136f8826e57204c71bea73ee1 100644 (file)
@@ -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 ();
index 947feeff1edbed0fe2f99a2c461dd811acfa3b01..291b3c5d125d5e77d6f61f487593e6c4dfa701c9 100644 (file)
@@ -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,
index 9364c99abc353d4cf8ad0ce466d3854cb8fc457c..9eadc5529a55f03ad462fc3f6c996caa1d50c7be 100644 (file)
@@ -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);