X-Git-Url: https://www.fi.muni.cz/~kas/git//home/kas/public_html/git/?a=blobdiff_plain;ds=sidebyside;f=properties%2Fev-properties-main.c;h=c20abed73ed83ef2d35e3d97481bb0f98a0a806b;hb=f343927df4325959193353c52cff1ea4b20b2286;hp=c92a8042e7ad17c2d6bab7e35f3a2c3d4a006818;hpb=bfee37f234243b5fe70b9d0db59a29705d112eac;p=evince.git diff --git a/properties/ev-properties-main.c b/properties/ev-properties-main.c index c92a8042..c20abed7 100644 --- a/properties/ev-properties-main.c +++ b/properties/ev-properties-main.c @@ -28,6 +28,7 @@ */ #include "ev-properties-view.h" +#include "ev-backends-manager.h" #include "ev-document-factory.h" #include @@ -46,7 +47,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 +58,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 @@ -82,8 +83,7 @@ static GList * ev_properties_get_pages (NautilusPropertyPageProvider *provider, GList *files) { - GError *error; - char *mime; + GError *error = NULL; EvDocument *document; GList *pages = NULL; NautilusFileInfo *file; @@ -97,18 +97,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)) { + 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), @@ -135,11 +134,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