+2008-03-03 Carlos Garcia Campos <carlosgc@gnome.org>
+
+ * backend/comics/comics-document.c:
+ * backend/djvu/djvu-document.c:
+ * backend/impress/impress-document.c:
+ * backend/pdf/ev-poppler.cc:
+ * backend/pixbuf/pixbuf-document.c:
+ * backend/ps/ev-spectre.c:
+ * backend/ps/ps-document.c:
+ * backend/tiff/tiff-document.c:
+ * libdocument/ev-document.h:
+ * properties/ev-properties-main.c:
+
+ Use g_type_module_add_interface instead of
+ g_type_add_interface_static. Fixes bug #519679.
+
2008-02-29 Carlos Garnacho <carlosg@gnome.org>
* shell/ev-transition-animation.[ch] (ev_transition_animation_ready):
EV_BACKEND_REGISTER_WITH_CODE (ComicsDocument, comics_document,
{
- G_IMPLEMENT_INTERFACE (EV_TYPE_DOCUMENT_THUMBNAILS,
- comics_document_document_thumbnails_iface_init);
+ EV_BACKEND_IMPLEMENT_INTERFACE (EV_TYPE_DOCUMENT_THUMBNAILS,
+ comics_document_document_thumbnails_iface_init);
} );
static char *
EV_BACKEND_REGISTER_WITH_CODE (DjvuDocument, djvu_document,
{
- G_IMPLEMENT_INTERFACE (EV_TYPE_DOCUMENT_THUMBNAILS, djvu_document_document_thumbnails_iface_init);
- G_IMPLEMENT_INTERFACE (EV_TYPE_FILE_EXPORTER, djvu_document_file_exporter_iface_init);
- G_IMPLEMENT_INTERFACE (EV_TYPE_DOCUMENT_FIND, djvu_document_find_iface_init);
- G_IMPLEMENT_INTERFACE (EV_TYPE_DOCUMENT_LINKS, djvu_document_document_links_iface_init);
- G_IMPLEMENT_INTERFACE (EV_TYPE_SELECTION, djvu_selection_iface_init);
+ EV_BACKEND_IMPLEMENT_INTERFACE (EV_TYPE_DOCUMENT_THUMBNAILS, djvu_document_document_thumbnails_iface_init);
+ EV_BACKEND_IMPLEMENT_INTERFACE (EV_TYPE_FILE_EXPORTER, djvu_document_file_exporter_iface_init);
+ EV_BACKEND_IMPLEMENT_INTERFACE (EV_TYPE_DOCUMENT_FIND, djvu_document_find_iface_init);
+ EV_BACKEND_IMPLEMENT_INTERFACE (EV_TYPE_DOCUMENT_LINKS, djvu_document_document_links_iface_init);
+ EV_BACKEND_IMPLEMENT_INTERFACE (EV_TYPE_SELECTION, djvu_selection_iface_init);
});
EV_BACKEND_REGISTER_WITH_CODE (ImpressDocument, impress_document,
{
- G_IMPLEMENT_INTERFACE (EV_TYPE_DOCUMENT_THUMBNAILS,
- impress_document_document_thumbnails_iface_init);
+ EV_BACKEND_IMPLEMENT_INTERFACE (EV_TYPE_DOCUMENT_THUMBNAILS,
+ impress_document_document_thumbnails_iface_init);
});
/* Renderer */
EV_BACKEND_REGISTER_WITH_CODE (PdfDocument, pdf_document,
{
- G_IMPLEMENT_INTERFACE (EV_TYPE_DOCUMENT_SECURITY,
- pdf_document_security_iface_init);
- G_IMPLEMENT_INTERFACE (EV_TYPE_DOCUMENT_THUMBNAILS,
- pdf_document_document_thumbnails_iface_init);
- G_IMPLEMENT_INTERFACE (EV_TYPE_DOCUMENT_LINKS,
- pdf_document_document_links_iface_init);
- G_IMPLEMENT_INTERFACE (EV_TYPE_DOCUMENT_IMAGES,
- pdf_document_document_images_iface_init);
- G_IMPLEMENT_INTERFACE (EV_TYPE_DOCUMENT_FORMS,
- pdf_document_document_forms_iface_init);
- G_IMPLEMENT_INTERFACE (EV_TYPE_DOCUMENT_FONTS,
- pdf_document_document_fonts_iface_init);
- G_IMPLEMENT_INTERFACE (EV_TYPE_DOCUMENT_FIND,
- pdf_document_find_iface_init);
- G_IMPLEMENT_INTERFACE (EV_TYPE_FILE_EXPORTER,
- pdf_document_file_exporter_iface_init);
- G_IMPLEMENT_INTERFACE (EV_TYPE_SELECTION,
- pdf_selection_iface_init);
- G_IMPLEMENT_INTERFACE (EV_TYPE_DOCUMENT_TRANSITION,
- pdf_document_page_transition_iface_init);
+ EV_BACKEND_IMPLEMENT_INTERFACE (EV_TYPE_DOCUMENT_SECURITY,
+ pdf_document_security_iface_init);
+ EV_BACKEND_IMPLEMENT_INTERFACE (EV_TYPE_DOCUMENT_THUMBNAILS,
+ pdf_document_document_thumbnails_iface_init);
+ EV_BACKEND_IMPLEMENT_INTERFACE (EV_TYPE_DOCUMENT_LINKS,
+ pdf_document_document_links_iface_init);
+ EV_BACKEND_IMPLEMENT_INTERFACE (EV_TYPE_DOCUMENT_IMAGES,
+ pdf_document_document_images_iface_init);
+ EV_BACKEND_IMPLEMENT_INTERFACE (EV_TYPE_DOCUMENT_FORMS,
+ pdf_document_document_forms_iface_init);
+ EV_BACKEND_IMPLEMENT_INTERFACE (EV_TYPE_DOCUMENT_FONTS,
+ pdf_document_document_fonts_iface_init);
+ EV_BACKEND_IMPLEMENT_INTERFACE (EV_TYPE_DOCUMENT_FIND,
+ pdf_document_find_iface_init);
+ EV_BACKEND_IMPLEMENT_INTERFACE (EV_TYPE_FILE_EXPORTER,
+ pdf_document_file_exporter_iface_init);
+ EV_BACKEND_IMPLEMENT_INTERFACE (EV_TYPE_SELECTION,
+ pdf_selection_iface_init);
+ EV_BACKEND_IMPLEMENT_INTERFACE (EV_TYPE_DOCUMENT_TRANSITION,
+ pdf_document_page_transition_iface_init);
});
static void
EV_BACKEND_REGISTER_WITH_CODE (PixbufDocument, pixbuf_document,
{
- G_IMPLEMENT_INTERFACE (EV_TYPE_DOCUMENT_THUMBNAILS,
- pixbuf_document_document_thumbnails_iface_init)
+ EV_BACKEND_IMPLEMENT_INTERFACE (EV_TYPE_DOCUMENT_THUMBNAILS,
+ pixbuf_document_document_thumbnails_iface_init)
});
static gboolean
EV_BACKEND_REGISTER_WITH_CODE (PSDocument, ps_document,
{
- G_IMPLEMENT_INTERFACE (EV_TYPE_DOCUMENT_THUMBNAILS,
- ps_document_document_thumbnails_iface_init);
- G_IMPLEMENT_INTERFACE (EV_TYPE_FILE_EXPORTER,
- ps_document_file_exporter_iface_init);
+ EV_BACKEND_IMPLEMENT_INTERFACE (EV_TYPE_DOCUMENT_THUMBNAILS,
+ ps_document_document_thumbnails_iface_init);
+ EV_BACKEND_IMPLEMENT_INTERFACE (EV_TYPE_FILE_EXPORTER,
+ ps_document_file_exporter_iface_init);
});
/* PSDocument */
EV_BACKEND_REGISTER_WITH_CODE (PSDocument, ps_document,
{
- G_IMPLEMENT_INTERFACE (EV_TYPE_DOCUMENT_THUMBNAILS,
- ps_document_document_thumbnails_iface_init);
- G_IMPLEMENT_INTERFACE (EV_TYPE_FILE_EXPORTER,
- ps_document_file_exporter_iface_init);
- G_IMPLEMENT_INTERFACE (EV_TYPE_ASYNC_RENDERER,
- ps_async_renderer_iface_init);
+ EV_BACKEND_IMPLEMENT_INTERFACE (EV_TYPE_DOCUMENT_THUMBNAILS,
+ ps_document_document_thumbnails_iface_init);
+ EV_BACKEND_IMPLEMENT_INTERFACE (EV_TYPE_FILE_EXPORTER,
+ ps_document_file_exporter_iface_init);
+ EV_BACKEND_IMPLEMENT_INTERFACE (EV_TYPE_ASYNC_RENDERER,
+ ps_async_renderer_iface_init);
});
/* PSDocument */
EV_BACKEND_REGISTER_WITH_CODE (TiffDocument, tiff_document,
{
- G_IMPLEMENT_INTERFACE (EV_TYPE_DOCUMENT_THUMBNAILS,
- tiff_document_document_thumbnails_iface_init);
- G_IMPLEMENT_INTERFACE (EV_TYPE_FILE_EXPORTER,
- tiff_document_document_file_exporter_iface_init);
+ EV_BACKEND_IMPLEMENT_INTERFACE (EV_TYPE_DOCUMENT_THUMBNAILS,
+ tiff_document_document_thumbnails_iface_init);
+ EV_BACKEND_IMPLEMENT_INTERFACE (EV_TYPE_FILE_EXPORTER,
+ tiff_document_document_file_exporter_iface_init);
});
static TIFFErrorHandler orig_error_handler = NULL;
gint ev_rect_cmp (EvRectangle *a,
EvRectangle *b);
+/* convenience macro to ease interface addition in the CODE
+ * section of EV_BACKEND_REGISTER_WITH_CODE (this macro relies on
+ * the g_define_type_id present within EV_BACKEND_REGISTER_WITH_CODE()).
+ * usage example:
+ * EV_BACKEND_REGISTER_WITH_CODE (PdfDocument, pdf_document,
+ * EV_BACKEND_IMPLEMENT_INTERFACE (EV_TYPE_DOCUMENT_THUMBNAILS,
+ * pdf_document_document_thumbnails_iface_init));
+ */
+#define EV_BACKEND_IMPLEMENT_INTERFACE(TYPE_IFACE, iface_init) { \
+ const GInterfaceInfo g_implement_interface_info = { \
+ (GInterfaceInitFunc) iface_init, NULL, NULL \
+ }; \
+ g_type_module_add_interface (module, \
+ g_define_type_id, \
+ TYPE_IFACE, \
+ &g_implement_interface_info); \
+}
+
/*
* Utility macro used to register backends
*
#BackendName, \
&our_info, \
(GTypeFlags)0); \
- \
- G_IMPLEMENT_INTERFACE (EV_TYPE_DOCUMENT, \
+ \
+ EV_BACKEND_IMPLEMENT_INTERFACE (EV_TYPE_DOCUMENT, \
backend_name##_document_iface_init); \
\
CODE \
char *uri = NULL;
GtkWidget *page, *label;
NautilusPropertyPage *property_page;
-
+
/* only add properties page if a single file is selected */
if (files == NULL || files->next != NULL)
goto end;
void
nautilus_module_shutdown (void)
{
+ ev_backends_manager_shutdown ();
}
void