Re: [evolution-patches] 61451



On Fri, 2004-07-16 at 19:13 +0200, Rodrigo Moya wrote:
> On Fri, 2004-07-16 at 12:59 -0400, JP Rosevear wrote:
> > This breaks strings freeze, but in 1.4 we made some lame "object not
> > found" message.  This is cleaner and product design ok'ed the new
> > message.
> 
> > @@ -1231,7 +1243,7 @@
> >         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 @@
> >         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_VEVENT_COMPONENT);
> > 
> is this code supposed to work only with events? Since you have a tasks-
> related message above, I guess we should support also tasks here,
> shouldn't we?

Oops, typo.

-JP
-- 
JP Rosevear <jpr novell com>
Novell, Inc.
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/calendar/ChangeLog,v
retrieving revision 1.2448
diff -u -r1.2448 ChangeLog
--- ChangeLog	16 Jul 2004 14:30:48 -0000	1.2448
+++ ChangeLog	16 Jul 2004 18:10:39 -0000
@@ -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-15  Rodrigo Moya <rodrigo novell com>
 
 	Fixes #57142
Index: gui/e-itip-control.c
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/e-itip-control.c,v
retrieving revision 1.151
diff -u -r1.151 e-itip-control.c
--- gui/e-itip-control.c	23 Jun 2004 12:37:14 -0000	1.151
+++ gui/e-itip-control.c	16 Jul 2004 18:10:40 -0000
@@ -1111,8 +1111,20 @@
 }
 
 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 @@
 	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 @@
 	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);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]