[evolution-kolab] Add kolab_settings_handler_new().



commit 54ed3c5a33ec03ed6eda271b22a7f102b50b336a
Author: Matthew Barnes <mbarnes redhat com>
Date:   Sun Jul 1 16:47:09 2012 -0400

    Add kolab_settings_handler_new().

 src/addressbook/e-book-backend-kolab.c             |    2 +-
 src/calendar/e-cal-backend-kolab.c                 |    2 +-
 src/libekolab/kolab-settings-handler.c             |    6 ++++++
 src/libekolab/kolab-settings-handler.h             |    2 ++
 .../integration/libekolab/test-kolab-mail-access.c |    2 +-
 5 files changed, 11 insertions(+), 3 deletions(-)
---
diff --git a/src/addressbook/e-book-backend-kolab.c b/src/addressbook/e-book-backend-kolab.c
index e1b1fd2..d55ef53 100644
--- a/src/addressbook/e-book-backend-kolab.c
+++ b/src/addressbook/e-book-backend-kolab.c
@@ -340,7 +340,7 @@ e_book_backend_kolab_open (EBookBackendSync *backend,
 		goto exit;
 
 	/* Configure settings handler */
-	ksettings = KOLAB_SETTINGS_HANDLER (g_object_new (KOLAB_TYPE_SETTINGS_HANDLER, NULL));
+	ksettings = kolab_settings_handler_new ();
 	ok = kolab_settings_handler_configure (ksettings,
 	                                       KOLAB_FOLDER_CONTEXT_CONTACT,
 	                                       &tmp_err);
diff --git a/src/calendar/e-cal-backend-kolab.c b/src/calendar/e-cal-backend-kolab.c
index 31f5d8c..7b54e27 100644
--- a/src/calendar/e-cal-backend-kolab.c
+++ b/src/calendar/e-cal-backend-kolab.c
@@ -400,7 +400,7 @@ e_cal_backend_kolab_open (ECalBackendSync *backend,
 		goto exit;
 
 	/* Configure settings handler */
-	ksettings = KOLAB_SETTINGS_HANDLER (g_object_new (KOLAB_TYPE_SETTINGS_HANDLER, NULL));
+	ksettings = kolab_settings_handler_new ();
 	ok = kolab_settings_handler_configure (ksettings,
 	                                       KOLAB_FOLDER_CONTEXT_CALENDAR,
 	                                       &tmp_err);
diff --git a/src/libekolab/kolab-settings-handler.c b/src/libekolab/kolab-settings-handler.c
index 52b92ab..4bd3ee3 100644
--- a/src/libekolab/kolab-settings-handler.c
+++ b/src/libekolab/kolab-settings-handler.c
@@ -395,6 +395,12 @@ kolab_settings_handler_class_init (KolabSettingsHandlerClass *klass)
 	object_class->finalize = kolab_settings_handler_finalize;
 }
 
+KolabSettingsHandler *
+kolab_settings_handler_new (void)
+{
+	return g_object_new (KOLAB_TYPE_SETTINGS_HANDLER, NULL);
+}
+
 /*----------------------------------------------------------------------------*/
 /* object config/status */
 
diff --git a/src/libekolab/kolab-settings-handler.h b/src/libekolab/kolab-settings-handler.h
index 05c1080..087da49 100644
--- a/src/libekolab/kolab-settings-handler.h
+++ b/src/libekolab/kolab-settings-handler.h
@@ -160,6 +160,8 @@ typedef enum {
 
 GType kolab_settings_handler_get_type (void) G_GNUC_CONST;
 
+KolabSettingsHandler * kolab_settings_handler_new (void);
+
 gboolean kolab_settings_handler_configure (KolabSettingsHandler *self, KolabFolderContextID context, GError **err);
 gboolean kolab_settings_handler_bringup (KolabSettingsHandler *self, GError **err);
 gboolean kolab_settings_handler_shutdown (KolabSettingsHandler *self, GError **err);
diff --git a/src/tests/integration/libekolab/test-kolab-mail-access.c b/src/tests/integration/libekolab/test-kolab-mail-access.c
index 89bea5c..50884c4 100644
--- a/src/tests/integration/libekolab/test-kolab-mail-access.c
+++ b/src/tests/integration/libekolab/test-kolab-mail-access.c
@@ -279,7 +279,7 @@ test_kolab_mail_access (KolabFolderContextID context)
 		goto test_part_cleanup;
 
 	/* create settings handler object */
-	ksettings = KOLAB_SETTINGS_HANDLER (g_object_new (KOLAB_TYPE_SETTINGS_HANDLER, NULL));
+	ksettings = kolab_settings_handler_new ();
 
 	/* configure settings */
 	ok = kolab_settings_handler_configure (ksettings,



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