Commit 5d0383f8 authored by Carlos Garcia Campos's avatar Carlos Garcia Campos Committed by Carlos Garcia Campos

Create and load the document based on the mime-type provided by nautilus

2009-04-10  Carlos Garcia Campos  <carlosgc@gnome.org>

	* properties/ev-properties-main.c: (ev_properties_get_pages):

	Create and load the document based on the mime-type provided by
	nautilus instead of using our own documents factory. Fixes bug
	#533917.

svn path=/trunk/; revision=3595
parent 9da706a0
2009-04-10 Carlos Garcia Campos <carlosgc@gnome.org>
* properties/ev-properties-main.c: (ev_properties_get_pages):
Create and load the document based on the mime-type provided by
nautilus instead of using our own documents factory. Fixes bug
#533917.
2009-04-09 Benjamin Berg <benjamin@sipsolutions.net>
* backend/tiff/tiff-document.c: (tiff_document_render):
......
......@@ -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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment