Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Persch <chpe@src.gnome.org>2009-02-05 13:08:29 (GMT)
committer Christian Persch <chpe@src.gnome.org>2009-02-05 13:08:29 (GMT)
commitef262303183a13c3d166dd4873e74a78b38cee28 (patch)
tree13937b704a571ecae9abe61a95c603499c2e9e84
parentae999b6c8ddef40b372d3387b4fe0932bea89687 (diff)
Use g_set_error_literal now that we depend on glib 2.18.
* 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
-rw-r--r--ChangeLog13
-rw-r--r--backend/comics/comics-document.c8
-rw-r--r--backend/djvu/djvu-document.c10
-rw-r--r--backend/dvi/dvi-document.c16
-rw-r--r--backend/impress/impress-document.c16
-rw-r--r--backend/pdf/ev-poppler.cc10
-rw-r--r--libdocument/ev-document-factory.c18
-rw-r--r--shell/ev-print-operation.c8
8 files changed, 55 insertions, 44 deletions
diff --git a/ChangeLog b/ChangeLog
index eae3081..b479590 100644
--- 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:
diff --git a/backend/comics/comics-document.c b/backend/comics/comics-document.c
index 4bf9d83..82b3e39 100644
--- a/backend/comics/comics-document.c
+++ b/backend/comics/comics-document.c
@@ -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;
}
diff --git a/backend/djvu/djvu-document.c b/backend/djvu/djvu-document.c
index 0c99668..31fbd94 100644
--- a/backend/djvu/djvu-document.c
+++ b/backend/djvu/djvu-document.c
@@ -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;
}
diff --git a/backend/dvi/dvi-document.c b/backend/dvi/dvi-document.c
index 1d6ca08..e2df875 100644
--- a/backend/dvi/dvi-document.c
+++ b/backend/dvi/dvi-document.c
@@ -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;
}
diff --git a/backend/impress/impress-document.c b/backend/impress/impress-document.c
index 2daf3fc..3f7a329 100644
--- a/backend/impress/impress-document.c
+++ b/backend/impress/impress-document.c
@@ -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;
}
diff --git a/backend/pdf/ev-poppler.cc b/backend/pdf/ev-poppler.cc
index 2e48df9..746b945 100644
--- a/backend/pdf/ev-poppler.cc
+++ b/backend/pdf/ev-poppler.cc
@@ -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);
}
diff --git a/libdocument/ev-document-factory.c b/libdocument/ev-document-factory.c
index 3b9129a..c7f2a22 100644
--- a/libdocument/ev-document-factory.c
+++ b/libdocument/ev-document-factory.c
@@ -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;
diff --git a/shell/ev-print-operation.c b/shell/ev-print-operation.c
index 44ce674..8498dce 100644
--- a/shell/ev-print-operation.c
+++ b/shell/ev-print-operation.c
@@ -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;