aboutsummaryrefslogtreecommitdiffstats
path: root/modules/calendar/e-task-shell-view-actions.c
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2011-06-14 14:54:20 +0800
committerRodrigo Moya <rodrigo@gnome-db.org>2011-06-30 00:42:27 +0800
commit84339b3be5a771406fcd5898bbd21dc1c5b98c82 (patch)
tree15a9cfd61451b56d6b35541b1b1e966a34b17faf /modules/calendar/e-task-shell-view-actions.c
parentfa4289a2f3c26112c907f283a1fd8ab3fb4f26d6 (diff)
downloadgsoc2013-evolution-84339b3be5a771406fcd5898bbd21dc1c5b98c82.tar
gsoc2013-evolution-84339b3be5a771406fcd5898bbd21dc1c5b98c82.tar.gz
gsoc2013-evolution-84339b3be5a771406fcd5898bbd21dc1c5b98c82.tar.bz2
gsoc2013-evolution-84339b3be5a771406fcd5898bbd21dc1c5b98c82.tar.lz
gsoc2013-evolution-84339b3be5a771406fcd5898bbd21dc1c5b98c82.tar.xz
gsoc2013-evolution-84339b3be5a771406fcd5898bbd21dc1c5b98c82.tar.zst
gsoc2013-evolution-84339b3be5a771406fcd5898bbd21dc1c5b98c82.zip
Do not use deprecated EBook/ECal API
Diffstat (limited to 'modules/calendar/e-task-shell-view-actions.c')
-rw-r--r--modules/calendar/e-task-shell-view-actions.c33
1 files changed, 15 insertions, 18 deletions
diff --git a/modules/calendar/e-task-shell-view-actions.c b/modules/calendar/e-task-shell-view-actions.c
index 297120e29c..4938452309 100644
--- a/modules/calendar/e-task-shell-view-actions.c
+++ b/modules/calendar/e-task-shell-view-actions.c
@@ -144,7 +144,7 @@ action_task_list_copy_cb (GtkAction *action,
copy_source_dialog (
GTK_WINDOW (shell_window),
- source, E_CAL_SOURCE_TYPE_TODO);
+ source, E_CAL_CLIENT_SOURCE_TYPE_TASKS);
}
static void
@@ -157,7 +157,7 @@ action_task_list_delete_cb (GtkAction *action,
EShellWindow *shell_window;
EShellView *shell_view;
ETaskTable *task_table;
- ECal *client;
+ ECalClient *client;
ECalModel *model;
ESourceSelector *selector;
ESourceGroup *source_group;
@@ -193,14 +193,14 @@ action_task_list_delete_cb (GtkAction *action,
uri = e_source_get_uri (source);
client = e_cal_model_get_client_for_uri (model, uri);
if (client == NULL)
- client = e_cal_new_from_uri (uri, E_CAL_SOURCE_TYPE_JOURNAL);
+ client = e_cal_client_new_from_uri (uri, E_CAL_CLIENT_SOURCE_TYPE_MEMOS, NULL);
g_free (uri);
g_return_if_fail (client != NULL);
- if (!e_cal_remove (client, &error)) {
- g_warning ("%s", error->message);
- g_error_free (error);
+ if (!e_client_remove_sync (E_CLIENT (client), NULL, &error)) {
+ g_debug ("%s: Failed to remove client: %s", G_STRFUNC, error ? error->message : "Unknown error");
+ g_clear_error (&error);
return;
}
@@ -214,8 +214,8 @@ action_task_list_delete_cb (GtkAction *action,
e_source_group_remove_source (source_group, source);
if (!e_source_list_sync (source_list, &error)) {
- g_warning ("%s", error->message);
- g_error_free (error);
+ g_debug ("%s: Failed to sync srouce list: %s", G_STRFUNC, error ? error->message : "Unknown error");
+ g_clear_error (&error);
}
}
@@ -289,7 +289,7 @@ action_task_list_refresh_cb (GtkAction *action,
ETaskShellContent *task_shell_content;
ETaskShellSidebar *task_shell_sidebar;
ESourceSelector *selector;
- ECal *client;
+ ECalClient *client;
ECalModel *model;
ESource *source;
gchar *uri;
@@ -311,14 +311,11 @@ action_task_list_refresh_cb (GtkAction *action,
if (client == NULL)
return;
- g_return_if_fail (e_cal_get_refresh_supported (client));
+ g_return_if_fail (e_client_check_refresh_supported (E_CLIENT (client)));
- if (!e_cal_refresh (client, &error) && error) {
- g_warning (
- "%s: Failed to refresh '%s', %s\n",
- G_STRFUNC, e_source_peek_name (source),
- error->message);
- g_error_free (error);
+ if (!e_client_refresh_sync (E_CLIENT (client), NULL, &error)) {
+ g_debug ("%s: Failed to refresh '%s', %s", G_STRFUNC, e_source_peek_name (source), error ? error->message : "Unknown error");
+ g_clear_error (&error);
}
}
@@ -407,7 +404,7 @@ action_task_new_cb (GtkAction *action,
EShellWindow *shell_window;
ETaskShellContent *task_shell_content;
ETaskTable *task_table;
- ECal *client;
+ ECalClient *client;
ECalComponent *comp;
CompEditor *editor;
GSList *list;
@@ -635,7 +632,7 @@ action_task_save_as_cb (GtkAction *action,
return;
/* XXX We only save the first selected task. */
- string = e_cal_get_component_as_string (
+ string = e_cal_client_get_component_as_string (
comp_data->client, comp_data->icalcomp);
if (string == NULL) {
g_warning ("Could not convert task to a string");