[evolution-patches] fix for the bug #246480 [calendar]



Hi,
   Have attached the patch for the bug.

thanks, Chenthill.
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/calendar/ChangeLog,v
retrieving revision 1.2808
diff -u -p -r1.2808 ChangeLog
--- ChangeLog	29 Sep 2005 13:02:55 -0000	1.2808
+++ ChangeLog	29 Sep 2005 18:43:59 -0000
@@ -1,3 +1,9 @@
+2005-09-29  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-29  Chenthill Palanisamy  <pchenthill novell com>
 
 	* gui/e-calendar-table.c (e_calendar_table_open_task): Set the 
Index: gui/e-calendar-view.c
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/e-calendar-view.c,v
retrieving revision 1.91
diff -u -p -r1.91 e-calendar-view.c
--- gui/e-calendar-view.c	24 Aug 2005 03:07:49 -0000	1.91
+++ gui/e-calendar-view.c	29 Sep 2005 18:44:05 -0000
@@ -312,6 +312,11 @@ e_calendar_view_add_event (ECalendarView
 			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
 		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)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]