]> www.fi.muni.cz Git - evince.git/commitdiff
Implement dummy get_info to fix crash
authorNickolay V. Shmyrev <nshmyrev@src.gnome.org>
Wed, 20 Apr 2005 23:06:19 +0000 (23:06 +0000)
committerNickolay V. Shmyrev <nshmyrev@src.gnome.org>
Wed, 20 Apr 2005 23:06:19 +0000 (23:06 +0000)
ChangeLog
djvu/djvu-document.c
dvi/dvi-document.c

index 851d8c7620af9a075c62633888f7110e85619c9b..828940012274c2a19c0194777e727e8d86ab92aa 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2005-04-21  Nickolay V. Shmyrev  <nshmyrev@yandex.ru>
+
+       * djvu/djvu-document.c: (djvu_document_class_init),
+       (djvu_document_get_info), (djvu_document_document_iface_init):
+       * dvi/dvi-document.c: (dvi_document_class_init),
+       (dvi_document_get_info), (dvi_document_document_iface_init):
+
+       Dummy implementation of get_info method for dvi and djvu. Fix
+       crashes with those backends
+
 2005-04-20  Marco Pesenti Gritti <mpg@redhat.com>
 
        * data/evince.desktop.in:
index d74af665c268fc0769ef53bf238f02b5f3d0dd29..e6a270f180602b1ef1260ae77a8e236c4844d918 100644 (file)
@@ -184,44 +184,12 @@ djvu_document_finalize (GObject *object)
        G_OBJECT_CLASS (djvu_document_parent_class)->finalize (object);
 }
 
-static void
-djvu_document_set_property (GObject *object,
-                             guint prop_id,
-                             const GValue *value,
-                             GParamSpec *pspec)
-{
-       switch (prop_id)
-       {
-               case PROP_TITLE:
-                       /* read only */
-                       break;
-       }
-}
-
-static void
-djvu_document_get_property (GObject *object,
-                             guint prop_id,
-                             GValue *value,
-                             GParamSpec *pspec)
-{
-       switch (prop_id)
-       {
-               case PROP_TITLE:
-                       g_value_set_string (value, NULL);
-                       break;
-       }
-}
-
 static void
 djvu_document_class_init (DjvuDocumentClass *klass)
 {
        GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
 
        gobject_class->finalize = djvu_document_finalize;
-       gobject_class->get_property = djvu_document_get_property;
-       gobject_class->set_property = djvu_document_set_property;
-
-       g_object_class_override_property (gobject_class, PROP_TITLE, "title");
 }
 
 static gboolean
@@ -230,6 +198,16 @@ djvu_document_can_get_text (EvDocument *document)
        return FALSE;
 }
 
+static EvDocumentInfo *
+djvu_document_get_info (EvDocument *document)
+{
+       EvDocumentInfo *info;
+
+       info = g_new0 (EvDocumentInfo, 1);
+
+       return info;
+}
+
 static void
 djvu_document_document_iface_init (EvDocumentIface *iface)
 {
@@ -239,6 +217,7 @@ djvu_document_document_iface_init (EvDocumentIface *iface)
        iface->get_n_pages = djvu_document_get_n_pages;
        iface->get_page_size = djvu_document_get_page_size;
        iface->render_pixbuf = djvu_document_render_pixbuf;
+       iface->get_info = djvu_document_get_info;
 }
 
 static void
index b9edc9e65c4a95462c7afff94558b6cbaddbaf1d..61526d2d54e9d54ab3faf4ed4f9b173daf2db77a 100644 (file)
@@ -198,33 +198,6 @@ dvi_document_finalize (GObject *object)
        G_OBJECT_CLASS (dvi_document_parent_class)->finalize (object);
 }
 
-static void
-dvi_document_set_property (GObject *object,
-                             guint prop_id,
-                             const GValue *value,
-                             GParamSpec *pspec)
-{
-       switch (prop_id)
-       {
-               case PROP_TITLE:
-                       /* read only */
-                       break;
-       }
-}
-
-static void
-dvi_document_get_property (GObject *object,
-                             guint prop_id,
-                             GValue *value,
-                             GParamSpec *pspec)
-{
-       switch (prop_id)
-       {
-               case PROP_TITLE:
-                       g_value_set_string (value, NULL);
-                       break;
-       }
-}
 
 static void
 dvi_document_class_init (DviDocumentClass *klass)
@@ -232,10 +205,6 @@ dvi_document_class_init (DviDocumentClass *klass)
        GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
 
        gobject_class->finalize = dvi_document_finalize;
-       gobject_class->get_property = dvi_document_get_property;
-       gobject_class->set_property = dvi_document_set_property;
-
-       g_object_class_override_property (gobject_class, PROP_TITLE, "title");
 }
 
 static gboolean
@@ -244,6 +213,16 @@ dvi_document_can_get_text (EvDocument *document)
        return FALSE;
 }
 
+static EvDocumentInfo *
+dvi_document_get_info (EvDocument *document)
+{
+       EvDocumentInfo *info;
+
+       info = g_new0 (EvDocumentInfo, 1);
+
+       return info;
+}
+
 static void
 dvi_document_document_iface_init (EvDocumentIface *iface)
 {
@@ -253,6 +232,7 @@ dvi_document_document_iface_init (EvDocumentIface *iface)
        iface->get_n_pages = dvi_document_get_n_pages;
        iface->get_page_size = dvi_document_get_page_size;
        iface->render_pixbuf = dvi_document_render_pixbuf;
+       iface->get_info = dvi_document_get_info;
 }
 
 static void