diff options
author | Chenthill Palanisamy <pchen@src.gnome.org> | 2005-09-30 19:08:09 +0800 |
---|---|---|
committer | Chenthill Palanisamy <pchen@src.gnome.org> | 2005-09-30 19:08:09 +0800 |
commit | 9c2faea869197cbb5f223d923b9c0fadd814c361 (patch) | |
tree | 4cbd806b0426e89289ead46a548e0ae7640f1d22 /calendar/gui/e-calendar-view.c | |
parent | 6d3a5db30b2408177fa38b27f2864a5961833a5d (diff) | |
download | gsoc2013-evolution-9c2faea869197cbb5f223d923b9c0fadd814c361.tar.gz gsoc2013-evolution-9c2faea869197cbb5f223d923b9c0fadd814c361.tar.zst gsoc2013-evolution-9c2faea869197cbb5f223d923b9c0fadd814c361.zip |
Fixes #246480
svn path=/trunk/; revision=30436
Diffstat (limited to 'calendar/gui/e-calendar-view.c')
-rw-r--r-- | calendar/gui/e-calendar-view.c | 18 |
1 files changed, 14 insertions, 4 deletions
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) |