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=4fbd150129ff64f5ac753d877bc23b15cb754dd0;hb=ca55431d2dddabea2a1b102e489a23e826ff82c3;hp=6af16f36ad7301ecc9fcff69eee13c019a084c08;hpb=eaf72960239c45082ac4d8d46f1bfdae0e41a833;p=evince.git diff --git a/properties/ev-properties-main.c b/properties/ev-properties-main.c index 6af16f36..4fbd1501 100644 --- a/properties/ev-properties-main.c +++ b/properties/ev-properties-main.c @@ -6,7 +6,7 @@ * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -89,7 +89,8 @@ ev_properties_get_pages (NautilusPropertyPageProvider *provider, EvDocument *document; GList *pages = NULL; NautilusFileInfo *file; - char *uri = NULL; + gchar *uri = NULL; + gchar *mime_type = NULL; GtkWidget *page, *label; NautilusPropertyPage *property_page; @@ -100,16 +101,18 @@ ev_properties_get_pages (NautilusPropertyPageProvider *provider, /* okay, make the page */ uri = nautilus_file_info_get_uri (file); - document = ev_document_factory_get_document (uri, &error); + mime_type = nautilus_file_info_get_mime_type (file); + + document = ev_backends_manager_get_document (mime_type); + if (!document) + goto end; + ev_document_load (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 (uri); ev_properties_view_set_info (EV_PROPERTIES_VIEW (page), @@ -123,6 +126,8 @@ ev_properties_get_pages (NautilusPropertyPageProvider *provider, end: g_free (uri); + g_free (mime_type); + return pages; }