Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/backend
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 /backend
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
Diffstat (limited to 'backend')
-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
5 files changed, 29 insertions, 31 deletions
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);
}