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



Hi,
   Have the attached the patch for the bug. It changes selection in the
recurrence preview calendar based on the start date of the appointment.


thanks, Chenthill.
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/calendar/ChangeLog,v
retrieving revision 1.2925
diff -u -p -u -p -r1.2925 ChangeLog
--- ChangeLog	8 Jan 2006 21:23:06 -0000	1.2925
+++ ChangeLog	10 Jan 2006 06:30:21 -0000
@@ -1,3 +1,9 @@
+2006-01-10  Chenthill Palanisamy  <pchenthill novell com>
+
+	Fixes #311888
+	* gui/dialogs/recurrence-page.c: (recurrence_page_set_dates):
+	Set the selection based on the start date of the appointment.
+
 2006-01-08  Tor Lillqvist  <tml novell com>
 
 	* gui/migration.c: Bypass most of this file on Win32, as there are
Index: gui/dialogs/recurrence-page.c
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/dialogs/recurrence-page.c,v
retrieving revision 1.71
diff -u -p -u -p -r1.71 recurrence-page.c
--- gui/dialogs/recurrence-page.c	26 Nov 2005 02:31:52 -0000	1.71
+++ gui/dialogs/recurrence-page.c	10 Jan 2006 06:30:22 -0000
@@ -1908,6 +1908,22 @@ recurrence_page_set_dates (CompEditorPag
 							 priv->weekday_blocked_day_mask);
 		}
 	}
+
+	if (COMP_EDITOR_PAGE (rpage)->flags & COMP_EDITOR_PAGE_NEW_ITEM) {
+		ECalendar *ecal;
+		GDate *start, *end;
+
+		ecal = E_CALENDAR (priv->preview_calendar);
+		start = g_date_new ();
+		end = g_date_new ();
+
+		g_date_set_dmy (start, dates->start->value->day, dates->start->value->month, dates->start->value->year);
+		g_date_set_dmy (end, dates->end->value->day, dates->end->value->month, dates->end->value->year);
+		e_calendar_item_set_selection (ecal->calitem, start, end);
+
+		g_date_free (start);
+		g_date_free (end);
+	}
 	
 	/* Make sure the preview gets updated. */
 	preview_recur (rpage);


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