]> www.fi.muni.cz Git - evince.git/blobdiff - properties/ev-properties-main.c
Rename error as mdvi_error to avoid symbol conflicts with the libc error.
[evince.git] / properties / ev-properties-main.c
index f726591b4fa07810f4e9ae6c5097495e7ab0d79d..b25df9ea011a632f718a351ae0ddf99056be708d 100644 (file)
  *
  */
 
-#include "ev-properties-view.h"
-#include "ev-document-factory.h"
-
 #include <config.h>
+
 #include <string.h>
+
 #include <glib/gi18n-lib.h>
-#include <gtk/gtklabel.h>
+#include <gtk/gtk.h>
+
 #include <libnautilus-extension/nautilus-extension-types.h>
 #include <libnautilus-extension/nautilus-property-page-provider.h>
 
+#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
@@ -89,7 +93,6 @@ 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)
@@ -97,10 +100,6 @@ ev_properties_get_pages (NautilusPropertyPageProvider *provider,
        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 +107,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,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