aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/calendar-component.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/calendar-component.c
parent073ef931e617ccc99c3610e9250a0e93b27ba71f (diff)
downloadgsoc2013-evolution-6a70408ad082eae0acbb9e1d367a934abf7cf6fb.tar.gz
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/calendar-component.c')
-rw-r--r--calendar/gui/calendar-component.c33
1 files changed, 24 insertions, 9 deletions
diff --git a/calendar/gui/calendar-component.c b/calendar/gui/calendar-component.c
index f747370004..801c946248 100644
--- a/calendar/gui/calendar-component.c
+++ b/calendar/gui/calendar-component.c
@@ -764,9 +764,20 @@ impl_handleURI (PortableServer_Servant servant, const char *uri, CORBA_Environme
{
CalendarComponent *calendar_component = CALENDAR_COMPONENT (bonobo_object_from_servant (servant));
CalendarComponentPrivate *priv;
+ GList *l;
+ CalendarComponentView *view = NULL;
+ char *src_uid = NULL;
+ char *uid = NULL;
+ char *rid = NULL;
priv = calendar_component->priv;
+
+ l = g_list_last (priv->views);
+ if (!l)
+ return;
+ view = l->data;
+
if (!strncmp (uri, "calendar:", 9)) {
EUri *euri = e_uri_new (uri);
const char *p;
@@ -795,8 +806,14 @@ impl_handleURI (PortableServer_Servant servant, const char *uri, CORBA_Environme
start = time_from_isodate (content);
} else if (!g_ascii_strcasecmp (header, "enddate")) {
end = time_from_isodate (content);
+ } else if (!g_ascii_strcasecmp (header, "source-uid")) {
+ src_uid = g_strdup (content);
+ } else if (!g_ascii_strcasecmp (header, "comp-uid")) {
+ uid = g_strdup (content);
+ } else if (!g_ascii_strcasecmp (header, "comp-rid")) {
+ rid = g_strdup (content);
}
-
+
g_free (content);
p += clen;
@@ -808,20 +825,18 @@ impl_handleURI (PortableServer_Servant servant, const char *uri, CORBA_Environme
}
if (start != -1) {
- GList *l;
if (end == -1)
end = start;
-
- l = g_list_last (priv->views);
- if (l) {
- CalendarComponentView *view = l->data;
-
gnome_calendar_set_selected_time_range (view->calendar, start, end);
- }
}
+ if (src_uid && uid)
+ gnome_calendar_edit_appointment (view->calendar, src_uid, uid, rid);
+
+ g_free (src_uid);
+ g_free (uid);
+ g_free (rid);
}
-
e_uri_free (euri);
}
}