[evolution-patches] calendar and task source deletion
- From: William Jon McCann <mccannwj pha jhu edu>
- To: evolution-patches lists ximian com
- Subject: [evolution-patches] calendar and task source deletion
- Date: Fri, 26 Mar 2004 14:49:06 -0500
Hi,
Here is a patch that allows calendar and task sources to be deleted even
when they aren't selected/loaded.
Please let me know if this looks ok.
Thanks,
Jon
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/calendar/ChangeLog,v
retrieving revision 1.2213
diff -p -u -r1.2213 ChangeLog
--- ChangeLog 26 Mar 2004 04:45:39 -0000 1.2213
+++ ChangeLog 26 Mar 2004 19:46:12 -0000
@@ -1,3 +1,9 @@
+2004-03-26 William Jon McCann <mccann jhu edu>
+
+ * gui/tasks-component.c (delete_task_list_cb):
+ * gui/calendar-component.c (delete_calendar_cb):
+ don't require client to be loaded in order to remove the source
+
2004-03-25 JP Rosevear <jpr ximian com>
* gui/e-cal-model.c (remove_client): fix off by one error when
Index: gui/calendar-component.c
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/calendar-component.c,v
retrieving revision 1.153
diff -p -u -r1.153 calendar-component.c
--- gui/calendar-component.c 23 Mar 2004 16:43:23 -0000 1.153
+++ gui/calendar-component.c 26 Mar 2004 19:46:12 -0000
@@ -320,19 +320,18 @@ delete_calendar_cb (GtkWidget *widget, C
uri = e_source_get_uri (selected_source);
cal = e_cal_model_get_client_for_uri (gnome_calendar_get_calendar_model (priv->calendar), uri);
g_free (uri);
- if (cal) {
- if (e_cal_remove (cal, NULL)) {
- if (e_source_selector_source_is_selected (E_SOURCE_SELECTOR (priv->source_selector),
- selected_source)) {
- gnome_calendar_remove_event_source (priv->calendar, 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);
- e_source_list_sync (priv->source_list, NULL);
- }
+ if (cal)
+ e_cal_remove (cal, NULL);
+
+ if (e_source_selector_source_is_selected (E_SOURCE_SELECTOR (priv->source_selector),
+ selected_source)) {
+ gnome_calendar_remove_event_source (priv->calendar, 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);
+ e_source_list_sync (priv->source_list, NULL);
}
gtk_widget_destroy (dialog);
Index: gui/tasks-component.c
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/tasks-component.c,v
retrieving revision 1.57
diff -p -u -r1.57 tasks-component.c
--- gui/tasks-component.c 11 Feb 2004 15:56:54 -0000 1.57
+++ gui/tasks-component.c 26 Mar 2004 19:46:12 -0000
@@ -311,19 +311,18 @@ delete_task_list_cb (GtkWidget *widget,
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 (cal, NULL)) {
- if (e_source_selector_source_is_selected (E_SOURCE_SELECTOR (priv->source_selector),
- selected_source)) {
- e_tasks_remove_todo_source (priv->tasks, 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);
- e_source_list_sync (priv->source_list, NULL);
- }
+ if (cal)
+ e_cal_remove (cal, NULL);
+
+ if (e_source_selector_source_is_selected (E_SOURCE_SELECTOR (priv->source_selector),
+ selected_source)) {
+ e_tasks_remove_todo_source (priv->tasks, 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);
+ e_source_list_sync (priv->source_list, NULL);
}
gtk_widget_destroy (dialog);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]