aboutsummaryrefslogtreecommitdiffstats
path: root/calendar
diff options
context:
space:
mode:
authorRodrigo Moya <rodrigo@ximian.com>2004-01-21 23:40:51 +0800
committerRodrigo Moya <rodrigo@src.gnome.org>2004-01-21 23:40:51 +0800
commit6b1db394a5d922f7adc993198aece6ba832409d8 (patch)
tree3ee677152aab15bd21cf31f74bc28940d4482edf /calendar
parentc94ad08250f3a5de26741a93c85cc45183f708ba (diff)
downloadgsoc2013-evolution-6b1db394a5d922f7adc993198aece6ba832409d8.tar
gsoc2013-evolution-6b1db394a5d922f7adc993198aece6ba832409d8.tar.gz
gsoc2013-evolution-6b1db394a5d922f7adc993198aece6ba832409d8.tar.bz2
gsoc2013-evolution-6b1db394a5d922f7adc993198aece6ba832409d8.tar.lz
gsoc2013-evolution-6b1db394a5d922f7adc993198aece6ba832409d8.tar.xz
gsoc2013-evolution-6b1db394a5d922f7adc993198aece6ba832409d8.tar.zst
gsoc2013-evolution-6b1db394a5d922f7adc993198aece6ba832409d8.zip
call e_cal_remove_calendar to actually remove the task list via the
2004-01-21 Rodrigo Moya <rodrigo@ximian.com> * gui/tasks-component.c (delete_task_list_cb): call e_cal_remove_calendar to actually remove the task list via the backend. svn path=/trunk/; revision=24350
Diffstat (limited to 'calendar')
-rw-r--r--calendar/ChangeLog6
-rw-r--r--calendar/gui/tasks-component.c27
2 files changed, 25 insertions, 8 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog
index 826ccaf92e..a1999658aa 100644
--- a/calendar/ChangeLog
+++ b/calendar/ChangeLog
@@ -1,5 +1,11 @@
2004-01-21 Rodrigo Moya <rodrigo@ximian.com>
+ * gui/tasks-component.c (delete_task_list_cb): call
+ e_cal_remove_calendar to actually remove the task list via
+ the backend.
+
+2004-01-21 Rodrigo Moya <rodrigo@ximian.com>
+
Fixes #51705
* gui/calendar-component.c (delete_calendar_cb): call
diff --git a/calendar/gui/tasks-component.c b/calendar/gui/tasks-component.c
index 0670d0ecb8..a07095d571 100644
--- a/calendar/gui/tasks-component.c
+++ b/calendar/gui/tasks-component.c
@@ -356,14 +356,25 @@ delete_task_list_cb (GtkWidget *widget, TasksComponent *comp)
_("Task List '%s' will be removed. Are you sure you want to continue?"),
e_source_peek_name (selected_source));
if (gtk_dialog_run (GTK_DIALOG (dialog)) == GTK_RESPONSE_YES) {
- if (e_source_selector_source_is_selected (E_SOURCE_SELECTOR (priv->source_selector),
- selected_source))
- e_source_selector_unselect_source (E_SOURCE_SELECTOR (priv->source_selector),
- selected_source);
-
- e_source_group_remove_source (e_source_peek_group (selected_source), selected_source);
-
- /* FIXME: remove the tasks.ics file and the directory */
+ ECal *cal;
+ char *uri;
+
+ /* first, ask the backend to remove the task list */
+ uri = e_source_get_uri (selected_source);
+ cal = e_cal_model_get_client_for_uri (
+ e_calendar_table_get_model (E_CALENDAR_TABLE (e_tasks_get_calendar_table (priv->tasks))),
+ uri);
+ g_free (uri);
+ if (cal) {
+ if (e_cal_remove_calendar (cal, NULL)) {
+ if (e_source_selector_source_is_selected (E_SOURCE_SELECTOR (priv->source_selector),
+ selected_source))
+ e_source_selector_unselect_source (E_SOURCE_SELECTOR (priv->source_selector),
+ selected_source);
+
+ e_source_group_remove_source (e_source_peek_group (selected_source), selected_source);
+ }
+ }
}
gtk_widget_destroy (dialog);