Re: [evolution-patches] Patch to fix #57576



On Wed, 2004-07-14 at 14:15 -0400, Rodney Dawes wrote:
> On Wed, 2004-07-14 at 18:58 +0200, Rodrigo Moya wrote:
> > On Tue, 2004-07-13 at 13:41 -0400, Rodney Dawes wrote:
> > > This patch fixes #57576 by getting rid of the bit of code that was
> > > modifying the start/end times. The check_start_before_end () function
> > > is no longer needed, so I just removed it. The time no longer gets
> > > changed.
> > > 
> > 
> > > +       struct icaltimetype *start_tt;
> > > +       struct icaltimetype *end_tt;
> > > +
> > >         /* This is TRUE if both the start & end timezone are the same.
> > > If the
> > >            start timezone is then changed, we updated the end timezone
> > > to the
> > >            same value, since 99% of events start and end in one
> > > timezone. */
> > > @@ -186,6 +191,9 @@
> > >         
> > >         priv->updating = FALSE;
> > >         priv->sync_timezones = FALSE;
> > > +
> > > +       priv->start_tt = g_new0 (struct icaltimetype, 1);
> > > +       priv->end_tt = g_new0 (struct icaltimetype, 1);
> > >  }
> > there is no need to use pointers here, since you can easily create an
> > empty icaltimetype structure by calling icaltime_null_date. So, unless
> > it's needed, I'd suggest not to use pointers there.
> 
> I used pointers because most of the other uses of icaltimetype in
> event-page.c are pointers as well.
> 
ah, ok

> > I wonder what will happen, with your patch, when a user sets an end time
> > previous to the start time (or a start time newer than the end time)?
> 
> It doesn't work. JP pointed this out yesterday on IRC to me. After a
> little discussion we at least agreed on what the behaviour should be,
> though after re-doing the patch and looking at the code again, I have
> even less of an idea how to actually make it do that. :-/
> 
I guess we should just check when one of start/end dates are changed,
and when so, check the other and only change it if there is a mismatch.

cheers




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