diff options
author | JP Rosevear <jpr@novell.com> | 2005-01-10 10:31:59 +0800 |
---|---|---|
committer | JP Rosevear <jpr@src.gnome.org> | 2005-01-10 10:31:59 +0800 |
commit | fc2814312a2a3c035f606a5bff2584552fba76c4 (patch) | |
tree | 2e134b3e03a87059b3ec9a82d3864aa055c9e908 /plugins/itip-formatter/itip-formatter.c | |
parent | 31a179539927c2afb307cba681ad30b6a20f8083 (diff) | |
download | gsoc2013-evolution-fc2814312a2a3c035f606a5bff2584552fba76c4.tar.gz gsoc2013-evolution-fc2814312a2a3c035f606a5bff2584552fba76c4.tar.zst gsoc2013-evolution-fc2814312a2a3c035f606a5bff2584552fba76c4.zip |
launch an evolution window pointing at the calendar date of the
2005-01-09 JP Rosevear <jpr@novell.com>
* 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
Diffstat (limited to 'plugins/itip-formatter/itip-formatter.c')
-rw-r--r-- | plugins/itip-formatter/itip-formatter.c | 21 |
1 files changed, 19 insertions, 2 deletions
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; } |