evince r3596 - in branches/gnome-2-26: . properties



Author: carlosgc
Date: Fri Apr 10 10:41:49 2009
New Revision: 3596
URL: http://svn.gnome.org/viewvc/evince?rev=3596&view=rev

Log:
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.



Modified:
   branches/gnome-2-26/ChangeLog
   branches/gnome-2-26/properties/ev-properties-main.c

Modified: branches/gnome-2-26/properties/ev-properties-main.c
==============================================================================
--- branches/gnome-2-26/properties/ev-properties-main.c	(original)
+++ branches/gnome-2-26/properties/ev-properties-main.c	Fri Apr 10 10:41:49 2009
@@ -89,7 +89,8 @@
 	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 @@
 
 	/* 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 @@
 
 end:
 	g_free (uri);
+	g_free (mime_type);
+	
 	return pages;
 }
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]