Index: calendar/ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/calendar/ChangeLog,v
retrieving revision 1.1871
diff -u -r1.1871 ChangeLog
--- calendar/ChangeLog	15 Sep 2003 09:30:59 -0000	1.1871
+++ calendar/ChangeLog	16 Sep 2003 07:20:56 -0000
@@ -1,3 +1,13 @@
+2003-09-15  Bolian Yin <bolian.yin@sun.com>
+
+	* gui/e-cal-view.c: add new signal "selected_time_changed" 
+	* gui/e-day-view-main-item.c (e_day_view_main_item_class_init):
+	   a11y initialization
+	* gui/e-day-view-top-item (e_day_view_top_item_get_day_label):
+	   new public function.
+	* gui/e-day-view.c (e_day_view_ensure_rows_visible, e_day_view_update_calendar_selection_time): make static functions public
+	  (e_day_view_cursor_key_up, e_day_view_cursor_key_down, e_day_view_cursor_key_left, e_day_view_cursor_key_right): emit "selected_time_changed".
+
 2003-09-15  Harry Lu  <harry.lu@sun.com>
 
 	* gui/apps_evolution_calendar.schemas: change last_notification_time's
Index: calendar/gui/e-cal-view.c
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/e-cal-view.c,v
retrieving revision 1.15
diff -u -r1.15 e-cal-view.c
--- calendar/gui/e-cal-view.c	20 Aug 2003 12:02:32 -0000	1.15
+++ calendar/gui/e-cal-view.c	16 Sep 2003 07:20:58 -0000
@@ -82,6 +82,7 @@
 /* Signal IDs */
 enum {
 	SELECTION_CHANGED,
+	SELECTED_TIME_CHANGED,
 	TIMEZONE_CHANGED,
 	EVENT_CHANGED,
 	EVENT_ADDED,
@@ -106,6 +107,14 @@
 			      NULL, NULL,
 			      g_cclosure_marshal_VOID__VOID,
 			      G_TYPE_NONE, 0);
+	e_cal_view_signals[SELECTED_TIME_CHANGED] =
+		g_signal_new ("selected_time_changed",
+			      G_TYPE_FROM_CLASS (klass),
+			      G_SIGNAL_RUN_LAST,
+			      G_STRUCT_OFFSET (ECalViewClass, selected_time_changed),
+			      NULL, NULL,
+			      g_cclosure_marshal_VOID__VOID,
+			      G_TYPE_NONE, 0);
 	e_cal_view_signals[TIMEZONE_CHANGED] =
 		g_signal_new ("timezone_changed",
 			      G_TYPE_FROM_CLASS (klass),
@@ -139,6 +148,7 @@
 	object_class->destroy = e_cal_view_destroy;
 
 	klass->selection_changed = NULL;
+	klass->selected_time_changed = NULL;
 	klass->event_changed = NULL;
 	klass->event_added = NULL;
 
Index: calendar/gui/e-cal-view.h
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/e-cal-view.h,v
retrieving revision 1.11
diff -u -r1.11 e-cal-view.h
--- calendar/gui/e-cal-view.h	20 Aug 2003 10:16:59 -0000	1.11
+++ calendar/gui/e-cal-view.h	16 Sep 2003 07:20:58 -0000
@@ -76,6 +76,7 @@
 
 	/* Notification signals */
 	void (* selection_changed) (ECalView *cal_view);
+	void (* selected_time_changed) (ECalView *cal_view);
 	void (* timezone_changed) (ECalView *cal_view, icaltimezone *old_zone, icaltimezone *new_zone);
 	void (* event_changed) (ECalView *day_view, ECalViewEvent *event);
 	void (* event_added) (ECalView *day_view, ECalViewEvent *event);
Index: calendar/gui/e-day-view-main-item.c
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/e-day-view-main-item.c,v
retrieving revision 1.34
diff -u -r1.34 e-day-view-main-item.c
--- calendar/gui/e-day-view-main-item.c	20 Aug 2003 10:16:59 -0000	1.34
+++ calendar/gui/e-day-view-main-item.c	16 Sep 2003 07:20:59 -0000
@@ -31,6 +31,7 @@
 #include "e-util/e-categories-config.h"
 #include "e-day-view-layout.h"
 #include "e-day-view-main-item.h"
+#include "ea-calendar.h"
 
 static void e_day_view_main_item_class_init (EDayViewMainItemClass *class);
 static void e_day_view_main_item_init (EDayViewMainItem *dvtitem);
@@ -106,6 +107,9 @@
 	item_class->draw        = e_day_view_main_item_draw;
 	item_class->point       = e_day_view_main_item_point;
 	item_class->event       = e_day_view_main_item_event;
+
+	/* init the accessibility support for e_day_view */
+ 	e_day_view_main_item_a11y_init ();
 }
 
 
Index: calendar/gui/e-day-view-top-item.c
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/e-day-view-top-item.c,v
retrieving revision 1.36
diff -u -r1.36 e-day-view-top-item.c
--- calendar/gui/e-day-view-top-item.c	20 Aug 2003 10:16:59 -0000	1.36
+++ calendar/gui/e-day-view-top-item.c	16 Sep 2003 07:21:00 -0000
@@ -165,12 +165,10 @@
 	EDayView *day_view;
 	GtkStyle *style;
 	GdkGC *gc, *fg_gc, *bg_gc, *light_gc, *dark_gc;
-	gchar buffer[128], *format;
+	gchar buffer[128];
 	GdkRectangle clip_rect;
 	gint canvas_width, canvas_height, left_edge, day, date_width, date_x;
 	gint item_height, event_num;
-	struct tm day_start = { 0 };
-	struct icaltimetype day_start_tt;
 	PangoLayout *layout;
 
 #if 0
@@ -245,34 +243,8 @@
 	/* Draw the date. Set a clipping rectangle so we don't draw over the
 	   next day. */
 	for (day = 0; day < day_view->days_shown; day++) {
-		day_start_tt = icaltime_from_timet_with_zone (day_view->day_starts[day], FALSE,
-							      e_cal_view_get_timezone (E_CAL_VIEW (day_view)));
-		day_start.tm_year = day_start_tt.year - 1900;
-		day_start.tm_mon = day_start_tt.month - 1;
-		day_start.tm_mday = day_start_tt.day;
-		day_start.tm_isdst = -1;
-
-		day_start.tm_wday = time_day_of_week (day_start_tt.day,
-						      day_start_tt.month - 1,
-						      day_start_tt.year);
-
-		if (day_view->date_format == E_DAY_VIEW_DATE_FULL)
-			/* strftime format %A = full weekday name, %d = day of month,
-			   %B = full month name. Don't use any other specifiers. */
-			format = _("%A %d %B");
-		else if (day_view->date_format == E_DAY_VIEW_DATE_ABBREVIATED)
-			/* strftime format %a = abbreviated weekday name, %d = day of month,
-			   %b = abbreviated month name. Don't use any other specifiers. */
-			format = _("%a %d %b");
-		else if (day_view->date_format == E_DAY_VIEW_DATE_NO_WEEKDAY)
-			/* strftime format %d = day of month, %b = abbreviated month name.
-			   Don't use any other specifiers. */
-			format = _("%d %b");
-		else
-			format = "%d";
-
-		e_utf8_strftime (buffer, sizeof (buffer), format, &day_start);
-			
+		e_day_view_top_item_get_day_label (day_view, day,
+						   buffer, sizeof (buffer));
 		clip_rect.x = day_view->day_offsets[day] - x;
 		clip_rect.y = 2 - y;
 		clip_rect.width = day_view->day_widths[day];
@@ -690,4 +662,40 @@
 	return FALSE;
 }
 
+void
+e_day_view_top_item_get_day_label (EDayView *day_view, gint day,
+				   gchar *buffer, gint buffer_len)
+{
+	struct icaltimetype day_start_tt;
+	struct tm day_start = { 0 };
+	gchar *format;
 
+	day_start_tt = icaltime_from_timet_with_zone (day_view->day_starts[day],
+						      FALSE,
+						      e_cal_view_get_timezone (E_CAL_VIEW (day_view)));
+	day_start.tm_year = day_start_tt.year - 1900;
+	day_start.tm_mon = day_start_tt.month - 1;
+	day_start.tm_mday = day_start_tt.day;
+	day_start.tm_isdst = -1;
+
+	day_start.tm_wday = time_day_of_week (day_start_tt.day,
+					      day_start_tt.month - 1,
+					      day_start_tt.year);
+
+	if (day_view->date_format == E_DAY_VIEW_DATE_FULL)
+		/* strftime format %A = full weekday name, %d = day of month,
+		   %B = full month name. Don't use any other specifiers. */
+		format = _("%A %d %B");
+	else if (day_view->date_format == E_DAY_VIEW_DATE_ABBREVIATED)
+		/* strftime format %a = abbreviated weekday name, %d = day of month,
+		   %b = abbreviated month name. Don't use any other specifiers. */
+		format = _("%a %d %b");
+	else if (day_view->date_format == E_DAY_VIEW_DATE_NO_WEEKDAY)
+		/* strftime format %d = day of month, %b = abbreviated month name.
+		   Don't use any other specifiers. */
+		format = _("%d %b");
+	else
+		format = "%d";
+
+	e_utf8_strftime (buffer, buffer_len, format, &day_start);
+}
Index: calendar/gui/e-day-view-top-item.h
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/e-day-view-top-item.h,v
retrieving revision 1.5
diff -u -r1.5 e-day-view-top-item.h
--- calendar/gui/e-day-view-top-item.h	27 Oct 2001 16:44:11 -0000	1.5
+++ calendar/gui/e-day-view-top-item.h	16 Sep 2003 07:21:00 -0000
@@ -55,7 +55,8 @@
 
 
 GtkType  e_day_view_top_item_get_type      (void);
-
+void e_day_view_top_item_get_day_label (EDayView *day_view, gint day,
+					gchar *buffer, gint buffer_len);
 
 
 #ifdef __cplusplus
Index: calendar/gui/e-day-view.c
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/e-day-view.c,v
retrieving revision 1.219
diff -u -r1.219 e-day-view.c
--- calendar/gui/e-day-view.c	1 Sep 2003 06:15:33 -0000	1.219
+++ calendar/gui/e-day-view.c	16 Sep 2003 07:21:05 -0000
@@ -182,9 +182,6 @@
 					GdkEventKey *event);
 static void e_day_view_cursor_key_right (EDayView *day_view,
 					 GdkEventKey *event);
-static void e_day_view_ensure_rows_visible (EDayView *day_view,
-					    gint start_row,
-					    gint end_row);
 static void e_day_view_scroll	(EDayView	*day_view,
 				 gfloat		 pages_to_scroll);
 
@@ -217,7 +214,6 @@
 						  GdkEventScroll *scroll,
 						  EDayView *day_view);
 
-static void e_day_view_update_calendar_selection_time (EDayView *day_view);
 static gboolean e_day_view_on_main_canvas_motion (GtkWidget *widget,
 						  GdkEventMotion *event,
 						  EDayView *day_view);
@@ -3414,7 +3410,7 @@
 }
 
 
-static void
+void
 e_day_view_update_calendar_selection_time (EDayView *day_view)
 {
 	time_t start, end;
@@ -5348,6 +5344,7 @@
 						day_view->selection_start_row,
 						day_view->selection_end_row);
 
+	g_signal_emit_by_name (day_view, "selected_time_changed");
 	e_day_view_update_calendar_selection_time (day_view);
 
 	/* FIXME: Optimise? */
@@ -5380,6 +5377,7 @@
 						day_view->selection_start_row,
 						day_view->selection_end_row);
 
+	g_signal_emit_by_name (day_view, "selected_time_changed");
 	e_day_view_update_calendar_selection_time (day_view);
 
 	/* FIXME: Optimise? */
@@ -5403,6 +5401,7 @@
 		gtk_widget_queue_draw (day_view->top_canvas);
 		gtk_widget_queue_draw (day_view->main_canvas);
 	}
+	g_signal_emit_by_name (day_view, "selected_time_changed");
 }
 
 
@@ -5421,6 +5420,7 @@
 		gtk_widget_queue_draw (day_view->top_canvas);
 		gtk_widget_queue_draw (day_view->main_canvas);
 	}
+	g_signal_emit_by_name (day_view, "selected_time_changed");
 }
 
 
@@ -5468,7 +5468,7 @@
 }
 
 
-static void
+void
 e_day_view_ensure_rows_visible (EDayView *day_view,
 				gint start_row,
 				gint end_row)
Index: calendar/gui/e-day-view.h
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/e-day-view.h,v
retrieving revision 1.51
diff -u -r1.51 e-day-view.h
--- calendar/gui/e-day-view.h	20 Aug 2003 10:16:59 -0000	1.51
+++ calendar/gui/e-day-view.h	16 Sep 2003 07:21:06 -0000
@@ -592,6 +592,11 @@
  					  GnomeCanvasItem *item,
  					  gint *day_return,
  					  gint *event_num_return);
+void e_day_view_update_calendar_selection_time (EDayView *day_view);
+void e_day_view_ensure_rows_visible (EDayView *day_view,
+				     gint start_row,
+				     gint end_row);
+
 
 #ifdef __cplusplus
 }
