aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/e-day-view.c
diff options
context:
space:
mode:
authorJP Rosevear <jpr@ximian.com>2002-09-21 03:36:54 +0800
committerJP Rosevear <jpr@src.gnome.org>2002-09-21 03:36:54 +0800
commitac3b4c71ffbd70f791f70962daeadf4ce99d5f5b (patch)
tree625a02ab4091d326b2f6e808bed87a2d19f4ecb0 /calendar/gui/e-day-view.c
parent5c128c7bddf6df35f6b5b8f7598ac8d5287da6f2 (diff)
downloadgsoc2013-evolution-ac3b4c71ffbd70f791f70962daeadf4ce99d5f5b.tar.gz
gsoc2013-evolution-ac3b4c71ffbd70f791f70962daeadf4ce99d5f5b.tar.zst
gsoc2013-evolution-ac3b4c71ffbd70f791f70962daeadf4ce99d5f5b.zip
check to see if the component is already on the server or not
2002-09-20 JP Rosevear <jpr@ximian.com> * gui/comp-util.c (cal_comp_is_on_server): check to see if the component is already on the server or not * gui/comp-util.h: change proto * gui/e-week-view.c (e_week_view_on_editing_stopped): only delete the event if the summary is empty and the component is not already on the server * gui/e-day-view.c (e_day_view_on_editing_stopped): same Fixes #14111 svn path=/trunk/; revision=18138
Diffstat (limited to 'calendar/gui/e-day-view.c')
-rw-r--r--calendar/gui/e-day-view.c51
1 files changed, 11 insertions, 40 deletions
diff --git a/calendar/gui/e-day-view.c b/calendar/gui/e-day-view.c
index 7a91699185..5c91e54832 100644
--- a/calendar/gui/e-day-view.c
+++ b/calendar/gui/e-day-view.c
@@ -6265,46 +6265,17 @@ e_day_view_on_editing_stopped (EDayView *day_view,
NULL);
g_assert (text != NULL);
- if (string_is_empty (text)) {
- ConfirmDeleteEmptyCompResult result;
-
- result = cal_comp_confirm_delete_empty_comp (event->comp, day_view->client,
- GTK_WIDGET (day_view));
-
- switch (result) {
- case EMPTY_COMP_REMOVE_LOCALLY: {
- const char *uid;
-
- cal_component_get_uid (event->comp, &uid);
-
- e_day_view_foreach_event_with_uid (day_view, uid,
- e_day_view_remove_event_cb, NULL);
- e_day_view_check_layout (day_view);
- gtk_widget_queue_draw (day_view->top_canvas);
- gtk_widget_queue_draw (day_view->main_canvas);
- 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.
- */
-
- if (day == E_DAY_VIEW_LONG_EVENT)
- e_day_view_reshape_long_event (day_view, event_num);
- else
- e_day_view_update_event_label (day_view, day, event_num);
-
- goto out;
-
- default:
- g_assert_not_reached ();
- }
-
- g_assert_not_reached ();
+ if (string_is_empty (text) && !cal_comp_is_on_server (event->comp, day_view->client)) {
+ const char *uid;
+
+ cal_component_get_uid (event->comp, &uid);
+
+ e_day_view_foreach_event_with_uid (day_view, uid,
+ e_day_view_remove_event_cb, NULL);
+ e_day_view_check_layout (day_view);
+ gtk_widget_queue_draw (day_view->top_canvas);
+ gtk_widget_queue_draw (day_view->main_canvas);
+ goto out;
}
/* Only update the summary if necessary. */