yes, set the end date, but correctly calculated, not by using the
2001-07-31 Rodrigo Moya <rodrigo@ximian.com> * gui/e-day-view.c (selection_received): * gui/e-week-view.c (selection_received): yes, set the end date, but correctly calculated, not by using the component's duration, which may not exist. Now really fixes #5836 svn path=/trunk/; revision=11510
This commit is contained in:
committed by
Rodrigo Moya
parent
50d1ebd64a
commit
627e7113cc
@ -1,3 +1,10 @@
|
||||
2001-07-31 Rodrigo Moya <rodrigo@ximian.com>
|
||||
|
||||
* gui/e-day-view.c (selection_received):
|
||||
* gui/e-week-view.c (selection_received): yes, set the end date, but
|
||||
correctly calculated, not by using the component's duration, which
|
||||
may not exist. Now really fixes #5836
|
||||
|
||||
2001-07-31 Rodrigo Moya <rodrigo@ximian.com>
|
||||
|
||||
* gui/e-day-view.c (selection_received):
|
||||
|
||||
@ -6680,6 +6680,8 @@ selection_received (GtkWidget *invisible,
|
||||
icalcomponent_kind kind;
|
||||
CalComponent *comp;
|
||||
char *uid;
|
||||
time_t tt_start, tt_end;
|
||||
struct icaldurationtype ic_dur;
|
||||
|
||||
g_return_if_fail (E_IS_DAY_VIEW (day_view));
|
||||
|
||||
@ -6718,9 +6720,14 @@ selection_received (GtkWidget *invisible,
|
||||
child_kind == ICAL_VJOURNAL_COMPONENT) {
|
||||
CalComponent *tmp_comp;
|
||||
|
||||
tt_start = icaltime_as_timet (icalcomponent_get_dtstart (subcomp));
|
||||
tt_end = icaltime_as_timet (icalcomponent_get_dtend (subcomp));
|
||||
ic_dur = icaldurationtype_from_int (tt_end - tt_start);
|
||||
itime = icaltime_from_timet_with_zone (dtstart, FALSE, day_view->zone);
|
||||
/* FIXME: Need to set TZID. */
|
||||
icalcomponent_set_dtstart (icalcomp, itime);
|
||||
icalcomponent_set_dtstart (subcomp, itime);
|
||||
itime = icaltime_add (itime, ic_dur);
|
||||
icalcomponent_set_dtend (subcomp, itime);
|
||||
|
||||
uid = cal_component_gen_uid ();
|
||||
tmp_comp = cal_component_new ();
|
||||
@ -6747,9 +6754,14 @@ selection_received (GtkWidget *invisible,
|
||||
}
|
||||
}
|
||||
else {
|
||||
tt_start = icaltime_as_timet (icalcomponent_get_dtstart (icalcomp));
|
||||
tt_end = icaltime_as_timet (icalcomponent_get_dtend (icalcomp));
|
||||
ic_dur = icaldurationtype_from_int (tt_end - tt_start);
|
||||
itime = icaltime_from_timet_with_zone (dtstart, FALSE, day_view->zone);
|
||||
/* FIXME: Need to set TZID. */
|
||||
icalcomponent_set_dtstart (icalcomp, itime);
|
||||
itime = icaltime_add (itime, ic_dur);
|
||||
icalcomponent_set_dtend (icalcomp, itime);
|
||||
|
||||
comp = cal_component_new ();
|
||||
cal_component_set_icalcomponent (comp, icalcomp);
|
||||
|
||||
@ -3591,6 +3591,8 @@ selection_received (GtkWidget *invisible,
|
||||
icalcomponent_kind kind;
|
||||
CalComponent *comp;
|
||||
char *uid;
|
||||
time_t tt_start, tt_end;
|
||||
struct icaldurationtype ic_dur;
|
||||
|
||||
g_return_if_fail (E_IS_WEEK_VIEW (week_view));
|
||||
|
||||
@ -3629,9 +3631,14 @@ selection_received (GtkWidget *invisible,
|
||||
child_kind == ICAL_VJOURNAL_COMPONENT) {
|
||||
CalComponent *tmp_comp;
|
||||
|
||||
tt_start = icaltime_as_timet (icalcomponent_get_dtstart (subcomp));
|
||||
tt_end = icaltime_as_timet (icalcomponent_get_dtend (subcomp));
|
||||
ic_dur = icaldurationtype_from_int (tt_end - tt_start);
|
||||
itime = icaltime_from_timet_with_zone (dtstart, FALSE, week_view->zone);
|
||||
/* FIXME: Need to set TZID. */
|
||||
icalcomponent_set_dtstart (icalcomp, itime);
|
||||
itime = icaltime_add (itime, ic_dur);
|
||||
icalcomponent_set_dtend (icalcomp, itime);
|
||||
|
||||
uid = cal_component_gen_uid ();
|
||||
tmp_comp = cal_component_new ();
|
||||
@ -3658,9 +3665,14 @@ selection_received (GtkWidget *invisible,
|
||||
}
|
||||
}
|
||||
else {
|
||||
tt_start = icaltime_as_timet (icalcomponent_get_dtstart (icalcomp));
|
||||
tt_end = icaltime_as_timet (icalcomponent_get_dtend (icalcomp));
|
||||
ic_dur = icaldurationtype_from_int (tt_end - tt_start);
|
||||
itime = icaltime_from_timet_with_zone (dtstart, FALSE, week_view->zone);
|
||||
/* FIXME: need to set TZID */
|
||||
icalcomponent_set_dtstart (icalcomp, itime);
|
||||
itime = icaltime_add (itime, ic_dur);
|
||||
icalcomponent_set_dtend (icalcomp, itime);
|
||||
|
||||
comp = cal_component_new ();
|
||||
cal_component_set_icalcomponent (comp, icalcomp);
|
||||
|
||||
Reference in New Issue
Block a user