aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/gnome-cal.c
diff options
context:
space:
mode:
authorVeerapuram Varadhan <vvaradan@src.gnome.org>2005-07-12 00:23:57 +0800
committerVeerapuram Varadhan <vvaradan@src.gnome.org>2005-07-12 00:23:57 +0800
commit6a70408ad082eae0acbb9e1d367a934abf7cf6fb (patch)
tree0eb97a7e567cd81721a021451d54f08cb3cd4d59 /calendar/gui/gnome-cal.c
parent073ef931e617ccc99c3610e9250a0e93b27ba71f (diff)
downloadgsoc2013-evolution-6a70408ad082eae0acbb9e1d367a934abf7cf6fb.tar
gsoc2013-evolution-6a70408ad082eae0acbb9e1d367a934abf7cf6fb.tar.gz
gsoc2013-evolution-6a70408ad082eae0acbb9e1d367a934abf7cf6fb.tar.bz2
gsoc2013-evolution-6a70408ad082eae0acbb9e1d367a934abf7cf6fb.tar.lz
gsoc2013-evolution-6a70408ad082eae0acbb9e1d367a934abf7cf6fb.tar.xz
gsoc2013-evolution-6a70408ad082eae0acbb9e1d367a934abf7cf6fb.tar.zst
gsoc2013-evolution-6a70408ad082eae0acbb9e1d367a934abf7cf6fb.zip
Added support for opening a calendar-item in the editor when its ESource
* Added support for opening a calendar-item in the editor when its ESource id and ECalComponent id/rid are passed in the invocation URI. svn path=/trunk/; revision=29722
Diffstat (limited to 'calendar/gui/gnome-cal.c')
-rw-r--r--calendar/gui/gnome-cal.c36
1 files changed, 36 insertions, 0 deletions
diff --git a/calendar/gui/gnome-cal.c b/calendar/gui/gnome-cal.c
index a672b534ff..51b54126e8 100644
--- a/calendar/gui/gnome-cal.c
+++ b/calendar/gui/gnome-cal.c
@@ -3393,3 +3393,39 @@ ECalMenu *gnome_calendar_get_calendar_menu (GnomeCalendar *gcal)
return gcal->priv->calendar_menu;
}
+
+void
+gnome_calendar_edit_appointment (GnomeCalendar *gcal,
+ const char* src_uid,
+ const char* comp_uid,
+ const char* comp_rid)
+{
+ ECal *client = NULL;
+ GList *l;
+ icalcomponent* icalcomp = NULL;
+ icalproperty *attendee_prop = NULL;
+
+ if (!src_uid || !comp_uid)
+ return;
+
+ for (l = gcal->priv->clients_list[E_CAL_SOURCE_TYPE_EVENT]; l != NULL; l = l->next) {
+ client = l->data;
+ ESource *client_src = e_cal_get_source (client);
+
+ if (!strcmp (src_uid, e_source_peek_uid (client_src)))
+ break;
+ }
+
+ if (!client)
+ return;
+
+ e_cal_get_object (client, comp_uid, comp_rid, &icalcomp, NULL);
+
+ if (!icalcomp)
+ return;
+
+ attendee_prop = icalcomponent_get_first_property (icalcomp, ICAL_ATTENDEE_PROPERTY);
+ e_calendar_view_edit_appointment (gcal->priv->views[gcal->priv->current_view_type],
+ client, icalcomp, attendee_prop ? TRUE:FALSE);
+ icalcomponent_free (icalcomp);
+}