From: Martin Kretzschmar Date: Fri, 21 Jan 2005 13:05:17 +0000 (+0000) Subject: stub out missing methods for complete EvDocument implementation. Fixes X-Git-Tag: EVINCE_0_1_1~16 X-Git-Url: https://www.fi.muni.cz/~kas/git//home/kas/public_html/git/?a=commitdiff_plain;h=ce3845510fbd8c96d406b79b3f4c260f56dcc072;p=evince.git stub out missing methods for complete EvDocument implementation. Fixes * pixbuf/pixbuf-document.c (pixbuf_document_get_n_pages) (pixbuf_document_get_text, pixbuf_document_document_iface_init): stub out missing methods for complete EvDocument implementation. Fixes segfaults with Save A Copy and Copy actions. * ps/ps-document.c (ps_document_save, ps_document_get_text) (ps_document_document_iface_init): ditto. --- diff --git a/ChangeLog b/ChangeLog index dddb44f0..9154df71 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2005-01-21 Martin Kretzschmar + + * pixbuf/pixbuf-document.c (pixbuf_document_get_n_pages) + (pixbuf_document_get_text, pixbuf_document_document_iface_init): + stub out missing methods for complete EvDocument implementation. + Fixes segfaults with Save A Copy and Copy actions. + + * ps/ps-document.c (ps_document_save, ps_document_get_text) + (ps_document_document_iface_init): ditto. + 2005-01-21 Marco Pesenti Gritti * data/.cvsignore: diff --git a/pixbuf/pixbuf-document.c b/pixbuf/pixbuf-document.c index 65cef929..9e6958db 100644 --- a/pixbuf/pixbuf-document.c +++ b/pixbuf/pixbuf-document.c @@ -80,6 +80,15 @@ pixbuf_document_load (EvDocument *document, return TRUE; } +static gboolean +pixbuf_document_save (EvDocument *document, + const char *uri, + GError **error) +{ + g_warning ("pixbuf_document_save not implemented"); /* FIXME */ + return TRUE; +} + static int pixbuf_document_get_n_pages (EvDocument *document) { @@ -234,6 +243,15 @@ pixbuf_document_class_init (PixbufDocumentClass *klass) g_object_class_override_property (gobject_class, PROP_TITLE, "title"); } +static char * +pixbuf_document_get_text (EvDocument *document, GdkRectangle *rect) +{ + /* FIXME this method should not be in EvDocument */ + g_warning ("pixbuf_document_get_text not implemented"); + return NULL; +} + + static EvLink * pixbuf_document_get_link (EvDocument *document, int x, @@ -246,6 +264,8 @@ static void 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->get_link = pixbuf_document_get_link; iface->get_n_pages = pixbuf_document_get_n_pages; iface->set_page = pixbuf_document_set_page; diff --git a/ps/ps-document.c b/ps/ps-document.c index f0b3956b..6723edb6 100644 --- a/ps/ps-document.c +++ b/ps/ps-document.c @@ -1694,6 +1694,15 @@ ps_document_load (EvDocument *document, return result; } +static gboolean +ps_document_save (EvDocument *document, + const char *uri, + GError **error) +{ + g_warning ("ps_document_save not implemented"); /* FIXME */ + return TRUE; +} + static int ps_document_get_n_pages (EvDocument *document) { @@ -1808,6 +1817,13 @@ ps_document_render (EvDocument *document, g_object_unref (gc); } +static char * +ps_document_get_text (EvDocument *document, GdkRectangle *rect) +{ + g_warning ("ps_document_get_text not implemented"); /* FIXME ? */ + return NULL; +} + static EvLink * ps_document_get_link (EvDocument *document, int x, @@ -1820,6 +1836,8 @@ static void ps_document_document_iface_init (EvDocumentIface *iface) { iface->load = ps_document_load; + iface->save = ps_document_save; + iface->get_text = ps_document_get_text; iface->get_link = ps_document_get_link; iface->get_n_pages = ps_document_get_n_pages; iface->set_page = ps_document_set_page;