aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui
diff options
context:
space:
mode:
authorChenthill Palanisamy <pchen@src.gnome.org>2005-08-03 16:59:29 +0800
committerChenthill Palanisamy <pchen@src.gnome.org>2005-08-03 16:59:29 +0800
commit888a7229872d0b4a8574cfc69ed007727530cb96 (patch)
tree5e22a85bb92759525ff9d2784d1f7885613863ee /calendar/gui
parent0c08ef49299caf0e6ae997451ba7a2d923931c42 (diff)
downloadgsoc2013-evolution-888a7229872d0b4a8574cfc69ed007727530cb96.tar
gsoc2013-evolution-888a7229872d0b4a8574cfc69ed007727530cb96.tar.gz
gsoc2013-evolution-888a7229872d0b4a8574cfc69ed007727530cb96.tar.bz2
gsoc2013-evolution-888a7229872d0b4a8574cfc69ed007727530cb96.tar.lz
gsoc2013-evolution-888a7229872d0b4a8574cfc69ed007727530cb96.tar.xz
gsoc2013-evolution-888a7229872d0b4a8574cfc69ed007727530cb96.tar.zst
gsoc2013-evolution-888a7229872d0b4a8574cfc69ed007727530cb96.zip
Fixes #309601
svn path=/trunk/; revision=29968
Diffstat (limited to 'calendar/gui')
-rw-r--r--calendar/gui/e-day-view.c38
-rw-r--r--calendar/gui/itip-utils.c2
2 files changed, 32 insertions, 8 deletions
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);