Commit f81bd27d authored by Carlos Garcia Campos's avatar Carlos Garcia Campos

Move default implementation of document_get_info from backends to base class

parent 75481a7c
......@@ -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
......
......@@ -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 *
......
......@@ -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
......
......@@ -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 *
......
......@@ -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 *
......
......@@ -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 *
......
......@@ -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 *
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment