[evolution-data-server] There is no need to call e_book_backend_construct().
- From: Matthew Barnes <mbarnes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-data-server] There is no need to call e_book_backend_construct().
- Date: Tue, 20 Jul 2010 11:59:23 +0000 (UTC)
commit 1ce55ef9f96c91d7dc50055baa559d0aff6bc8e9
Author: Matthew Barnes <mbarnes redhat com>
Date: Tue Jul 20 07:58:36 2010 -0400
There is no need to call e_book_backend_construct().
addressbook/backends/file/e-book-backend-file.c | 24 +-------------------
addressbook/backends/ldap/e-book-backend-ldap.c | 23 +------------------
addressbook/backends/vcf/e-book-backend-vcf.c | 24 +-------------------
.../backends/webdav/e-book-backend-webdav.c | 13 +----------
4 files changed, 4 insertions(+), 80 deletions(-)
---
diff --git a/addressbook/backends/file/e-book-backend-file.c b/addressbook/backends/file/e-book-backend-file.c
index d7e1447..989573e 100644
--- a/addressbook/backends/file/e-book-backend-file.c
+++ b/addressbook/backends/file/e-book-backend-file.c
@@ -1408,35 +1408,13 @@ e_book_backend_file_sync (EBookBackend *backend)
}
}
-static gboolean
-e_book_backend_file_construct (EBookBackendFile *backend)
-{
- g_assert (backend != NULL);
- g_assert (E_IS_BOOK_BACKEND_FILE (backend));
-
- if (!e_book_backend_construct (E_BOOK_BACKEND (backend)))
- return FALSE;
-
- return TRUE;
-}
-
/**
* e_book_backend_file_new:
*/
EBookBackend *
e_book_backend_file_new (void)
{
- EBookBackendFile *backend;
-
- backend = g_object_new (E_TYPE_BOOK_BACKEND_FILE, NULL);
-
- if (!e_book_backend_file_construct (backend)) {
- g_object_unref (backend);
-
- return NULL;
- }
-
- return E_BOOK_BACKEND (backend);
+ return g_object_new (E_TYPE_BOOK_BACKEND_FILE, NULL);
}
static void
diff --git a/addressbook/backends/ldap/e-book-backend-ldap.c b/addressbook/backends/ldap/e-book-backend-ldap.c
index b7fde44..4a621e4 100644
--- a/addressbook/backends/ldap/e-book-backend-ldap.c
+++ b/addressbook/backends/ldap/e-book-backend-ldap.c
@@ -5271,34 +5271,13 @@ e_book_backend_ldap_set_mode (EBookBackend *backend,
}
}
-static gboolean
-e_book_backend_ldap_construct (EBookBackendLDAP *backend)
-{
- g_assert (backend != NULL);
- g_assert (E_IS_BOOK_BACKEND_LDAP (backend));
-
- if (!e_book_backend_construct (E_BOOK_BACKEND (backend)))
- return FALSE;
-
- return TRUE;
-}
-
/**
* e_book_backend_ldap_new:
*/
EBookBackend *
e_book_backend_ldap_new (void)
{
- EBookBackendLDAP *backend;
-
- backend = g_object_new (E_TYPE_BOOK_BACKEND_LDAP, NULL);
-
- if (!e_book_backend_ldap_construct (backend)) {
- g_object_unref (backend);
- return NULL;
- }
-
- return E_BOOK_BACKEND (backend);
+ return g_object_new (E_TYPE_BOOK_BACKEND_LDAP, NULL);
}
static gboolean
diff --git a/addressbook/backends/vcf/e-book-backend-vcf.c b/addressbook/backends/vcf/e-book-backend-vcf.c
index ae99f03..c2911b8 100644
--- a/addressbook/backends/vcf/e-book-backend-vcf.c
+++ b/addressbook/backends/vcf/e-book-backend-vcf.c
@@ -687,35 +687,13 @@ e_book_backend_vcf_set_mode (EBookBackend *backend,
}
}
-static gboolean
-e_book_backend_vcf_construct (EBookBackendVCF *backend)
-{
- g_assert (backend != NULL);
- g_assert (E_IS_BOOK_BACKEND_VCF (backend));
-
- if (!e_book_backend_construct (E_BOOK_BACKEND (backend)))
- return FALSE;
-
- return TRUE;
-}
-
/**
* e_book_backend_vcf_new:
*/
EBookBackend *
e_book_backend_vcf_new (void)
{
- EBookBackendVCF *backend;
-
- backend = g_object_new (E_TYPE_BOOK_BACKEND_VCF, NULL);
-
- if (!e_book_backend_vcf_construct (backend)) {
- g_object_unref (backend);
-
- return NULL;
- }
-
- return E_BOOK_BACKEND (backend);
+ return g_object_new (E_TYPE_BOOK_BACKEND_VCF, NULL);
}
static void
diff --git a/addressbook/backends/webdav/e-book-backend-webdav.c b/addressbook/backends/webdav/e-book-backend-webdav.c
index 7b18ad6..16997ef 100644
--- a/addressbook/backends/webdav/e-book-backend-webdav.c
+++ b/addressbook/backends/webdav/e-book-backend-webdav.c
@@ -1337,18 +1337,7 @@ e_book_backend_webdav_cancel_operation (EBookBackend *backend, EDataBook *book,
EBookBackend *
e_book_backend_webdav_new(void)
{
- EBookBackendWebdav *backend
- = g_object_new(E_TYPE_BOOK_BACKEND_WEBDAV, NULL);
-
- g_assert(backend != NULL);
- g_assert(E_IS_BOOK_BACKEND_WEBDAV(backend));
-
- if (!e_book_backend_construct(E_BOOK_BACKEND(backend))) {
- g_object_unref(backend);
- return NULL;
- }
-
- return E_BOOK_BACKEND(backend);
+ return g_object_new (E_TYPE_BOOK_BACKEND_WEBDAV, NULL);
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]