Re: [evolution-patches] patch for calendar a11y



Looks ok pending review by JPR or Rodrigo.
    Harry

Bolian Yin wrote:
Hi,

This patch fixes fixes several small bugs in calendar a11y.  All fixes in a11y directory.

Thanks,
Bolian


Index: ChangeLog =================================================================== RCS file: /cvs/gnome/evolution/a11y/ChangeLog,v retrieving revision 1.11 diff -u -r1.11 ChangeLog --- ChangeLog 3 Dec 2003 17:57:06 -0000 1.11 +++ ChangeLog 5 Dec 2003 09:00:51 -0000 @@ -1,3 +1,11 @@ +2003-12-05 Bolian Yin <bolian yin sun com> + + * calendar/ea-cal-view-event.c (ea_cal_view_event_new): shortcut when cal_view is NULL. + * calendar/ea-cal-view.c: Change an action name. + * calendar/ea-calendar.c (ea_calendar_focus_watcher): add check for event atk object. + * calendar/ea-week-view.c (ea_week_view_get_n_children): correct impl. + (get_visible_text_item_count): removed. + 2003-12-03 Ettore Perazzoli <ettore ximian com> * calendar/Makefile.am (SHELL_IDLS): Only get Evolution.idl. Index: calendar/ea-cal-view-event.c =================================================================== RCS file: /cvs/gnome/evolution/a11y/calendar/ea-cal-view-event.c,v retrieving revision 1.7 diff -u -r1.7 ea-cal-view-event.c --- calendar/ea-cal-view-event.c 7 Nov 2003 07:12:34 -0000 1.7 +++ calendar/ea-cal-view-event.c 5 Dec 2003 09:00:53 -0000 @@ -138,6 +138,9 @@ g_return_val_if_fail (E_IS_TEXT (obj), NULL); cal_view = ea_calendar_helpers_get_cal_view_from (GNOME_CANVAS_ITEM (obj)); + if (!cal_view) + return NULL; + if (E_IS_WEEK_VIEW (cal_view)) { gint event_num, span_num; EWeekViewEvent *week_view_event; Index: calendar/ea-cal-view.c =================================================================== RCS file: /cvs/gnome/evolution/a11y/calendar/ea-cal-view.c,v retrieving revision 1.4 diff -u -r1.4 ea-cal-view.c --- calendar/ea-cal-view.c 7 Nov 2003 05:51:09 -0000 1.4 +++ calendar/ea-cal-view.c 5 Dec 2003 09:00:54 -0000 @@ -303,7 +303,7 @@ static const char * action_name [CAL_VIEW_ACTION_NUM] = { "New Appointment", - "New Event", + "New All Day Event", "New Meeting", "Go to Today", "Go to Date" @@ -346,7 +346,7 @@ e_calendar_view_new_appointment (cal_view); break; case 1: - /* New Event */ + /* New All Day Event */ e_calendar_view_get_selected_time_range (cal_view, &dtstart, &dtend); e_calendar_view_new_appointment_for (cal_view, Index: calendar/ea-calendar.c =================================================================== RCS file: /cvs/gnome/evolution/a11y/calendar/ea-calendar.c,v retrieving revision 1.3 diff -u -r1.3 ea-calendar.c --- calendar/ea-calendar.c 4 Nov 2003 08:15:56 -0000 1.3 +++ calendar/ea-calendar.c 5 Dec 2003 09:00:54 -0000 @@ -112,14 +112,15 @@ canvas_item = GNOME_CANVAS_ITEM (object); if (event->type == GDK_FOCUS_CHANGE) { - if (event->focus_change.in) + if (event->focus_change.in) { ea_event = ea_calendar_helpers_get_accessible_for (canvas_item); - else - /* focus out */ - ea_event = NULL; - atk_focus_tracker_notify (ea_event); + if (!ea_event) + /* not canvas item we want */ + return TRUE; + } + atk_focus_tracker_notify (ea_event); } } else if (E_IS_DAY_VIEW (object)) { Index: calendar/ea-week-view.c =================================================================== RCS file: /cvs/gnome/evolution/a11y/calendar/ea-week-view.c,v retrieving revision 1.4 diff -u -r1.4 ea-week-view.c --- calendar/ea-week-view.c 7 Nov 2003 07:12:35 -0000 1.4 +++ calendar/ea-week-view.c 5 Dec 2003 09:00:54 -0000 @@ -38,8 +38,6 @@ static AtkObject* ea_week_view_ref_child (AtkObject *obj, gint i); -static void get_visible_text_item_count (GnomeCanvasItem *item, gpointer data); - static gpointer parent_class = NULL; GType @@ -195,15 +193,33 @@ EWeekView *week_view; GnomeCanvasGroup *canvas_group; gint i, count = 0; + gint event_index; g_return_val_if_fail (EA_IS_WEEK_VIEW (accessible), -1); if (!GTK_ACCESSIBLE (accessible)->widget) return -1; week_view = E_WEEK_VIEW (GTK_ACCESSIBLE (accessible)->widget); - canvas_group = GNOME_CANVAS_GROUP (GNOME_CANVAS (week_view->main_canvas)->root); - g_list_foreach (canvas_group->item_list, (GFunc)get_visible_text_item_count, - &count); + + for (event_index = 0; event_index < week_view->events->len; + ++event_index) { + EWeekViewEvent *event; + EWeekViewEventSpan *span; + + event = &g_array_index (week_view->events, + EWeekViewEvent, event_index); + if (!event) + continue; + span = &g_array_index (week_view->spans, EWeekViewEventSpan, + event->spans_index + 0); + + if (!span) + continue; + + /* at least one of the event spans is visible, count it */ + if (span->text_item) + ++count; + } /* add the number of visible jump buttons */ for (i = 0; i < E_WEEK_VIEW_MAX_WEEKS * 7; i++) { @@ -246,10 +262,13 @@ event = &g_array_index (week_view->events, EWeekViewEvent, event_index); + if (!event) + continue; + span = &g_array_index (week_view->spans, EWeekViewEventSpan, event->spans_index + span_num); - if (!event || !span) + if (!span) continue; current_day = span->start_day; @@ -284,11 +303,3 @@ #endif return atk_object; } - -static void get_visible_text_item_count (GnomeCanvasItem *item, gpointer data) -{ - gint *count = (gint *)data; - - if (item && E_IS_TEXT (item)) - ++(*count); -} Index: widgets/ea-calendar-item.c =================================================================== RCS file: /cvs/gnome/evolution/a11y/widgets/ea-calendar-item.c,v retrieving revision 1.2 diff -u -r1.2 ea-calendar-item.c --- widgets/ea-calendar-item.c 11 Nov 2003 10:33:43 -0000 1.2 +++ widgets/ea-calendar-item.c 5 Dec 2003 09:00:55 -0000 @@ -683,7 +683,7 @@ table_interface_get_selected_columns (AtkTable *table, gint **columns_selected) { - columns_selected = NULL; + *columns_selected = NULL; return -1; }


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