aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/e-week-view.c
diff options
context:
space:
mode:
Diffstat (limited to 'calendar/gui/e-week-view.c')
-rw-r--r--calendar/gui/e-week-view.c47
1 files changed, 10 insertions, 37 deletions
diff --git a/calendar/gui/e-week-view.c b/calendar/gui/e-week-view.c
index 9d7d75d711..a10388bed9 100644
--- a/calendar/gui/e-week-view.c
+++ b/calendar/gui/e-week-view.c
@@ -3258,43 +3258,16 @@ e_week_view_on_editing_stopped (EWeekView *week_view,
NULL);
g_assert (text != NULL);
- if (string_is_empty (text)) {
- ConfirmDeleteEmptyCompResult result;
-
- result = cal_comp_confirm_delete_empty_comp (event->comp, week_view->client,
- GTK_WIDGET (week_view));
-
- switch (result) {
- case EMPTY_COMP_REMOVE_LOCALLY: {
- const char *uid;
-
- cal_component_get_uid (event->comp, &uid);
-
- e_week_view_foreach_event_with_uid (week_view, uid,
- e_week_view_remove_event_cb, NULL);
- gtk_widget_queue_draw (week_view->main_canvas);
- e_week_view_check_layout (week_view);
- goto out; }
-
- case EMPTY_COMP_REMOVED_FROM_SERVER:
- goto out;
-
- case EMPTY_COMP_DO_NOT_REMOVE:
- /* But we cannot keep an empty summary, so make the
- * canvas item refresh itself from the text that the
- * component already had.
- */
-
- gtk_object_ref (GTK_OBJECT (event->comp));
- e_week_view_update_event_cb (week_view, event_num, event->comp);
- gtk_object_unref (GTK_OBJECT (event->comp));
- goto out;
-
- default:
- g_assert_not_reached ();
- }
-
- g_assert_not_reached ();
+ if (string_is_empty (text) && !cal_comp_is_on_server (event->comp, week_view->client)) {
+ const char *uid;
+
+ cal_component_get_uid (event->comp, &uid);
+
+ e_week_view_foreach_event_with_uid (week_view, uid,
+ e_week_view_remove_event_cb, NULL);
+ gtk_widget_queue_draw (week_view->main_canvas);
+ e_week_view_check_layout (week_view);
+ goto out;
}
/* Only update the summary if necessary. */