aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/e-calendar-view.c
diff options
context:
space:
mode:
authorChenthill Palanisamy <pchen@src.gnome.org>2006-01-16 13:47:06 +0800
committerChenthill Palanisamy <pchen@src.gnome.org>2006-01-16 13:47:06 +0800
commit16bcca2ec81199ff2460f35f9473349e7634ee40 (patch)
treed79dbcf933bdc9d5012838367310de2377004e51 /calendar/gui/e-calendar-view.c
parent8c2bc05620e28699a6d4768791411a293a797015 (diff)
downloadgsoc2013-evolution-16bcca2ec81199ff2460f35f9473349e7634ee40.tar
gsoc2013-evolution-16bcca2ec81199ff2460f35f9473349e7634ee40.tar.gz
gsoc2013-evolution-16bcca2ec81199ff2460f35f9473349e7634ee40.tar.bz2
gsoc2013-evolution-16bcca2ec81199ff2460f35f9473349e7634ee40.tar.lz
gsoc2013-evolution-16bcca2ec81199ff2460f35f9473349e7634ee40.tar.xz
gsoc2013-evolution-16bcca2ec81199ff2460f35f9473349e7634ee40.tar.zst
gsoc2013-evolution-16bcca2ec81199ff2460f35f9473349e7634ee40.zip
added code in gui/itip-utils.[ch], gui/e-cal-popup.[ch], gui/e-calendar-view.c
so that an option of "Reply" and "Reply All" on right click of a calendar item for calendars that do not have the static capability of saving schedules. svn path=/trunk/; revision=31192
Diffstat (limited to 'calendar/gui/e-calendar-view.c')
-rw-r--r--calendar/gui/e-calendar-view.c55
1 files changed, 50 insertions, 5 deletions
diff --git a/calendar/gui/e-calendar-view.c b/calendar/gui/e-calendar-view.c
index 3de3c090d9..64b4287e75 100644
--- a/calendar/gui/e-calendar-view.c
+++ b/calendar/gui/e-calendar-view.c
@@ -1415,6 +1415,48 @@ on_forward (EPopup *ep, EPopupItem *pitem, void *data)
}
static void
+on_reply (EPopup *ep, EPopupItem *pitem, void *data)
+{
+ ECalendarView *cal_view = data;
+ GList *selected;
+ gboolean reply_all = FALSE;
+
+ selected = e_calendar_view_get_selected_events (cal_view);
+ if (selected) {
+ ECalComponent *comp;
+ ECalendarViewEvent *event = (ECalendarViewEvent *) selected->data;
+
+ comp = e_cal_component_new ();
+ e_cal_component_set_icalcomponent (comp, icalcomponent_new_clone (event->comp_data->icalcomp));
+ reply_to_calendar_comp (E_CAL_COMPONENT_METHOD_REPLY, comp, event->comp_data->client, reply_all, NULL, NULL);
+
+ g_list_free (selected);
+ g_object_unref (comp);
+ }
+}
+
+static void
+on_reply_all (EPopup *ep, EPopupItem *pitem, void *data)
+{
+ ECalendarView *cal_view = data;
+ GList *selected;
+ gboolean reply_all = TRUE;
+
+ selected = e_calendar_view_get_selected_events (cal_view);
+ if (selected) {
+ ECalComponent *comp;
+ ECalendarViewEvent *event = (ECalendarViewEvent *) selected->data;
+
+ comp = e_cal_component_new ();
+ e_cal_component_set_icalcomponent (comp, icalcomponent_new_clone (event->comp_data->icalcomp));
+ reply_to_calendar_comp (E_CAL_COMPONENT_METHOD_REPLY, comp, event->comp_data->client, reply_all, NULL, NULL);
+
+ g_list_free (selected);
+ g_object_unref (comp);
+ }
+}
+
+static void
on_delete_appointment (EPopup *ep, EPopupItem *pitem, void *data)
{
ECalendarView *cal_view = data;
@@ -1573,11 +1615,13 @@ static EPopupItem ecv_child_items [] = {
{ E_POPUP_BAR, "40." },
- { E_POPUP_ITEM, "44.copyto", N_("Cop_y to Calendar..."), on_copy_to, NULL, NULL, 0, E_CAL_POPUP_SELECT_NOTEDITING },
- { E_POPUP_ITEM, "45.moveto", N_("Mo_ve to Calendar..."), on_move_to, NULL, NULL, 0, E_CAL_POPUP_SELECT_NOTEDITING | E_CAL_POPUP_SELECT_EDITABLE },
- { E_POPUP_ITEM, "46.delegate", N_("_Delegate Meeting..."), on_delegate, NULL, NULL, 0, E_CAL_POPUP_SELECT_NOTEDITING | E_CAL_POPUP_SELECT_EDITABLE | E_CAL_POPUP_SELECT_DELEGATABLE | E_CAL_POPUP_SELECT_MEETING},
- { E_POPUP_ITEM, "47.schedule", N_("_Schedule Meeting..."), on_meeting, NULL, NULL, 0, E_CAL_POPUP_SELECT_NOTEDITING | E_CAL_POPUP_SELECT_EDITABLE | E_CAL_POPUP_SELECT_NOTMEETING },
- { E_POPUP_ITEM, "48.forward", N_("_Forward as iCalendar..."), on_forward, NULL, "stock_mail-forward", 0, E_CAL_POPUP_SELECT_NOTEDITING },
+ { E_POPUP_ITEM, "43.copyto", N_("Cop_y to Calendar..."), on_copy_to, NULL, NULL, 0, E_CAL_POPUP_SELECT_NOTEDITING },
+ { E_POPUP_ITEM, "44.moveto", N_("Mo_ve to Calendar..."), on_move_to, NULL, NULL, 0, E_CAL_POPUP_SELECT_NOTEDITING | E_CAL_POPUP_SELECT_EDITABLE },
+ { E_POPUP_ITEM, "45.delegate", N_("_Delegate Meeting..."), on_delegate, NULL, NULL, 0, E_CAL_POPUP_SELECT_NOTEDITING | E_CAL_POPUP_SELECT_EDITABLE | E_CAL_POPUP_SELECT_DELEGATABLE | E_CAL_POPUP_SELECT_MEETING},
+ { E_POPUP_ITEM, "46.schedule", N_("_Schedule Meeting..."), on_meeting, NULL, NULL, 0, E_CAL_POPUP_SELECT_NOTEDITING | E_CAL_POPUP_SELECT_EDITABLE | E_CAL_POPUP_SELECT_NOTMEETING },
+ { E_POPUP_ITEM, "47.forward", N_("_Forward as iCalendar..."), on_forward, NULL, "stock_mail-forward", 0, E_CAL_POPUP_SELECT_NOTEDITING },
+ { E_POPUP_ITEM, "48.reply", N_("_Reply"), on_reply, NULL, "stock_mail-reply", E_CAL_POPUP_SELECT_MEETING | E_CAL_POPUP_SELECT_NOSAVESCHEDULES, E_CAL_POPUP_SELECT_NOTEDITING },
+ { E_POPUP_ITEM, "49.reply-all", N_("Reply to _All"), on_reply_all, NULL, "stock_mail-reply-to-all", E_CAL_POPUP_SELECT_MEETING | E_CAL_POPUP_SELECT_NOSAVESCHEDULES, E_CAL_POPUP_SELECT_NOTEDITING },
{ E_POPUP_BAR, "50." },
@@ -1877,6 +1921,7 @@ e_calendar_view_edit_appointment (ECalendarView *cal_view,
g_object_unref (comp);
}
+
open_event_with_flags (cal_view, client, icalcomp, flags);
}