]> www.fi.muni.cz Git - evince.git/blobdiff - backend/ev-document-factory.c
Tamil Translation updated
[evince.git] / backend / ev-document-factory.c
index c02801fbc1aff16c2eec45b74afd082a61309711..e3f384f9b864a0b121289e672a0cf3b9e87ccfc1 100644 (file)
@@ -259,14 +259,14 @@ get_document_from_uri (const char *uri, gboolean slow, GError **error)
                gnome_vfs_file_info_unref (info);
                return NULL;
        }
-       
+
        document = ev_document_factory_get_from_mime (info->mime_type);
                
        if (document == NULL) {
                g_set_error (error,
                             EV_DOCUMENT_ERROR, 
                             0,
-                            _("Unhandled MIME type: '%s'"), info->mime_type);
+                            _("Unhandled MIME type: ā€œ%sā€"), info->mime_type);
                gnome_vfs_file_info_unref (info);
                return NULL;
        }                       
@@ -280,18 +280,18 @@ EvDocument *
 ev_document_factory_get_document (const char *uri, GError **error)
 {
        EvDocument *document;
-       
+
        document = get_document_from_uri (uri, FALSE, error);
 
-       if (*error != NULL) {
-               return NULL;
+       if (*error == NULL) {
+               ev_document_load (document, uri, error);
        }
-
-       ev_document_load (document, uri, error);
-               
+       
        if (*error) {
                g_error_free (*error);
                *error = NULL;
+       } else {
+               return document;
        }
 
        document = get_document_from_uri (uri, TRUE, error);