]> www.fi.muni.cz Git - evince.git/commitdiff
Move default implementation of document_get_info from backends to base class
authorCarlos Garcia Campos <carlosgc@gnome.org>
Tue, 18 Aug 2009 10:17:49 +0000 (12:17 +0200)
committerCarlos Garcia Campos <carlosgc@gnome.org>
Tue, 15 Sep 2009 13:56:00 +0000 (15:56 +0200)
backend/comics/comics-document.c
backend/djvu/djvu-document.c
backend/dvi/dvi-document.c
backend/impress/impress-document.c
backend/pixbuf/pixbuf-document.c
backend/tiff/tiff-document.c
libdocument/ev-document.c

index 3cd6db6b3375a55fa7f2715457e30f086b645509..1b46faca17eef37e227206a037af9003211662a6 100644 (file)
@@ -721,14 +721,6 @@ comics_document_finalize (GObject *object)
        G_OBJECT_CLASS (comics_document_parent_class)->finalize (object);
 }
 
-static EvDocumentInfo *
-comics_document_get_info (EvDocument *document)
-{
-       EvDocumentInfo *info;
-       info = g_new0 (EvDocumentInfo, 1);
-       return info;
-}
-
 static void
 comics_document_class_init (ComicsDocumentClass *klass)
 {
@@ -742,7 +734,6 @@ comics_document_class_init (ComicsDocumentClass *klass)
        ev_document_class->get_n_pages = comics_document_get_n_pages;
        ev_document_class->get_page_size = comics_document_get_page_size;
        ev_document_class->render = comics_document_render;
-       ev_document_class->get_info = comics_document_get_info;
 }
 
 static void
index 2bc1f7eade0670f19ffec0cb02fc98f52c6a98f7..46bbd40257d961e60619cef182907d18b3795330 100644 (file)
@@ -386,16 +386,6 @@ djvu_document_render (EvDocument      *document,
        return surface;
 }
 
-static EvDocumentInfo *
-djvu_document_get_info (EvDocument *document)
-{
-       EvDocumentInfo *info;
-
-       info = g_new0 (EvDocumentInfo, 1);
-
-       return info;
-}
-
 static void
 djvu_document_finalize (GObject *object)
 {
@@ -431,7 +421,6 @@ djvu_document_class_init (DjvuDocumentClass *klass)
        ev_document_class->get_n_pages = djvu_document_get_n_pages;
        ev_document_class->get_page_size = djvu_document_get_page_size;
        ev_document_class->render = djvu_document_render;
-       ev_document_class->get_info = djvu_document_get_info;
 }
 
 static gchar *
index 7551f80343eeee247b269dee99945b9310c03851..863276d76d5e2259084beeb0ec8cf0d84e6cbad8 100644 (file)
@@ -229,16 +229,6 @@ dvi_document_finalize (GObject *object)
        G_OBJECT_CLASS (dvi_document_parent_class)->finalize (object);
 }
 
-static EvDocumentInfo *
-dvi_document_get_info (EvDocument *document)
-{
-       EvDocumentInfo *info;
-
-       info = g_new0 (EvDocumentInfo, 1);
-
-       return info;
-}
-
 static void
 dvi_document_class_init (DviDocumentClass *klass)
 {
@@ -258,7 +248,6 @@ dvi_document_class_init (DviDocumentClass *klass)
        ev_document_class->get_n_pages = dvi_document_get_n_pages;
        ev_document_class->get_page_size = dvi_document_get_page_size;
        ev_document_class->render = dvi_document_render;
-       ev_document_class->get_info = dvi_document_get_info;
 }
 
 static void
index 0d58aaf61a344c36095fedceb128c1be19f00abb..5c2e160a82b2732849a1f7ea1cd4295799d56ac4 100644 (file)
@@ -424,17 +424,6 @@ impress_document_render (EvDocument      *document,
   return scaled_surface;
 }
 
-static EvDocumentInfo *
-impress_document_get_info (EvDocument *document)
-{
-  EvDocumentInfo *info;
-
-  info = g_new0 (EvDocumentInfo, 1);
-  info->fields_mask = 0;
-
-  return info;
-}
-
 static void
 impress_document_finalize (GObject *object)
 {
@@ -474,7 +463,6 @@ impress_document_class_init (ImpressDocumentClass *klass)
   ev_document_class->get_n_pages = impress_document_get_n_pages;
   ev_document_class->get_page_size = impress_document_get_page_size;
   ev_document_class->render = impress_document_render;
-  ev_document_class->get_info = impress_document_get_info;
 }
 
 static GdkPixbuf *
index df3af036e6ae7ad4bcaae0256862948d8806c7d1..b508810803632e5bfcbf886567e22c6ef9282915 100644 (file)
@@ -138,17 +138,6 @@ pixbuf_document_finalize (GObject *object)
        G_OBJECT_CLASS (pixbuf_document_parent_class)->finalize (object);
 }
 
-static EvDocumentInfo *
-pixbuf_document_get_info (EvDocument *document)
-{
-       EvDocumentInfo *info;
-
-       info = g_new0 (EvDocumentInfo, 1);
-       info->fields_mask = 0;
-
-       return info;
-}
-
 static void
 pixbuf_document_class_init (PixbufDocumentClass *klass)
 {
@@ -162,7 +151,6 @@ pixbuf_document_class_init (PixbufDocumentClass *klass)
        ev_document_class->get_n_pages = pixbuf_document_get_n_pages;
        ev_document_class->get_page_size = pixbuf_document_get_page_size;
        ev_document_class->render = pixbuf_document_render;
-       ev_document_class->get_info = pixbuf_document_get_info;
 }
 
 static GdkPixbuf *
index d122ba7a6c17ed052aa57a5b61381cb1d421e4e1..aabcd6dee23030259ba34e14603e2be9fc862ef9 100644 (file)
@@ -398,17 +398,6 @@ tiff_document_get_page_label (EvDocument *document,
        return NULL;
 }
 
-static EvDocumentInfo *
-tiff_document_get_info (EvDocument *document)
-{
-       EvDocumentInfo *info;
-
-       info = g_new0 (EvDocumentInfo, 1);
-       info->fields_mask = 0;
-
-       return info;
-}
-
 static void
 tiff_document_finalize (GObject *object)
 {
@@ -436,7 +425,6 @@ tiff_document_class_init (TiffDocumentClass *klass)
        ev_document_class->get_page_size = tiff_document_get_page_size;
        ev_document_class->render = tiff_document_render;
        ev_document_class->get_page_label = tiff_document_get_page_label;
-       ev_document_class->get_info = tiff_document_get_info;
 }
 
 static GdkPixbuf *
index 66d7d46e001da3811abe30455876db00f9f5cae0..9d2e259e41f71ee951727209f485620e38f7a973 100644 (file)
@@ -45,6 +45,12 @@ ev_document_impl_get_page (EvDocument *document,
        return ev_page_new (index);
 }
 
+static EvDocumentInfo *
+ev_document_impl_get_info (EvDocument *document)
+{
+       return g_new0 (EvDocumentInfo, 1);
+}
+
 static void
 ev_document_init (EvDocument *document)
 {
@@ -54,6 +60,7 @@ static void
 ev_document_class_init (EvDocumentClass *klass)
 {
        klass->get_page = ev_document_impl_get_page;
+       klass->get_info = ev_document_impl_get_info;
 }
 
 GMutex *