From 1561766454d8a06d887da5c2955b8c4d1dddd9a3 Mon Sep 17 00:00:00 2001 From: Marco Pesenti Gritti Date: Thu, 14 Apr 2005 15:41:30 +0000 Subject: Fix the crash when trying to copy in backends that doesnt support it. We 2005-04-14 Marco Pesenti Gritti * backend/ev-document.h: * djvu/djvu-document.c: (djvu_document_can_get_text), (djvu_document_document_iface_init): * dvi/dvi-document.c: (dvi_document_can_get_text), (dvi_document_document_iface_init): * pdf/ev-poppler.cc: * pixbuf/pixbuf-document.c: (pixbuf_document_can_get_text), (pixbuf_document_document_iface_init): * ps/ps-document.c: (ps_document_can_get_text), (ps_document_document_iface_init): * shell/ev-view.c: (ev_view_copy), (ev_view_primary_get_cb): * shell/ev-window.c: (update_action_sensitivity): Fix the crash when trying to copy in backends that doesnt support it. We can implement a better solution once we do real text selection. --- (limited to 'pixbuf/pixbuf-document.c') diff --git a/pixbuf/pixbuf-document.c b/pixbuf/pixbuf-document.c index b83da78..0aabb55 100644 --- a/pixbuf/pixbuf-document.c +++ b/pixbuf/pixbuf-document.c @@ -169,12 +169,10 @@ pixbuf_document_class_init (PixbufDocumentClass *klass) g_object_class_override_property (gobject_class, PROP_TITLE, "title"); } -static char * -pixbuf_document_get_text (EvDocument *document, int page, EvRectangle *rect) +static gboolean +pixbuf_document_can_get_text (EvDocument *document) { - /* FIXME this method should not be in EvDocument */ - g_warning ("pixbuf_document_get_text not implemented"); - return NULL; + return FALSE; } static void @@ -182,7 +180,7 @@ pixbuf_document_document_iface_init (EvDocumentIface *iface) { iface->load = pixbuf_document_load; iface->save = pixbuf_document_save; - iface->get_text = pixbuf_document_get_text; + iface->can_get_text = pixbuf_document_can_get_text; iface->get_n_pages = pixbuf_document_get_n_pages; iface->get_page_size = pixbuf_document_get_page_size; iface->render_pixbuf = pixbuf_document_render_pixbuf; -- cgit v0.9.1