Re: [evolution-patches] patch to prevent attendees from dragging and resizing meetings.
- From: chen <pchenthill novell com>
- To: lviren <lviren novell com>
- Cc: evolution-patches lists ximian com
- Subject: Re: [evolution-patches] patch to prevent attendees from dragging and resizing meetings.
- Date: Wed, 03 Aug 2005 17:06:41 +0530
Modified the patch and committed it on behalf of viren.
thanks, chenthill.
On Wed, 2005-08-03 at 14:50 +0530, chen wrote:
> The patch prevents drag and drop of ordinary appointments too.
>
> @@ -5932,8 +5934,10 @@ e_day_view_change_event_time (EDayView *
>
> toplevel = GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET
> (day_view)));
>
> - e_cal_component_commit_sequence (comp);
> - e_calendar_view_modify_and_send (comp, client, mod, toplevel,
> TRUE);
> + if (itip_organizer_is_user (comp, client)) {
> + e_cal_component_commit_sequence (comp);
> + e_calendar_view_modify_and_send (comp, client, mod,
> toplevel, TRUE);
> + }
>
> The static capability for "no-organizer" should be checked in
> itip_organizer_is_user. The check for is_organizer along with
> has_atendees should be made before the modified dates are set to the
> component. This holds good checks in other places too.
>
> thanks, chenthill.
>
> On Tue, 2005-07-19 at 20:48 +0530, lviren wrote:
> >
> > Hi,
> >
> >
> > Patch to prevent mouse events for attendees.
> >
> >
> >
> >
> >
> > Thanks,
> > Viren
> > _______________________________________________
> > evolution-patches mailing list
> > evolution-patches lists ximian com
> > http://lists.ximian.com/mailman/listinfo/evolution-patches
> _______________________________________________
> evolution-patches mailing list
> evolution-patches lists ximian com
> http://lists.ximian.com/mailman/listinfo/evolution-patches
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/calendar/ChangeLog,v
retrieving revision 1.2784
diff -u -p -r1.2784 ChangeLog
--- ChangeLog 3 Aug 2005 06:03:38 -0000 1.2784
+++ ChangeLog 3 Aug 2005 08:54:25 -0000
@@ -1,3 +1,17 @@
+2005-08-03 Chenthill Palanisamy <pchenthill novell com>
+
+ Fixes #309601
+ * gui/e-day-view.c (e_day_view_on_top_canvas_drag_data_received):
+ (e_day_view_on_main_canvas_drag_data_received):
+ (e_day_view_finish_long_event_resize):
+ (e_day_view_finish_resize):
+ (e_day_view_change_event_time): Allow modification of the item only
+ for organizer.
+ * gui/itip-utils.c (itip_organizer_is_user): added the check for the
+ static capability "no-organizer".
+
+ commiting for viren.l <lviren novell com>
+
2005-08-03 P. S. Chakravarthi <pchakravarthi novell com>
Fixes #306017
@@ -18,7 +32,7 @@
* gui/e-cal-menu.c (e_cal_menu_target_new_select): Set the mask for
E_CAL_MENU_SELECT_ASSIGNABLE.
- Fixes bug #231968.
+ Fixes bug #231968
2005-07-29 Chenthill Palanisamy <pchenthill novell com>
Index: gui/e-day-view.c
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/e-day-view.c,v
retrieving revision 1.282
diff -u -p -r1.282 e-day-view.c
--- gui/e-day-view.c 29 Jul 2005 05:10:11 -0000 1.282
+++ gui/e-day-view.c 3 Aug 2005 08:54:27 -0000
@@ -224,8 +224,7 @@ static void e_day_view_update_resize (ED
gint row);
static void e_day_view_finish_long_event_resize (EDayView *day_view);
static void e_day_view_finish_resize (EDayView *day_view);
-static void e_day_view_abort_resize (EDayView *day_view,
- guint32 time);
+static void e_day_view_abort_resize (EDayView *day_view);
static gboolean e_day_view_on_long_event_button_press (EDayView *day_view,
@@ -3932,6 +3931,12 @@ e_day_view_finish_long_event_resize (EDa
comp = e_cal_component_new ();
e_cal_component_set_icalcomponent (comp, icalcomponent_new_clone (event->comp_data->icalcomp));
+ if (e_cal_component_has_attendees (comp) && !itip_organizer_is_user (comp, client)) {
+ g_object_unref (comp);
+ e_day_view_abort_resize (day_view);
+ return;
+ }
+
date.value = &itt;
date.tzid = NULL;
@@ -4025,6 +4030,12 @@ e_day_view_finish_resize (EDayView *day_
comp = e_cal_component_new ();
e_cal_component_set_icalcomponent (comp, icalcomponent_new_clone (event->comp_data->icalcomp));
+ if (e_cal_component_has_attendees (comp) && !itip_organizer_is_user (comp, client)) {
+ g_object_unref (comp);
+ e_day_view_abort_resize (day_view);
+ return;
+ }
+
date.value = &itt;
/* FIXME: Should probably keep the timezone of the original start
and end times. */
@@ -4093,15 +4104,13 @@ e_day_view_finish_resize (EDayView *day_
e_cal_component_commit_sequence (comp);
e_calendar_view_modify_and_send (comp, client, mod, toplevel, TRUE);
-
out:
g_object_unref (comp);
}
static void
-e_day_view_abort_resize (EDayView *day_view,
- guint32 time)
+e_day_view_abort_resize (EDayView *day_view)
{
gint day, event_num;
@@ -4109,7 +4118,6 @@ e_day_view_abort_resize (EDayView *day_v
return;
day_view->resize_drag_pos = E_CALENDAR_VIEW_POS_NONE;
- gdk_pointer_ungrab (time);
day = day_view->resize_event_day;
event_num = day_view->resize_event_num;
@@ -4795,7 +4803,8 @@ e_day_view_do_key_press (GtkWidget *widg
/* The Escape key aborts a resize operation. */
if (day_view->resize_drag_pos != E_CALENDAR_VIEW_POS_NONE) {
if (keyval == GDK_Escape) {
- e_day_view_abort_resize (day_view, event->time);
+ gdk_pointer_ungrab (event->time);
+ e_day_view_abort_resize (day_view);
}
return FALSE;
}
@@ -5930,6 +5939,11 @@ e_day_view_change_event_time (EDayView *
comp = e_cal_component_new ();
e_cal_component_set_icalcomponent (comp, icalcomponent_new_clone (event->comp_data->icalcomp));
+ if (e_cal_component_has_attendees (comp) && !itip_organizer_is_user (comp, client)) {
+ g_object_unref (comp);
+ return;
+ }
+
date.value = &itt;
/* FIXME: Should probably keep the timezone of the original start
and end times. */
@@ -7275,6 +7289,11 @@ e_day_view_on_top_canvas_drag_data_recei
comp = e_cal_component_new ();
e_cal_component_set_icalcomponent (comp, icalcomponent_new_clone (event->comp_data->icalcomp));
+ if (e_cal_component_has_attendees (comp) && !itip_organizer_is_user (comp, client)) {
+ g_object_unref (comp);
+ return;
+ }
+
if (start_offset == 0 && end_offset == 0)
all_day_event = TRUE;
else
@@ -7493,6 +7512,11 @@ e_day_view_on_main_canvas_drag_data_rece
comp = e_cal_component_new ();
e_cal_component_set_icalcomponent (comp, icalcomponent_new_clone (event->comp_data->icalcomp));
+ if (e_cal_component_has_attendees (comp) && !itip_organizer_is_user (comp, client)) {
+ g_object_unref (comp);
+ return;
+ }
+
date.value = &itt;
date.tzid = icaltimezone_get_tzid (e_calendar_view_get_timezone (E_CALENDAR_VIEW (day_view)));
Index: gui/itip-utils.c
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/itip-utils.c,v
retrieving revision 1.102
diff -u -p -r1.102 itip-utils.c
--- gui/itip-utils.c 11 Jul 2005 08:59:38 -0000 1.102
+++ gui/itip-utils.c 3 Aug 2005 08:54:28 -0000
@@ -93,7 +93,7 @@ itip_organizer_is_user (ECalComponent *c
const char *strip;
gboolean user_org = FALSE;
- if (!e_cal_component_has_organizer (comp))
+ if (!e_cal_component_has_organizer (comp) || e_cal_get_static_capability (client, CAL_STATIC_CAPABILITY_NO_ORGANIZER))
return FALSE;
e_cal_component_get_organizer (comp, &organizer);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]