X-Git-Url: https://www.fi.muni.cz/~kas/git//home/kas/public_html/git/?a=blobdiff_plain;ds=inline;f=properties%2Fev-properties-main.c;h=15988cfc6166e15ad4308f516c9b4e71212f2fb3;hb=3d85ea1b45e9d6d2141df6cb797f8ad8325b4769;hp=f726591b4fa07810f4e9ae6c5097495e7ab0d79d;hpb=a4a3a2301361cb6a71e1b127e8e43589f2749105;p=evince.git diff --git a/properties/ev-properties-main.c b/properties/ev-properties-main.c index f726591b..15988cfc 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 @@ -89,18 +90,13 @@ ev_properties_get_pages (NautilusPropertyPageProvider *provider, char *uri = NULL; GtkWidget *page, *label; NautilusPropertyPage *property_page; - GType type = G_TYPE_INVALID; - + /* only add properties page if a single file is selected */ if (files == NULL || files->next != NULL) goto end; file = files->data; /* okay, make the page */ - - if (document == NULL) - goto end; - uri = nautilus_file_info_get_uri (file); document = ev_document_factory_get_document (uri, &error); @@ -108,6 +104,9 @@ ev_properties_get_pages (NautilusPropertyPageProvider *provider, g_error_free (error); goto end; } + + if (!document) + goto end; label = gtk_label_new (_("Document")); page = ev_properties_view_new (); @@ -135,6 +134,8 @@ 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