From 3a3c32ee5148783e4d6bc0cac46a6c68d74ae4eb Mon Sep 17 00:00:00 2001 From: JP Rosevear Date: Mon, 19 Jul 2004 22:02:29 +0000 Subject: Fixes #61451 2004-07-16 JP Rosevear Fixes #61451 * gui/e-itip-control.c (get_cancel_options): don't give a cancel option if the event is no where to be found (show_current_event): pass in kind (show_current_todo): ditto svn path=/trunk/; revision=26678 --- calendar/ChangeLog | 9 +++++++++ calendar/gui/e-itip-control.c | 20 ++++++++++++++++---- 2 files changed, 25 insertions(+), 4 deletions(-) (limited to 'calendar') diff --git a/calendar/ChangeLog b/calendar/ChangeLog index 41668e01c2..b00d7c432b 100644 --- a/calendar/ChangeLog +++ b/calendar/ChangeLog @@ -1,3 +1,12 @@ +2004-07-16 JP Rosevear + + Fixes #61451 + + * gui/e-itip-control.c (get_cancel_options): don't give a cancel + option if the event is no where to be found + (show_current_event): pass in kind + (show_current_todo): ditto + 2004-07-16 Larry Ewing * gui/calendar-component.c (set_info): use short month forms to diff --git a/calendar/gui/e-itip-control.c b/calendar/gui/e-itip-control.c index 8a7386e364..89ecaf110b 100644 --- a/calendar/gui/e-itip-control.c +++ b/calendar/gui/e-itip-control.c @@ -1111,8 +1111,20 @@ get_refresh_options () } static char* -get_cancel_options () -{ +get_cancel_options (gboolean found, icalcomponent_kind kind) +{ + if (!found) { + switch (kind) { + case ICAL_VEVENT_COMPONENT: + return g_strdup_printf ("%s", _("The meeting has been cancelled, however it could not be found in your calendars")); + case ICAL_VTODO_COMPONENT: + return g_strdup_printf ("%s", _("The task has been cancelled, however it could not be found in your task lists")); + default: + g_assert_not_reached (); + return NULL; + } + } + return g_strdup_printf ("
%s " "    " @@ -1231,7 +1243,7 @@ show_current_event (EItipControl *itip) case ICAL_METHOD_CANCEL: itip_desc = _("%s has cancelled a meeting."); itip_title = _("Meeting Cancellation"); - options = get_cancel_options (); + options = get_cancel_options (priv->current_ecal ? TRUE : FALSE, ICAL_VEVENT_COMPONENT); /* Provide extra info, since might not be in the component */ adjust_item (itip, priv->comp); @@ -1299,7 +1311,7 @@ show_current_todo (EItipControl *itip) case ICAL_METHOD_CANCEL: itip_desc = _("%s has cancelled a task."); itip_title = _("Task Cancellation"); - options = get_cancel_options (); + options = get_cancel_options (priv->current_ecal ? TRUE : FALSE, ICAL_VTODO_COMPONENT); /* Provide extra info, since might not be in the component */ adjust_item (itip, priv->comp); -- cgit v1.2.3