]> www.fi.muni.cz Git - evince.git/commitdiff
Use g_set_error_literal now that we depend on glib 2.18.
authorChristian Persch <chpe@src.gnome.org>
Thu, 5 Feb 2009 13:08:29 +0000 (13:08 +0000)
committerChristian Persch <chpe@src.gnome.org>
Thu, 5 Feb 2009 13:08:29 +0000 (13:08 +0000)
* backend/comics/comics-document.c: (comics_document_load):
* backend/djvu/djvu-document.c: (djvu_document_load):
* backend/dvi/dvi-document.c: (dvi_document_load):
* backend/impress/impress-document.c: (impress_document_load):
* backend/pdf/ev-poppler.cc:
* libdocument/ev-document-factory.c: (get_document_from_uri),
(ev_document_factory_get_document):
* shell/ev-print-operation.c:
(ev_print_operation_export_print_dialog_response_cb): Use
g_set_error_literal now that we depend on glib 2.18.

svn path=/trunk/; revision=3419

ChangeLog
backend/comics/comics-document.c
backend/djvu/djvu-document.c
backend/dvi/dvi-document.c
backend/impress/impress-document.c
backend/pdf/ev-poppler.cc
libdocument/ev-document-factory.c
shell/ev-print-operation.c

index eae308170427d05e23ced010e7a3fe3f78e0b89a..b479590dd9f6aed0dda95571fd9b176e11bb0002 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,16 @@
+2009-02-05  Christian Persch  <chpe@gnome.org>
+
+       * backend/comics/comics-document.c: (comics_document_load):
+       * backend/djvu/djvu-document.c: (djvu_document_load):
+       * backend/dvi/dvi-document.c: (dvi_document_load):
+       * backend/impress/impress-document.c: (impress_document_load):
+       * backend/pdf/ev-poppler.cc:
+       * libdocument/ev-document-factory.c: (get_document_from_uri),
+       (ev_document_factory_get_document):
+       * shell/ev-print-operation.c:
+       (ev_print_operation_export_print_dialog_response_cb): Use
+       g_set_error_literal now that we depend on glib 2.18.
+
 2009-02-05  Hib Eris  <hib@hiberis.nl>
 
        * shell/ev-application.c:
index 4bf9d831f3c8ca50a081d313ba79eb0ed235cc27..82b3e398ca0e5808a3d0d145fc481a73b250e6ff 100644 (file)
@@ -156,10 +156,10 @@ comics_document_load (EvDocument *document,
        if (!success) {
                return FALSE;
        } else if (retval != 0) {
-               g_set_error (error,
-                            EV_DOCUMENT_ERROR,
-                            EV_DOCUMENT_ERROR_INVALID,
-                            _("File corrupted."));
+               g_set_error_literal (error,
+                                     EV_DOCUMENT_ERROR,
+                                     EV_DOCUMENT_ERROR_INVALID,
+                                     _("File corrupted."));
                return FALSE;
        }
 
index 0c996683e89d427b9eb04f0d03d202d975c177fb..31fbd94bd5bbc6af16bbfb37e5d4c93565cf01da 100644 (file)
@@ -241,11 +241,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 by several files. "
+                                       "One or more of such files cannot be accessed."));
 
                return FALSE;
        }
index 1d6ca082b54b57ce520516dcc5f3ea730c01ae36..e2df87534920172ddf27b54d21a256d0485b374b 100644 (file)
@@ -90,10 +90,10 @@ dvi_document_load (EvDocument  *document,
        filename = g_filename_from_uri (uri, NULL, error);
        
        if (!filename) {
-               g_set_error (error,
-                            EV_DOCUMENT_ERROR,
-                            EV_DOCUMENT_ERROR_INVALID,
-                            _("File not available"));
+               g_set_error_literal (error,
+                                     EV_DOCUMENT_ERROR,
+                                     EV_DOCUMENT_ERROR_INVALID,
+                                     _("File not available"));
                return FALSE;
        }
        
@@ -106,10 +106,10 @@ dvi_document_load (EvDocument  *document,
        g_free (filename);
        
        if (!dvi_document->context) {
-               g_set_error (error,
-                            EV_DOCUMENT_ERROR,
-                            EV_DOCUMENT_ERROR_INVALID,
-                            _("DVI document has incorrect format"));
+               g_set_error_literal (error,
+                                     EV_DOCUMENT_ERROR,
+                                     EV_DOCUMENT_ERROR_INVALID,
+                                     _("DVI document has incorrect format"));
                return FALSE;
        }
        
index 2daf3fc310357c81e450a9e00d2686eb067f4e88..3f7a3290c8b0e68a1875537a6f049145fcfd1dad 100644 (file)
@@ -291,10 +291,10 @@ impress_document_load (EvDocument  *document,
   filename = g_filename_from_uri (uri, NULL, error);
   if (!filename)
     {
-      g_set_error (error,
-                  EV_DOCUMENT_ERROR,
-                  EV_DOCUMENT_ERROR_INVALID,
-                  _("Remote files aren't supported"));
+      g_set_error_literal (error,
+                           EV_DOCUMENT_ERROR,
+                           EV_DOCUMENT_ERROR_INVALID,
+                           _("Remote files aren't supported"));
       return FALSE;
     }
 
@@ -302,10 +302,10 @@ impress_document_load (EvDocument  *document,
 
   if (!imp)
     {
-      g_set_error (error,
-                  EV_DOCUMENT_ERROR,
-                  EV_DOCUMENT_ERROR_INVALID,
-                  _("Invalid document"));
+      g_set_error_literal (error,
+                           EV_DOCUMENT_ERROR,
+                           EV_DOCUMENT_ERROR_INVALID,
+                           _("Invalid document"));
       g_free (filename);
       return FALSE;
     }
index 2e48df9d7d650a6357cfacd4c083fdaeaba2c2b2..746b945a888c4410b0c24f67ec5ad7df20c221ab 100644 (file)
@@ -239,12 +239,10 @@ convert_error (GError  *poppler_error,
                else if (poppler_error->code == POPPLER_ERROR_ENCRYPTED)
                        code = EV_DOCUMENT_ERROR_ENCRYPTED;
                        
-
-               g_set_error (error,
-                            EV_DOCUMENT_ERROR,
-                            code,
-                            poppler_error->message,
-                            NULL);
+               g_set_error_literal (error,
+                                     EV_DOCUMENT_ERROR,
+                                     code,
+                                     poppler_error->message);
        } else {
                g_propagate_error (error, poppler_error);
        }
index 3b9129af22dce14f9732c4df5382476a801c2db4..c7f2a224a21ecfa59d80528ba45fb02b041103d7 100644 (file)
@@ -121,10 +121,10 @@ get_document_from_uri (const char        *uri,
                g_free (mime_type);
 
                if (*error == NULL) {
-                       g_set_error (error,
-                                    EV_DOCUMENT_ERROR,
-                                    0,
-                                    _("Unknown MIME Type"));
+                       g_set_error_literal (error,
+                                             EV_DOCUMENT_ERROR,
+                                             EV_DOCUMENT_ERROR_INVALID,
+                                             _("Unknown MIME Type"));
                }
                
                return NULL;
@@ -143,7 +143,7 @@ get_document_from_uri (const char        *uri,
                mime_desc = g_content_type_get_description (mime_type);
                g_set_error (error,
                             EV_DOCUMENT_ERROR, 
-                            0,
+                            EV_DOCUMENT_ERROR_INVALID,
                             _("File type %s (%s) is not supported"),
                             mime_desc, mime_type);
                g_free (mime_desc);
@@ -242,10 +242,10 @@ ev_document_factory_get_document (const char *uri, GError **error)
 
        if (result == FALSE) {
                if (*error == NULL) {
-                       g_set_error (error,
-                                    EV_DOCUMENT_ERROR,
-                                    0,
-                                    _("Unknown MIME Type"));
+                       g_set_error_literal (error,
+                                             EV_DOCUMENT_ERROR,
+                                             EV_DOCUMENT_ERROR_INVALID,
+                                             _("Unknown MIME Type"));
                } else if ((*error)->domain == EV_DOCUMENT_ERROR &&
                           (*error)->code == EV_DOCUMENT_ERROR_ENCRYPTED) {
                        return document;
index 44ce674b12d181a6d54279cdc568c182cdcaeca6..8498dceb7b1677cd0b6fc9e4235d15c876ebdc31 100644 (file)
@@ -1004,10 +1004,10 @@ ev_print_operation_export_print_dialog_response_cb (GtkDialog              *dial
        if (!gtk_printer_accepts_ps (export->printer)) {
                gtk_widget_destroy (GTK_WIDGET (dialog));
                
-               g_set_error (&export->error,
-                            GTK_PRINT_ERROR,
-                            GTK_PRINT_ERROR_GENERAL,
-                            "%s", _("Printing is not supported on this printer."));
+               g_set_error_literal (&export->error,
+                                     GTK_PRINT_ERROR,
+                                     GTK_PRINT_ERROR_GENERAL,
+                                     _("Printing is not supported on this printer."));
                g_signal_emit (op, signals[DONE], 0, GTK_PRINT_OPERATION_RESULT_ERROR);
                
                return;