]> www.fi.muni.cz Git - evince.git/blobdiff - backend/djvu/djvu-document.c
Don't overwite an error.
[evince.git] / backend / djvu / djvu-document.c
index 3eafbfe67d64fb379acb7e47e00d7c9573985663..de85c1d4b30250a3755ddbdfd867693ae73f78c1 100644 (file)
@@ -34,7 +34,7 @@
 
 #include <glib.h>
 #include <gdk-pixbuf/gdk-pixbuf.h>
-#include <glib/gi18n.h>
+#include <glib/gi18n-lib.h>
 #include <string.h>
 
 #define SCALE_FACTOR 0.2
@@ -168,6 +168,10 @@ djvu_document_load (EvDocument  *document,
 
        if (!doc) {
                g_free (filename);
+               g_set_error_literal (error,
+                                    EV_DOCUMENT_ERROR,
+                                    EV_DOCUMENT_ERROR_INVALID,
+                                    _("DJVU document has incorrect format"));
                return FALSE;
        }
 
@@ -241,11 +245,11 @@ djvu_document_load (EvDocument  *document,
        g_free (filename);
 
        if (missing_files) {
-               g_set_error (error,
-                            G_FILE_ERROR,
-                            G_FILE_ERROR_EXIST,
-                            _("The document is composed by several files. "
-                              "One or more of such files cannot be accessed."));
+               g_set_error_literal (error,
+                                     G_FILE_ERROR,
+                                     G_FILE_ERROR_EXIST,
+                                    _("The document is composed of several files. "
+                                       "One or more of such files cannot be accessed."));
 
                return FALSE;
        }