aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJP Rosevear <jpr@novell.com>2005-01-04 04:12:21 +0800
committerJP Rosevear <jpr@src.gnome.org>2005-01-04 04:12:21 +0800
commit67d95ccf06a97a1d0f8492fe572d587cc47325bd (patch)
tree5dcd1594ec020ab39b7c52db2a0925372b0bf2a6
parent4ed097e01144880fa6b929bedd35792cafc45b1d (diff)
downloadgsoc2013-evolution-67d95ccf06a97a1d0f8492fe572d587cc47325bd.tar
gsoc2013-evolution-67d95ccf06a97a1d0f8492fe572d587cc47325bd.tar.gz
gsoc2013-evolution-67d95ccf06a97a1d0f8492fe572d587cc47325bd.tar.bz2
gsoc2013-evolution-67d95ccf06a97a1d0f8492fe572d587cc47325bd.tar.lz
gsoc2013-evolution-67d95ccf06a97a1d0f8492fe572d587cc47325bd.tar.xz
gsoc2013-evolution-67d95ccf06a97a1d0f8492fe572d587cc47325bd.tar.zst
gsoc2013-evolution-67d95ccf06a97a1d0f8492fe572d587cc47325bd.zip
implement cancel (update_item): add cancel info item
2005-01-03 JP Rosevear <jpr@novell.com> * itip-formatter.c (view_response_cb): implement cancel (update_item): add cancel info item svn path=/trunk/; revision=28222
-rw-r--r--plugins/itip-formatter/ChangeLog5
-rw-r--r--plugins/itip-formatter/itip-formatter.c21
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 <jpr@novell.com>
+ * itip-formatter.c (view_response_cb): implement cancel
+ (update_item): add cancel info item
+
+2005-01-03 JP Rosevear <jpr@novell.com>
+
* 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;