From 67d95ccf06a97a1d0f8492fe572d587cc47325bd Mon Sep 17 00:00:00 2001 From: JP Rosevear Date: Mon, 3 Jan 2005 20:12:21 +0000 Subject: implement cancel (update_item): add cancel info item 2005-01-03 JP Rosevear * itip-formatter.c (view_response_cb): implement cancel (update_item): add cancel info item svn path=/trunk/; revision=28222 --- plugins/itip-formatter/ChangeLog | 5 +++++ plugins/itip-formatter/itip-formatter.c | 21 ++++++++++++++------- 2 files changed, 19 insertions(+), 7 deletions(-) diff --git a/plugins/itip-formatter/ChangeLog b/plugins/itip-formatter/ChangeLog index cee826074b..09a89065f9 100644 --- a/plugins/itip-formatter/ChangeLog +++ b/plugins/itip-formatter/ChangeLog @@ -1,5 +1,10 @@ 2005-01-03 JP Rosevear + * itip-formatter.c (view_response_cb): implement cancel + (update_item): add cancel info item + +2005-01-03 JP Rosevear + * itip-view.c (itip_view_add_upper_info_item_printf): utility routine to make it easier to add info items (itip_view_add_lower_info_item_printf): ditto diff --git a/plugins/itip-formatter/itip-formatter.c b/plugins/itip-formatter/itip-formatter.c index 58681586ef..a4c084c728 100644 --- a/plugins/itip-formatter/itip-formatter.c +++ b/plugins/itip-formatter/itip-formatter.c @@ -648,7 +648,6 @@ update_item (FormatItipPObject *pitip, ItipViewResponse response) g_error_free (error); } else { ESource *source; - char *info; /* FIXME This makes the UI look ugly */ itip_view_set_source_list (ITIP_VIEW (pitip->view), NULL); @@ -658,23 +657,28 @@ update_item (FormatItipPObject *pitip, ItipViewResponse response) switch (response) { case ITIP_VIEW_RESPONSE_ACCEPT: - info = g_strdup_printf ("Sent to calendar '%s' as accepted", e_source_peek_name (source)); + itip_view_add_lower_info_item_printf (ITIP_VIEW (pitip->view), ITIP_VIEW_INFO_ITEM_TYPE_INFO, + _("Sent to calendar '%s' as accepted"), e_source_peek_name (source)); break; case ITIP_VIEW_RESPONSE_TENTATIVE: - info = g_strdup_printf ("Sent to calendar '%s' as tentative", e_source_peek_name (source)); + itip_view_add_lower_info_item_printf (ITIP_VIEW (pitip->view), ITIP_VIEW_INFO_ITEM_TYPE_INFO, + _("Sent to calendar '%s' as tentative"), e_source_peek_name (source)); break; case ITIP_VIEW_RESPONSE_DECLINE: /* FIXME some calendars just might not save it at all, is this accurate? */ - info = g_strdup_printf ("Sent to calendar '%s' as declined", e_source_peek_name (source)); + itip_view_add_lower_info_item_printf (ITIP_VIEW (pitip->view), ITIP_VIEW_INFO_ITEM_TYPE_INFO, + _("Sent to calendar '%s' as declined"), e_source_peek_name (source)); + break; + case ITIP_VIEW_RESPONSE_CANCEL: + /* FIXME some calendars just might not save it at all, is this accurate? */ + itip_view_add_lower_info_item_printf (ITIP_VIEW (pitip->view), ITIP_VIEW_INFO_ITEM_TYPE_INFO, + _("Sent to calendar '%s' as cancelled"), e_source_peek_name (source)); break; default: g_assert_not_reached (); break; } - itip_view_add_lower_info_item (ITIP_VIEW (pitip->view), ITIP_VIEW_INFO_ITEM_TYPE_INFO, info); - g_free (info); - /* FIXME Should we hide or desensitize the buttons now? */ } @@ -892,6 +896,9 @@ view_response_cb (GtkWidget *widget, ItipViewResponse response, gpointer data) case ITIP_VIEW_RESPONSE_UPDATE: update_attendee_status (pitip); break; + case ITIP_VIEW_RESPONSE_CANCEL: + update_item (pitip, response); + break; case ITIP_VIEW_RESPONSE_REFRESH: send_item (pitip); break; -- cgit v1.2.3