X-Git-Url: https://www.fi.muni.cz/~kas/git//home/kas/public_html/git/?a=blobdiff_plain;f=properties%2Fev-properties-main.c;h=b25df9ea011a632f718a351ae0ddf99056be708d;hb=72ba0b4468e38de5c4ea666a95d7d1fbc1d549a1;hp=2e566d5505763b5397f4641f27f95162088434b5;hpb=13c49bea656a4f495e2c4baedab130eab367ae4f;p=evince.git diff --git a/properties/ev-properties-main.c b/properties/ev-properties-main.c index 2e566d55..b25df9ea 100644 --- a/properties/ev-properties-main.c +++ b/properties/ev-properties-main.c @@ -27,16 +27,20 @@ * */ -#include "ev-properties-view.h" -#include "ev-document-factory.h" - #include + #include + #include -#include +#include + #include #include +#include "ev-properties-view.h" +#include "ev-backends-manager.h" +#include "ev-document-factory.h" + static GType epp_type = 0; static void property_page_provider_iface_init (NautilusPropertyPageProviderIface *iface); @@ -46,7 +50,7 @@ static GList *ev_properties_get_pages static void ev_properties_plugin_register_type (GTypeModule *module) { - static const GTypeInfo info = { + const GTypeInfo info = { sizeof (GObjectClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, @@ -57,7 +61,7 @@ ev_properties_plugin_register_type (GTypeModule *module) 0, (GInstanceInitFunc) NULL }; - static const GInterfaceInfo property_page_provider_iface_info = { + const GInterfaceInfo property_page_provider_iface_info = { (GInterfaceInitFunc)property_page_provider_iface_init, NULL, NULL @@ -83,7 +87,6 @@ ev_properties_get_pages (NautilusPropertyPageProvider *provider, GList *files) { GError *error = NULL; - char *mime; EvDocument *document; GList *pages = NULL; NautilusFileInfo *file; @@ -97,20 +100,17 @@ ev_properties_get_pages (NautilusPropertyPageProvider *provider, file = files->data; /* okay, make the page */ - mime = nautilus_file_info_get_mime_type (file); - document = ev_document_factory_get_document (mime); - g_free (mime); - - if (document == NULL) - goto end; - uri = nautilus_file_info_get_uri (file); - if (!ev_document_load (document, uri, &error)) { - if (error) { - g_error_free (error); - } + document = ev_document_factory_get_document (uri, &error); + + if (error) { + g_error_free (error); goto end; } + + if (!document) + goto end; + label = gtk_label_new (_("Document")); page = ev_properties_view_new (); ev_properties_view_set_info (EV_PROPERTIES_VIEW (page), @@ -137,11 +137,14 @@ nautilus_module_initialize (GTypeModule *module) /* set up translation catalog */ bindtextdomain (GETTEXT_PACKAGE, GNOMELOCALEDIR); bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8"); + + ev_backends_manager_init (); } void nautilus_module_shutdown (void) { + ev_backends_manager_shutdown (); } void