evince r3512 - in trunk: . libdocument
- From: chpe svn gnome org
- To: svn-commits-list gnome org
- Subject: evince r3512 - in trunk: . libdocument
- Date: Mon, 2 Mar 2009 23:38:23 +0000 (UTC)
Author: chpe
Date: Mon Mar 2 23:38:23 2009
New Revision: 3512
URL: http://svn.gnome.org/viewvc/evince?rev=3512&view=rev
Log:
* libdocument/ev-document-factory.c:
(ev_document_factory_get_document): If the document is encrypted,
the ev_document_factory_get_document() is supposed to return the
document *and* fill in the error. So let's propagate the local error.
Modified:
trunk/ChangeLog
trunk/libdocument/ev-document-factory.c
Modified: trunk/libdocument/ev-document-factory.c
==============================================================================
--- trunk/libdocument/ev-document-factory.c (original)
+++ trunk/libdocument/ev-document-factory.c Mon Mar 2 23:38:23 2009
@@ -199,6 +199,8 @@
* Creates a #EvDocument for the document at @uri; or, if no backend handling
* the document's type is found, or an error occurred on opening the document,
* returns %NULL and fills in @error.
+ * If the document is encrypted, it is returned but also @error is set to
+ * %EV_DOCUMENT_ERROR_ENCRYPTED.
*
* Returns: a new #EvDocument, or %NULL.
*/
@@ -235,7 +237,7 @@
if (result == FALSE || err) {
if (err &&
g_error_matches (err, EV_DOCUMENT_ERROR, EV_DOCUMENT_ERROR_ENCRYPTED)) {
- g_error_free (err);
+ g_propagate_error (error, err);
return document;
}
/* else fall through to slow mime code section below */
@@ -283,7 +285,7 @@
EV_DOCUMENT_ERROR_INVALID,
_("Unknown MIME Type"));
} else if (g_error_matches (err, EV_DOCUMENT_ERROR, EV_DOCUMENT_ERROR_ENCRYPTED)) {
- g_error_free (err);
+ g_propagate_error (error, err);
return document;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]