*
*/
-#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);
static void
ev_properties_plugin_register_type (GTypeModule *module)
{
- static const GTypeInfo info = {
+ const GTypeInfo info = {
sizeof (GObjectClass),
(GBaseInitFunc) NULL,
(GBaseFinalizeFunc) NULL,
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
GList *files)
{
GError *error = NULL;
- char *mime;
EvDocument *document;
GList *pages = NULL;
NautilusFileInfo *file;
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),
/* 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