aboutsummaryrefslogtreecommitdiffstats
path: root/modules/calendar/e-cal-shell-view-actions.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 /modules/calendar/e-cal-shell-view-actions.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 'modules/calendar/e-cal-shell-view-actions.c')
-rw-r--r--modules/calendar/e-cal-shell-view-actions.c30
1 files changed, 14 insertions, 16 deletions
diff --git a/modules/calendar/e-cal-shell-view-actions.c b/modules/calendar/e-cal-shell-view-actions.c
index 8c66a68ed7..f9fdf1caf1 100644
--- a/modules/calendar/e-cal-shell-view-actions.c
+++ b/modules/calendar/e-cal-shell-view-actions.c
@@ -538,7 +538,7 @@ action_event_copy_cb (GtkAction *action,
ESource *source_source = NULL;
ESource *destination_source = NULL;
ESourceRegistry *registry;
- ECalClient *destination_client = NULL;
+ EClient *destination_client = NULL;
GList *selected, *iter;
GError *error = NULL;
@@ -571,12 +571,10 @@ action_event_copy_cb (GtkAction *action,
return;
/* Open the destination calendar. */
- destination_client = e_cal_client_new (
- destination_source, E_CAL_CLIENT_SOURCE_TYPE_EVENTS, NULL);
- if (destination_client == NULL)
- goto exit;
-
- e_client_open_sync (E_CLIENT (destination_client), FALSE, NULL, &error);
+ destination_client = e_cal_client_connect_sync (
+ destination_source,
+ E_CAL_CLIENT_SOURCE_TYPE_EVENTS,
+ NULL, &error);
if (error != NULL) {
g_warning (
@@ -594,7 +592,8 @@ action_event_copy_cb (GtkAction *action,
gboolean remove = FALSE;
e_cal_shell_view_transfer_item_to (
- cal_shell_view, event, destination_client, remove);
+ cal_shell_view, event,
+ E_CAL_CLIENT (destination_client), remove);
}
e_cal_shell_view_set_status_message (cal_shell_view, NULL, -1.0);
@@ -832,7 +831,7 @@ action_event_move_cb (GtkAction *action,
ESource *source_source = NULL;
ESource *destination_source = NULL;
ESourceRegistry *registry;
- ECalClient *destination_client = NULL;
+ EClient *destination_client = NULL;
GList *selected, *iter;
GError *error = NULL;
@@ -865,12 +864,10 @@ action_event_move_cb (GtkAction *action,
return;
/* Open the destination calendar. */
- destination_client = e_cal_client_new (
- destination_source, E_CAL_CLIENT_SOURCE_TYPE_EVENTS, NULL);
- if (destination_client == NULL)
- goto exit;
-
- e_client_open_sync (E_CLIENT (destination_client), FALSE, NULL, &error);
+ destination_client = e_cal_client_connect_sync (
+ destination_source,
+ E_CAL_CLIENT_SOURCE_TYPE_EVENTS,
+ NULL, &error);
if (error != NULL) {
g_warning (
@@ -888,7 +885,8 @@ action_event_move_cb (GtkAction *action,
gboolean remove = TRUE;
e_cal_shell_view_transfer_item_to (
- cal_shell_view, event, destination_client, remove);
+ cal_shell_view, event,
+ E_CAL_CLIENT (destination_client), remove);
}
e_cal_shell_view_set_status_message (cal_shell_view, NULL, -1.0);