From: Marco Pesenti Gritti Date: Tue, 1 Feb 2005 17:21:15 +0000 (+0000) Subject: Support eps and check document supports find before drawing highlightings X-Git-Tag: EVINCE_0_1_3~13 X-Git-Url: https://www.fi.muni.cz/~kas/git//home/kas/public_html/git/?a=commitdiff_plain;h=e6bb7c7e25b848008409db982bbac260fa97f73c;p=evince.git Support eps and check document supports find before drawing highlightings 2005-02-01 Marco Pesenti Gritti * 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. --- diff --git a/ChangeLog b/ChangeLog index 60494d18..52bdc766 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2005-02-01 Marco Pesenti Gritti + + * 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 * pixbuf/pixbuf-document.c: diff --git a/shell/ev-application.c b/shell/ev-application.c index 6664c6a8..eabcea7f 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 947feeff..291b3c5d 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 9364c99a..9eadc552 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);