[evolution-couchdb] Use g_propagate_error rather than g_set_error when we already have a local GError



commit e95fbc5d28f0ead3214765f58b62d0421a8a941b
Author: Rodrigo Moya <rodrigo gnome-db org>
Date:   Thu Mar 31 16:40:10 2011 +0200

    Use g_propagate_error rather than g_set_error when we already have a local GError

 addressbook/e-book-backend-couchdb.c |   11 +++++------
 1 files changed, 5 insertions(+), 6 deletions(-)
---
diff --git a/addressbook/e-book-backend-couchdb.c b/addressbook/e-book-backend-couchdb.c
index d1a075a..ccad894 100644
--- a/addressbook/e-book-backend-couchdb.c
+++ b/addressbook/e-book-backend-couchdb.c
@@ -1062,8 +1062,7 @@ e_book_backend_couchdb_load_source (EBookBackend *backend,
 		if (only_if_exists) {
 #if EDS_CHECK_VERSION(2, 31, 0)
 			if (error) {
-				g_set_error (ret_error, ERROR_QUARK, error->code, "%s: %s",
-					     _("Could not get CouchDB database info"), error->message);
+				g_propagate_error (ret_error, error);
 				g_error_free (error);
 			} else
 				g_set_error (ret_error, ERROR_QUARK, 0, _("Could not open database %s"), db_name);
@@ -1083,8 +1082,7 @@ e_book_backend_couchdb_load_source (EBookBackend *backend,
 						      db_name,
 						      &error)) {
 #if EDS_CHECK_VERSION(2, 31, 0)
-			g_set_error (ret_error, ERROR_QUARK, error->code, "%s: %s",
-				     _("Could not create 'contacts' database"), error->message);
+			g_propagate_error (ret_error, error);
 #endif
 			g_warning ("Could not create 'contacts' database: %s", error->message);
 			g_error_free (error);
@@ -1135,8 +1133,9 @@ e_book_backend_couchdb_load_source (EBookBackend *backend,
 
 	e_book_backend_set_is_loaded (backend, TRUE);
 	e_book_backend_set_is_writable (backend, TRUE);
-
-#if !EDS_CHECK_VERSION(2, 31, 0)
+#if EDS_CHECK_VERSION(2, 31, 0)
+	e_book_backend_notify_connection_status (backend, TRUE);
+#else
 	return GNOME_Evolution_Addressbook_Success;
 #endif
 }



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]