aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorkarl-qdh <karl@qdh.org.uk>2011-01-12 09:49:16 +0000
committerkarl-qdh <karl@qdh.org.uk>2011-01-12 09:49:16 +0000
commitafdb696699f886959a92476cf76f30718f097838 (patch)
tree4c8a249d29950357bd45818a8a627ec0a35b5a26 /src
parent038f58b53b51ee65cd170809b96fccd55766f531 (diff)
downloadayatana-indicator-datetime-afdb696699f886959a92476cf76f30718f097838.tar.gz
ayatana-indicator-datetime-afdb696699f886959a92476cf76f30718f097838.tar.bz2
ayatana-indicator-datetime-afdb696699f886959a92476cf76f30718f097838.zip
Added most likely broken URI callback, but at least our debugging messages will show us something :)
Diffstat (limited to 'src')
-rw-r--r--src/datetime-service.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/datetime-service.c b/src/datetime-service.c
index cd8ca92..814c9c6 100644
--- a/src/datetime-service.c
+++ b/src/datetime-service.c
@@ -296,7 +296,7 @@ update_appointment_menu_items (gpointer user_data) {
icalcomponent *icalcomp = l->data;
icalproperty* p;
icalvalue *v;
- gchar *name, *due, *uri;
+ gchar *name, *due, *uri, *cmd;
p = icalcomponent_get_first_property(icalcomp, ICAL_NAME_PROPERTY);
v = icalproperty_get_value(p);
name = icalvalue_get_string(v);
@@ -306,6 +306,11 @@ update_appointment_menu_items (gpointer user_data) {
due = icalvalue_get_string(v);
// TODO: now we pull out the URI for the calendar event and try to create a URI that'll work when we execute evolution
+ // not sure if the ical URL property is actually an evolution compatible URI and no real way to tell other than testing
+ p = icalcomponent_get_first_property(icalcomp, ICAL_URL_PROPERTY);
+ v = icalproperty_get_value(p);
+ uri = icalvalue_get_string(v);
+ cmd = g_strconcat("evolution ", uri, NULL);
//cairo_surface_t *cs = cairo_image_surface_create (CAIRO_FORMAT_ARGB32, width, height);
//cairo_t *cr = cairo_create(cs);
@@ -323,8 +328,8 @@ update_appointment_menu_items (gpointer user_data) {
dbusmenu_menuitem_property_set_bool (item, DBUSMENU_MENUITEM_PROP_ENABLED, TRUE);
dbusmenu_menuitem_property_set_bool (item, DBUSMENU_MENUITEM_PROP_VISIBLE, TRUE);
dbusmenu_menuitem_child_append (root, item);
- //g_signal_connect (G_OBJECT(item), DBUSMENU_MENUITEM_SIGNAL_ITEM_ACTIVATED,
- // G_CALLBACK (activate_cb), "evolution %s", uri);
+ g_signal_connect (G_OBJECT(item), DBUSMENU_MENUITEM_SIGNAL_ITEM_ACTIVATED,
+ G_CALLBACK (activate_cb), cmd);
if (i == 4) break; // See above FIXME regarding query result limit
i++;