aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChenthill Palanisamy <pchen@src.gnome.org>2005-09-30 19:08:09 +0800
committerChenthill Palanisamy <pchen@src.gnome.org>2005-09-30 19:08:09 +0800
commit9c2faea869197cbb5f223d923b9c0fadd814c361 (patch)
tree4cbd806b0426e89289ead46a548e0ae7640f1d22
parent6d3a5db30b2408177fa38b27f2864a5961833a5d (diff)
downloadgsoc2013-evolution-9c2faea869197cbb5f223d923b9c0fadd814c361.tar
gsoc2013-evolution-9c2faea869197cbb5f223d923b9c0fadd814c361.tar.gz
gsoc2013-evolution-9c2faea869197cbb5f223d923b9c0fadd814c361.tar.bz2
gsoc2013-evolution-9c2faea869197cbb5f223d923b9c0fadd814c361.tar.lz
gsoc2013-evolution-9c2faea869197cbb5f223d923b9c0fadd814c361.tar.xz
gsoc2013-evolution-9c2faea869197cbb5f223d923b9c0fadd814c361.tar.zst
gsoc2013-evolution-9c2faea869197cbb5f223d923b9c0fadd814c361.zip
Fixes #246480
svn path=/trunk/; revision=30436
-rw-r--r--calendar/ChangeLog6
-rw-r--r--calendar/gui/e-calendar-view.c18
2 files changed, 20 insertions, 4 deletions
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 <pchenthill@novell.com>
+
+ 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 <pchenthill@novell.com>
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)