From 9c2faea869197cbb5f223d923b9c0fadd814c361 Mon Sep 17 00:00:00 2001 From: Chenthill Palanisamy Date: Fri, 30 Sep 2005 11:08:09 +0000 Subject: Fixes #246480 svn path=/trunk/; revision=30436 --- calendar/ChangeLog | 6 ++++++ calendar/gui/e-calendar-view.c | 18 ++++++++++++++---- 2 files changed, 20 insertions(+), 4 deletions(-) (limited to 'calendar') diff --git a/calendar/ChangeLog b/calendar/ChangeLog index 0433ab8c79..9d710135e5 100644 --- a/calendar/ChangeLog +++ b/calendar/ChangeLog @@ -1,3 +1,9 @@ +2005-09-30 Chenthill Palanisamy + + Fixes #246480 + * gui/e-calendar-view.c: (e_calendar_view_add_event): Remember + the time if the event is copy pasted in week or month views. + 2005-08-30 Chenthill Palanisamy Fixes #270036 diff --git a/calendar/gui/e-calendar-view.c b/calendar/gui/e-calendar-view.c index 87b2aa7f08..9292e27636 100644 --- a/calendar/gui/e-calendar-view.c +++ b/calendar/gui/e-calendar-view.c @@ -312,6 +312,11 @@ e_calendar_view_add_event (ECalendarView *cal_view, ECal *client, time_t dtstart time_divisions = calendar_config_get_time_divisions (); ic_dur = icaldurationtype_from_int (time_divisions * 60); } + + if (in_top_canvas) + new_dtstart = dtstart + start_offset * 60; + else + new_dtstart = dtstart; break; case GNOME_CAL_WEEK_VIEW: case GNOME_CAL_MONTH_VIEW: @@ -319,16 +324,21 @@ e_calendar_view_add_event (ECalendarView *cal_view, ECal *client, time_t dtstart if (old_dtstart.is_date && old_dtend.is_date && memcmp (&ic_dur, &ic_oneday, sizeof(ic_dur)) == 0) all_day_event = TRUE; + else { + icaltimetype new_time = icaltime_from_timet_with_zone (dtstart, FALSE, default_zone); + + new_time.hour = old_dtstart.hour; + new_time.minute = old_dtstart.minute; + new_time.second = old_dtstart.second; + + new_dtstart = icaltime_as_timet_with_zone (new_time, default_zone); + } break; default: g_assert_not_reached (); return; } - if (in_top_canvas) - new_dtstart = dtstart + start_offset * 60; - else - new_dtstart = dtstart; itime = icaltime_from_timet_with_zone (new_dtstart, FALSE, default_zone); if (all_day_event) -- cgit