aboutsummaryrefslogtreecommitdiffstats
path: root/calendar
diff options
context:
space:
mode:
authorRodrigo Moya <rodrigo@ximian.com>2001-07-31 22:46:48 +0800
committerRodrigo Moya <rodrigo@src.gnome.org>2001-07-31 22:46:48 +0800
commit627e7113cc97bc3ca2a94ea7c3a556eb15b95af0 (patch)
tree64e853299ad7c99da0c5eaa810934037377ab499 /calendar
parent50d1ebd64aeec09a01ddc3e89185ac61a16e8702 (diff)
downloadgsoc2013-evolution-627e7113cc97bc3ca2a94ea7c3a556eb15b95af0.tar.gz
gsoc2013-evolution-627e7113cc97bc3ca2a94ea7c3a556eb15b95af0.tar.zst
gsoc2013-evolution-627e7113cc97bc3ca2a94ea7c3a556eb15b95af0.zip
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
Diffstat (limited to 'calendar')
-rw-r--r--calendar/ChangeLog7
-rw-r--r--calendar/gui/e-day-view.c14
-rw-r--r--calendar/gui/e-week-view.c12
3 files changed, 32 insertions, 1 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog
index 42e22fc813..313b4a6b62 100644
--- a/calendar/ChangeLog
+++ b/calendar/ChangeLog
@@ -1,5 +1,12 @@
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):
* gui/e-week-view.c (selection_received): don't set the end date
for the pasted components, since it will be recalculated when the start
diff --git a/calendar/gui/e-day-view.c b/calendar/gui/e-day-view.c
index 4da82c61a5..daff360ab6 100644
--- a/calendar/gui/e-day-view.c
+++ b/calendar/gui/e-day-view.c
@@ -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);
diff --git a/calendar/gui/e-week-view.c b/calendar/gui/e-week-view.c
index 2e5d2d72e6..c0b9d82a10 100644
--- a/calendar/gui/e-week-view.c
+++ b/calendar/gui/e-week-view.c
@@ -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);
it/x11-fonts?h=dependabot/npm_and_yarn/devel/electron6/files/ini-1.3.8&id=f81765a0fa125b631d829705a403201a0bef56ee'>Inconsolata is a monospace font.pav2008-12-124-0/+40 * Reset mita@jp.FreeBSD.org due to long period of inactivity.linimon2008-12-081-1/+1 * - use DOCSDIRitetcu2008-11-242-14/+12 * Update to wqy font set:delphij2008-11-037-53/+153 * MonteCarlo is a bitmap font suitable for code editors. All the charactersmiwi2008-11-024-0/+45 * - Fix reference to X11BASE in pkg-descr.lippe2008-10-263-10/+7 * Install the proprietary license text as advertised in pkg-message.stefan2008-10-252-1/+5 * Profont - The ultimate programming font.amdmi32008-10-115-0/+53 * Update to 2.27ahze2008-10-022-4/+4 * - Update to 20080907miwi2008-09-302-4/+4 * Reset infofarmer due to maintainer-timeouts and no response to email.linimon2008-09-074-4/+4 * - Update to 20080820miwi2008-08-264-8/+8 * Update CONFIGURE_ARGS for how we pass CONFIGURE_TARGET to configure script.rafan2008-08-211-2/+0 * Reset conrads@cox.net due to lack of time to work on FreeBSD.linimon2008-08-203-3/+3 * - Update to 20080808miwi2008-08-154-8/+8 * - Update to 20080706miwi2008-08-134-8/+8 * Update to 2.26ahze2008-08-112-4/+4 * - Remove duplicates from MAKE_ENV after inclusion of CC and CXX in default MA...pav2008-07-251-1/+1 * GNU Unifont is a free bitmap font that coversmiwi2008-07-194-0/+41 * - Update to 20080620miwi2008-07-192-6/+6 * - Update to 0.5.4pav2008-07-083-6/+6 * [UPDATE] sysutils/gnu-unifont update and category moved to x11-fonts & jfbter...edwin2008-07-055-49/+18 * Update to 2.1.13.marcus2008-07-052-4/+4 * Remove references about /usr/X11R6 from pkg-message.olgeni2008-06-217-14/+14 * Update to 0.45mat2008-06-202-4/+4 * Upgrade to 1.171.thierry2008-06-183-7/+6 * Update to 0.44mat2008-06-123-27/+74 * Upgrade to the latest version, named 1.0 (PORTEPOCH bumped).thierry2008-06-123-7/+7 * - Update to 0.5.3pav2008-06-093-5/+4 * Update to 1.20mat2008-06-062-4/+4 * Bump portrevision due to upgrade of devel/gettext.edwin2008-06-064-2/+4 * - Fix pkg-plist.lippe2008-05-302-8/+2 * - Add common code to support for cmake based ports.miwi2008-05-281-12/+2 * Update to 2.25ahze2008-05-272-5/+4 * Add port x11-fonts/kaputa:sat2008-05-205-0/+60 * Add port x11-fonts/tmu:sat2008-05-195-0/+72 * Add port x11-fonts/code2001:sat2008-05-105-0/+60 * Reset aaron's port maintainerships due to many maintainer-timeouts.linimon2008-04-291-1/+1 * Reset jylefort's port maintainerships. portmgr has taken his commit bitlinimon2008-04-291-1/+1 * - Build-depend on gawsat2008-04-281-0/+1 * - Update to 2.8sat2008-04-242-4/+4 * * ttf-malayalam:thierry2008-04-244-4/+22 * - Fix build after xorg cleanupmiwi2008-04-211-1/+1 * - Remove unneeded dependency from gtk12/gtk20 [1]miwi2008-04-20