aboutsummaryrefslogtreecommitdiffstats
path: root/calendar
diff options
context:
space:
mode:
Diffstat (limited to 'calendar')
-rw-r--r--calendar/ChangeLog16
-rw-r--r--calendar/gui/e-day-view.c38
-rw-r--r--calendar/gui/itip-utils.c2
3 files changed, 47 insertions, 9 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog
index 46eddb896e..79bff55298 100644
--- a/calendar/ChangeLog
+++ b/calendar/ChangeLog
@@ -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>
diff --git a/calendar/gui/e-day-view.c b/calendar/gui/e-day-view.c
index 7c65d84d45..29ebe0d99b 100644
--- a/calendar/gui/e-day-view.c
+++ b/calendar/gui/e-day-view.c
@@ -224,8 +224,7 @@ static void e_day_view_update_resize (EDayView *day_view,
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 (EDayView *day_view)
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_view)
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_view)
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_view,
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 *widget, GdkEventKey *event)
/* 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 *day_view, time_t start_dt, time_t end_dt
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_received (GtkWidget *widget,
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_received (GtkWidget *widget,
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)));
diff --git a/calendar/gui/itip-utils.c b/calendar/gui/itip-utils.c
index 2f4ca34c8b..641bdc45d5 100644
--- a/calendar/gui/itip-utils.c
+++ b/calendar/gui/itip-utils.c
@@ -93,7 +93,7 @@ itip_organizer_is_user (ECalComponent *comp, ECal *client)
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);