aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJP Rosevear <jpr@novell.com>2004-07-20 06:02:29 +0800
committerJP Rosevear <jpr@src.gnome.org>2004-07-20 06:02:29 +0800
commit3a3c32ee5148783e4d6bc0cac46a6c68d74ae4eb (patch)
tree9cb6f471991fe6e32dd9b8a0af44433a00baf8e2
parentbfb438d42fda91c4fe1fc145bcc938df77780923 (diff)
downloadgsoc2013-evolution-3a3c32ee5148783e4d6bc0cac46a6c68d74ae4eb.tar
gsoc2013-evolution-3a3c32ee5148783e4d6bc0cac46a6c68d74ae4eb.tar.gz
gsoc2013-evolution-3a3c32ee5148783e4d6bc0cac46a6c68d74ae4eb.tar.bz2
gsoc2013-evolution-3a3c32ee5148783e4d6bc0cac46a6c68d74ae4eb.tar.lz
gsoc2013-evolution-3a3c32ee5148783e4d6bc0cac46a6c68d74ae4eb.tar.xz
gsoc2013-evolution-3a3c32ee5148783e4d6bc0cac46a6c68d74ae4eb.tar.zst
gsoc2013-evolution-3a3c32ee5148783e4d6bc0cac46a6c68d74ae4eb.zip
Fixes #61451
2004-07-16 JP Rosevear <jpr@novell.com> 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
-rw-r--r--calendar/ChangeLog9
-rw-r--r--calendar/gui/e-itip-control.c20
2 files changed, 25 insertions, 4 deletions
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 <jpr@novell.com>
+
+ 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 <lewing@ximian.com>
* 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 ("<i>%s</i>", _("The meeting has been cancelled, however it could not be found in your calendars"));
+ case ICAL_VTODO_COMPONENT:
+ return g_strdup_printf ("<i>%s</i>", _("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 ("<form><b>%s</b>&nbsp"
"<select NAME=\"action\" SIZE=\"1\"> "
"<option VALUE=\"C\">%s</option></select>&nbsp &nbsp "
@@ -1231,7 +1243,7 @@ show_current_event (EItipControl *itip)
case ICAL_METHOD_CANCEL:
itip_desc = _("<b>%s</b> 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 = _("<b>%s</b> 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);