From ec2aa10ab1ec9246d6c35b90f5d1df372f39c732 Mon Sep 17 00:00:00 2001 From: Havoc Pennington Date: Thu, 23 Dec 2004 03:09:00 +0000 Subject: display an error if the document doesn't support find (better ideas?) 2004-12-22 Havoc Pennington * shell/ev-window.c (ev_window_cmd_edit_find): display an error if the document doesn't support find (better ideas?) (find_bar_search_changed_cb): handle missing document or document that doesn't support find * pdf/xpdf/pdf-document.cc: port to implement the new EvDocumentFindIface * backend/ev-document-find.c: create a new interface for searching * backend/ev-document.h, backend/ev-document.c: delete the find stuff --- (limited to 'backend/ev-document.c') diff --git a/backend/ev-document.c b/backend/ev-document.c index 2f50dcc..59697bd 100644 --- a/backend/ev-document.c +++ b/backend/ev-document.c @@ -21,7 +21,7 @@ #include "config.h" #include "ev-document.h" -#include "ev-backend-marshal.c" +#include "ev-backend-marshalers.h" static void ev_document_base_init (gpointer g_class); @@ -50,22 +50,7 @@ ev_document_get_type (void) static void ev_document_base_init (gpointer g_class) { - static gboolean initialized = FALSE; - - if (!initialized) { - g_signal_new ("found", - EV_TYPE_DOCUMENT, - G_SIGNAL_RUN_LAST, - G_STRUCT_OFFSET (EvDocumentIface, found), - NULL, NULL, - _ev_backend_marshal_VOID__POINTER_INT_DOUBLE, - G_TYPE_NONE, 3, - G_TYPE_POINTER, - G_TYPE_INT, - G_TYPE_DOUBLE); - - initialized = TRUE; - } + } gboolean @@ -143,31 +128,4 @@ ev_document_render (EvDocument *document, EvDocumentIface *iface = EV_DOCUMENT_GET_IFACE (document); iface->render (document, clip_x, clip_y, clip_width, clip_height); } - -void -ev_document_begin_find (EvDocument *document, - const char *search_string, - gboolean case_sensitive) -{ - EvDocumentIface *iface = EV_DOCUMENT_GET_IFACE (document); - iface->begin_find (document, search_string, case_sensitive); -} - -void -ev_document_end_find (EvDocument *document) -{ - EvDocumentIface *iface = EV_DOCUMENT_GET_IFACE (document); - iface->end_find (document); -} - -void -ev_document_found (EvDocument *document, - const EvFindResult *results, - int n_results, - double percent_complete) -{ - g_signal_emit_by_name (document, - "found", - results, n_results, percent_complete); -} -- cgit v0.9.1