From fc2814312a2a3c035f606a5bff2584552fba76c4 Mon Sep 17 00:00:00 2001 From: JP Rosevear Date: Mon, 10 Jan 2005 02:31:59 +0000 Subject: launch an evolution window pointing at the calendar date of the 2005-01-09 JP Rosevear * itip-formatter.c (idle_open_cb): launch an evolution window pointing at the calendar date of the appointment (view_response_cb): use it svn path=/trunk/; revision=28301 --- plugins/itip-formatter/itip-formatter.c | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) (limited to 'plugins/itip-formatter/itip-formatter.c') diff --git a/plugins/itip-formatter/itip-formatter.c b/plugins/itip-formatter/itip-formatter.c index 9b7bb2ee2a..a039dbb823 100644 --- a/plugins/itip-formatter/itip-formatter.c +++ b/plugins/itip-formatter/itip-formatter.c @@ -83,7 +83,7 @@ typedef struct { gchar *calendar_uid; EAccountList *accounts; - + gchar *from_address; gchar *delegator_address; gchar *delegator_name; @@ -904,8 +904,22 @@ extract_itip_data (FormatItipPObject *pitip) pitip->comp = NULL; return; }; +} -// show_current (itip); +static gboolean +idle_open_cb (gpointer data) +{ + FormatItipPObject *pitip = data; + char *command; + + command = g_strdup_printf ("evolution-%s \"calendar://?startdate=%s&enddate=%s\"", BASE_VERSION, + isodate_from_time_t (pitip->start_time), isodate_from_time_t (pitip->end_time)); + if (!g_spawn_command_line_async (command, NULL)) { + g_warning ("Could not launch %s", command); + } + g_free (command); + + return FALSE; } static void @@ -948,6 +962,9 @@ view_response_cb (GtkWidget *widget, ItipViewResponse response, gpointer data) case ITIP_VIEW_RESPONSE_REFRESH: send_item (pitip); break; + case ITIP_VIEW_RESPONSE_OPEN: + g_idle_add (idle_open_cb, pitip); + return; default: break; } -- cgit v1.2.3