aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJP Rosevear <jpr@novell.com>2005-03-21 22:29:16 +0800
committerJP Rosevear <jpr@src.gnome.org>2005-03-21 22:29:16 +0800
commit61b62f4127f42ab2b464fcb6e5dcc6a48507c24d (patch)
tree44a55d83bdc1166842aefbe1a9bbf23a665462c5
parentc090f32fa53222b3d57b4633ffcf551801e4b7b7 (diff)
downloadgsoc2013-evolution-61b62f4127f42ab2b464fcb6e5dcc6a48507c24d.tar.gz
gsoc2013-evolution-61b62f4127f42ab2b464fcb6e5dcc6a48507c24d.tar.zst
gsoc2013-evolution-61b62f4127f42ab2b464fcb6e5dcc6a48507c24d.zip
abort sequence (e_day_view_on_top_canvas_motion): prevent drag of
2005-03-21 JP Rosevear <jpr@novell.com> * gui/e-day-view.c (e_day_view_on_main_canvas_drag_data_received): abort sequence (e_day_view_on_top_canvas_motion): prevent drag of recurring events (e_day_view_on_main_canvas_motion): ditto * gui/e-calendar-view.c (on_unrecur_appointment): clear recur id svn path=/trunk/; revision=29073
-rw-r--r--calendar/ChangeLog9
-rw-r--r--calendar/gui/e-calendar-view.c4
-rw-r--r--calendar/gui/e-day-view.c13
3 files changed, 17 insertions, 9 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog
index 9afeeaf83d..1d26df9a52 100644
--- a/calendar/ChangeLog
+++ b/calendar/ChangeLog
@@ -1,3 +1,12 @@
+2005-03-21 JP Rosevear <jpr@novell.com>
+
+ * gui/e-day-view.c (e_day_view_on_main_canvas_drag_data_received):
+ abort sequence
+ (e_day_view_on_top_canvas_motion): prevent drag of recurring events
+ (e_day_view_on_main_canvas_motion): ditto
+
+ * gui/e-calendar-view.c (on_unrecur_appointment): clear recur id
+
2005-03-21 JP Rosevear <jpr@novell.com>
* gui/tasks-component.c (ensure_sources): ensure the color and
diff --git a/calendar/gui/e-calendar-view.c b/calendar/gui/e-calendar-view.c
index 6c03060dda..4cd6f4ec2b 100644
--- a/calendar/gui/e-calendar-view.c
+++ b/calendar/gui/e-calendar-view.c
@@ -1289,6 +1289,7 @@ on_unrecur_appointment (EPopup *ep, EPopupItem *pitem, void *data)
comp = e_cal_component_new ();
e_cal_component_set_icalcomponent (comp, icalcomponent_new_clone (event->comp_data->icalcomp));
+ e_cal_component_set_recurid (comp, NULL);
cal_comp_util_add_exdate (comp, event->comp_data->instance_start, e_calendar_view_get_timezone (cal_view));
e_cal_component_commit_sequence (comp);
@@ -1300,6 +1301,7 @@ on_unrecur_appointment (EPopup *ep, EPopupItem *pitem, void *data)
new_uid = e_cal_component_gen_uid ();
e_cal_component_set_uid (new_comp, new_uid);
g_free (new_uid);
+ e_cal_component_set_recurid (new_comp, NULL);
e_cal_component_set_rdate_list (new_comp, NULL);
e_cal_component_set_rrule_list (new_comp, NULL);
e_cal_component_set_exdate_list (new_comp, NULL);
@@ -1319,7 +1321,7 @@ on_unrecur_appointment (EPopup *ep, EPopupItem *pitem, void *data)
/* Now update both ECalComponents. Note that we do this last since at
* present the updates happen synchronously so our event may disappear.
*/
- if (!e_cal_modify_object (client, e_cal_component_get_icalcomponent (comp), CALOBJ_MOD_THIS, NULL))
+ if (!e_cal_modify_object (client, e_cal_component_get_icalcomponent (comp), CALOBJ_MOD_ALL, NULL))
g_message ("on_unrecur_appointment(): Could not update the object!");
g_object_unref (comp);
diff --git a/calendar/gui/e-day-view.c b/calendar/gui/e-day-view.c
index 860b9e4297..c5af654028 100644
--- a/calendar/gui/e-day-view.c
+++ b/calendar/gui/e-day-view.c
@@ -3458,8 +3458,7 @@ e_day_view_on_top_canvas_motion (GtkWidget *widget,
event = &g_array_index (day_view->long_events, EDayViewEvent,
day_view->pressed_event_num);
- if ((e_cal_util_component_is_instance (event->comp_data->icalcomp) ||
- !e_cal_util_component_has_recurrences (event->comp_data->icalcomp))
+ if (!e_cal_util_component_has_recurrences (event->comp_data->icalcomp)
&& (abs (canvas_x - day_view->drag_event_x)
> E_DAY_VIEW_DRAG_START_OFFSET
|| abs (canvas_y - day_view->drag_event_y)
@@ -3487,8 +3486,7 @@ e_day_view_on_top_canvas_motion (GtkWidget *widget,
cursor = day_view->normal_cursor;
/* Recurring events can't be resized. */
- if (event && (e_cal_util_component_is_instance (event->comp_data->icalcomp) ||
- !e_cal_util_component_has_recurrences (event->comp_data->icalcomp))) {
+ if (event && !e_cal_util_component_has_recurrences (event->comp_data->icalcomp)) {
switch (pos) {
case E_CALENDAR_VIEW_POS_LEFT_EDGE:
case E_CALENDAR_VIEW_POS_RIGHT_EDGE:
@@ -3564,8 +3562,7 @@ e_day_view_on_main_canvas_motion (GtkWidget *widget,
event = &g_array_index (day_view->events[day_view->pressed_event_day], EDayViewEvent, day_view->pressed_event_num);
- if ((e_cal_util_component_is_instance (event->comp_data->icalcomp) ||
- !e_cal_util_component_has_recurrences (event->comp_data->icalcomp))
+ if (!e_cal_util_component_has_recurrences (event->comp_data->icalcomp)
&& (abs (canvas_x - day_view->drag_event_x)
> E_DAY_VIEW_DRAG_START_OFFSET
|| abs (canvas_y - day_view->drag_event_y)
@@ -3593,8 +3590,7 @@ e_day_view_on_main_canvas_motion (GtkWidget *widget,
cursor = day_view->normal_cursor;
/* Recurring events can't be resized. */
- if (event && (e_cal_util_component_is_instance (event->comp_data->icalcomp) ||
- !e_cal_util_component_has_recurrences (event->comp_data->icalcomp))) {
+ if (event && !e_cal_util_component_has_recurrences (event->comp_data->icalcomp)) {
switch (pos) {
case E_CALENDAR_VIEW_POS_LEFT_EDGE:
cursor = day_view->move_cursor;
@@ -7317,6 +7313,7 @@ e_day_view_on_main_canvas_drag_data_received (GtkWidget *widget,
*date.value = icaltime_from_timet_with_zone (dt, FALSE,
e_calendar_view_get_timezone (E_CALENDAR_VIEW (day_view)));
e_cal_component_set_dtend (comp, &date);
+ e_cal_component_abort_sequence (comp);
gtk_drag_finish (context, TRUE, TRUE, time);