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=6af16f36ad7301ecc9fcff69eee13c019a084c08;hb=dec10c13ca0e95a58e9d6eb537320505ca64d1f8;hp=32677fc1839c0c5e1b3e3acd89d6a44ffa1c9cc8;hpb=47fb87e520d1abe31a1965d500602e0e80e899b2;p=evince.git diff --git a/properties/ev-properties-main.c b/properties/ev-properties-main.c index 32677fc1..6af16f36 100644 --- a/properties/ev-properties-main.c +++ b/properties/ev-properties-main.c @@ -27,16 +27,19 @@ * */ -#include "ev-properties-view.h" -#include "ev-document-factory.h" - #include + #include + #include -#include +#include + #include #include +#include +#include "ev-properties-view.h" + static GType epp_type = 0; static void property_page_provider_iface_init (NautilusPropertyPageProviderIface *iface); @@ -89,7 +92,7 @@ ev_properties_get_pages (NautilusPropertyPageProvider *provider, 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; @@ -103,9 +106,12 @@ 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 (); + page = ev_properties_view_new (uri); ev_properties_view_set_info (EV_PROPERTIES_VIEW (page), ev_document_get_info (document)); gtk_widget_show (page); @@ -127,14 +133,13 @@ nautilus_module_initialize (GTypeModule *module) ev_properties_plugin_register_type (module); ev_properties_view_register_type (module); - /* set up translation catalog */ - bindtextdomain (GETTEXT_PACKAGE, GNOMELOCALEDIR); - bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8"); + ev_init (); } void nautilus_module_shutdown (void) { + ev_shutdown (); } void @@ -147,4 +152,3 @@ nautilus_module_list_types (const GType **types, *types = type_list; *num_types = G_N_ELEMENTS (type_list); } -