aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/e-calendar-selector.c
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2013-01-24 05:05:08 +0800
committerMatthew Barnes <mbarnes@redhat.com>2013-01-30 22:35:27 +0800
commitf19241d136043d5cfffbfbaf5b2d6d1affc70682 (patch)
tree6abc10286b092dfc9b046bde599f24767ad0c177 /calendar/gui/e-calendar-selector.c
parente583928e0401a4baea4432c5b7e12a1b1eff8c2e (diff)
downloadgsoc2013-evolution-f19241d136043d5cfffbfbaf5b2d6d1affc70682.tar
gsoc2013-evolution-f19241d136043d5cfffbfbaf5b2d6d1affc70682.tar.gz
gsoc2013-evolution-f19241d136043d5cfffbfbaf5b2d6d1affc70682.tar.bz2
gsoc2013-evolution-f19241d136043d5cfffbfbaf5b2d6d1affc70682.tar.lz
gsoc2013-evolution-f19241d136043d5cfffbfbaf5b2d6d1affc70682.tar.xz
gsoc2013-evolution-f19241d136043d5cfffbfbaf5b2d6d1affc70682.tar.zst
gsoc2013-evolution-f19241d136043d5cfffbfbaf5b2d6d1affc70682.zip
Use e_cal_client_connect().
Instead of e_client_utils_open_new() or e_cal_client_new().
Diffstat (limited to 'calendar/gui/e-calendar-selector.c')
-rw-r--r--calendar/gui/e-calendar-selector.c25
1 files changed, 13 insertions, 12 deletions
diff --git a/calendar/gui/e-calendar-selector.c b/calendar/gui/e-calendar-selector.c
index 19eb4335b1..798280f852 100644
--- a/calendar/gui/e-calendar-selector.c
+++ b/calendar/gui/e-calendar-selector.c
@@ -117,29 +117,30 @@ calendar_selector_update_objects (ECalClient *client,
}
static void
-client_opened_cb (GObject *source_object,
- GAsyncResult *result,
- gpointer user_data)
+client_connect_cb (GObject *source_object,
+ GAsyncResult *result,
+ gpointer user_data)
{
- ESource *source = E_SOURCE (source_object);
- EClient *client = NULL;
+ EClient *client;
icalcomponent *icalcomp = user_data;
GError *error = NULL;
g_return_if_fail (icalcomp != NULL);
- e_client_utils_open_new_finish (source, result, &client, &error);
+ client = e_cal_client_connect_finish (result, &error);
+
+ /* Sanity check. */
+ g_return_if_fail (
+ ((client != NULL) && (error == NULL)) ||
+ ((client == NULL) && (error != NULL)));
if (error != NULL) {
- g_warn_if_fail (client == NULL);
g_warning (
"%s: Failed to open client: %s",
G_STRFUNC, error->message);
g_error_free (error);
}
- g_return_if_fail (E_IS_CLIENT (client));
-
calendar_selector_update_objects (E_CAL_CLIENT (client), icalcomp);
g_object_unref (client);
@@ -191,9 +192,9 @@ calendar_selector_data_dropped (ESourceSelector *selector,
icalcomponent_set_uid (icalcomp, uid);
}
- e_client_utils_open_new (
- destination, E_CLIENT_SOURCE_TYPE_EVENTS, FALSE, NULL,
- client_opened_cb, icalcomp);
+ e_cal_client_connect (
+ destination, E_CAL_CLIENT_SOURCE_TYPE_EVENTS, NULL,
+ client_connect_cb, icalcomp);
success = TRUE;